OSDN Git Service

Remove wrongly pushed WinIMerge sources
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 19 Nov 2016 21:42:55 +0000 (06:42 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 19 Nov 2016 21:42:55 +0000 (06:42 +0900)
34 files changed:
.hgignore [deleted file]
.hgtags [deleted file]
BuildArc.cmd [deleted file]
BuildBin.cmd [deleted file]
ExpandEnvironmenStrings.vbs [deleted file]
GPL.txt [deleted file]
README.md [deleted file]
SetVersion.cmd [deleted file]
Version.h [deleted file]
Version.in [deleted file]
WinIMerge.sln [deleted file]
freeimage-license-gplv2.txt [deleted file]
src/ImgDiffBuffer.hpp [deleted file]
src/ImgMergeBuffer.hpp [deleted file]
src/ImgMergeWindow.hpp [deleted file]
src/ImgToolWindow.hpp [deleted file]
src/ImgWindow.hpp [deleted file]
src/Makefile [deleted file]
src/WinIMerge.cpp [deleted file]
src/WinIMerge.h [deleted file]
src/WinIMerge.ico [deleted file]
src/WinIMerge.rc [deleted file]
src/WinIMerge.vcxproj [deleted file]
src/WinIMerge.vcxproj.filters [deleted file]
src/WinIMergeLib.cpp [deleted file]
src/WinIMergeLib.def [deleted file]
src/WinIMergeLib.h [deleted file]
src/WinIMergeLib.rc [deleted file]
src/WinIMergeLib.vcxproj [deleted file]
src/WinIMergeLib.vcxproj.filters [deleted file]
src/cidiff.cpp [deleted file]
src/cidiff.vcxproj [deleted file]
src/image.hpp [deleted file]
src/resource.h [deleted file]

diff --git a/.hgignore b/.hgignore
deleted file mode 100644 (file)
index 74884c3..0000000
--- a/.hgignore
+++ /dev/null
@@ -1,9 +0,0 @@
-syntax: glob\r
-BuildTmp\r
-Dist\r
-ipch\r
-*.exp\r
-*.tlog\r
-*.opensdf\r
-*.sdf\r
-*.un~\r
diff --git a/.hgtags b/.hgtags
deleted file mode 100644 (file)
index 3798204..0000000
--- a/.hgtags
+++ /dev/null
@@ -1,12 +0,0 @@
-5710fff75af907f9c292950e3dc9bf3ab4c448ca 0.9.2.0
-9e83a2640c31b4fb8321fdcaf03b7ac539c320c8 0.9.3.0
-0ef16028a292e33f87cbe75f83a7f799299a1ac9 0.9.4.0
-078109b91064c140265a2e01aaf87a65d20b5253 0.9.5.0
-8cd8da53a3435673ee20294721a7fc8ad1251129 0.9.6.0
-c48abf5626bd1a58ef6562702c31ad761cbe5d4b 0.9.7.0
-183e12ead29fb8665b8327cfae93a39d6e80544e 0.9.8.0
-219aa7716b515d60c155bd2fdd1133df5e5c1409 0.9.9.0
-824742a4a5ae57cc8d0056b4171b5d00b5e6695e 1.0.0.0
-f8b9b974693906c7cfc972f1b5491acea765f73d 1.0.1.0
-224658994c218b718acd48931594fb689b7ef588 1.0.2.0
-e2dcd9dd397e020c74b739acc5c300f5b1229431 1.0.3.0
diff --git a/BuildArc.cmd b/BuildArc.cmd
deleted file mode 100644 (file)
index a75c80d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-cd /d "%~dp0"\r
-\r
-call SetVersion.cmd\r
-set DISTDIR=.\Dist\r
-set path="%ProgramFiles%\7-zip";"%ProgramFiles(x86)%\7-zip";%path%\r
-\r
-mkdir "%DISTDIR%\WinIMerge" 2> NUL\r
-mkdir "%DISTDIR%\WinIMerge\bin" 2> NUL\r
-mkdir "%DISTDIR%\WinIMerge\bin64" 2> NUL\r
-\r
-copy Build\Release\WinIMerge.exe "%DISTDIR%\WinIMerge\bin"\r
-copy Build\Release\WinIMergeLib.dll "%DISTDIR%\WinIMerge\bin"\r
-copy Build\Release\cidiff.exe "%DISTDIR%\WinIMerge\bin"\r
-copy Build\x64\Release\WinIMerge.exe "%DISTDIR%\WinIMerge\bin64"\r
-copy Build\x64\Release\WinIMergeLib.dll "%DISTDIR%\WinIMerge\bin64"\r
-copy Build\x64\Release\cidiff.exe "%DISTDIR%\WinIMerge\bin64"\r
-copy "%VS140COMNTOOLS%\..\..\VC\redist\x86\Microsoft.VC140.OpenMP\vcomp140.dll" "%DISTDIR%\WinIMerge\bin"\r
-copy "%VS140COMNTOOLS%\..\..\VC\redist\x64\Microsoft.VC140.OpenMP\vcomp140.dll" "%DISTDIR%\WinIMerge\bin64"\r
-\r
-copy GPL.txt "%DISTDIR%\WinIMerge"\r
-copy freeimage-license-gplv2.txt "%DISTDIR%\WinIMerge"\r
-\r
-7z.exe a -tzip "%DISTDIR%\winimerge-%MAJOR%-%MINOR%-%REVISION%-%PATCHLEVEL%-exe.zip" "%DISTDIR%\WinIMerge\"\r
-\r
diff --git a/BuildBin.cmd b/BuildBin.cmd
deleted file mode 100644 (file)
index 5ffead3..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-cd /d "%~dp0"\r
-\r
-del /s Build\*.exe\r
-del /s BuildTmp\*.res\r
-\r
-call SetVersion.cmd\r
-cscript /nologo ExpandEnvironmenStrings.vbs Version.in > Version.h\r
-\r
-setlocal\r
-set VisualStudioVersion=14.0\r
-call "%VS140COMNTOOLS%vsvars32.bat"\r
-for %%i in ( ^\r
-  ..\freeimage\Source\FreeImageLib\FreeImageLib.2015.vcxproj ^\r
-  ..\freeimage\Wrapper\FreeImagePlus\FreeImagePlus.2015.vcxproj ^\r
-  src\WinIMergeLib.vcxproj ^\r
-  src\WinIMerge.vcxproj ^\r
-  src\cidiff.vcxproj ^\r
-  ) do (\r
-  MSBuild %%i /t:build /p:Configuration=Release /p:Platform="Win32" /p:PlatformToolset=v140_xp || pause\r
-  MSBuild %%i /t:build /p:Configuration=Release /p:Platform="x64" /p:PlatformToolset=v140_xp || pause\r
-)\r
-\r
-if exist "%SIGNBAT_PATH%" (\r
-  "%SIGNBAT_PATH%" Build\Release\WinIMerge.exe\r
-  "%SIGNBAT_PATH%" Build\Release\WinIMergeLib.dll\r
-  "%SIGNBAT_PATH%" Build\Release\cidiff.exe\r
-  "%SIGNBAT_PATH%" Build\x64\Release\WinIMerge.exe\r
-  "%SIGNBAT_PATH%" Build\x64\Release\WinIMergeLib.dll\r
-  "%SIGNBAT_PATH%" Build\x64\Release\cidiff.exe\r
-)\r
-\r
-endlocal\r
-\r
diff --git a/ExpandEnvironmenStrings.vbs b/ExpandEnvironmenStrings.vbs
deleted file mode 100644 (file)
index 3cdb899..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")\r
-Dim sh: Set sh = CreateObject("WScript.Shell")\r
-Dim otf: Set otf = fso.OpenTextFile(WScript.Arguments.Unnamed(0), 1)\r
-\r
-Do Until otf.AtEndOfStream = True\r
-       WScript.Echo sh.ExpandEnvironmentStrings(otf.ReadLine)\r
-Loop\r
-\r
-otf.Close\r
-\r
diff --git a/GPL.txt b/GPL.txt
deleted file mode 100644 (file)
index 36488d5..0000000
--- a/GPL.txt
+++ /dev/null
@@ -1,340 +0,0 @@
-                   GNU GENERAL PUBLIC LICENSE\r
-                      Version 2, June 1991\r
-\r
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
- Everyone is permitted to copy and distribute verbatim copies\r
- of this license document, but changing it is not allowed.\r
-\r
-                           Preamble\r
-\r
-  The licenses for most software are designed to take away your\r
-freedom to share and change it.  By contrast, the GNU General Public\r
-License is intended to guarantee your freedom to share and change free\r
-software--to make sure the software is free for all its users.  This\r
-General Public License applies to most of the Free Software\r
-Foundation's software and to any other program whose authors commit to\r
-using it.  (Some other Free Software Foundation software is covered by\r
-the GNU Library General Public License instead.)  You can apply it to\r
-your programs, too.\r
-\r
-  When we speak of free software, we are referring to freedom, not\r
-price.  Our General Public Licenses are designed to make sure that you\r
-have the freedom to distribute copies of free software (and charge for\r
-this service if you wish), that you receive source code or can get it\r
-if you want it, that you can change the software or use pieces of it\r
-in new free programs; and that you know you can do these things.\r
-\r
-  To protect your rights, we need to make restrictions that forbid\r
-anyone to deny you these rights or to ask you to surrender the rights.\r
-These restrictions translate to certain responsibilities for you if you\r
-distribute copies of the software, or if you modify it.\r
-\r
-  For example, if you distribute copies of such a program, whether\r
-gratis or for a fee, you must give the recipients all the rights that\r
-you have.  You must make sure that they, too, receive or can get the\r
-source code.  And you must show them these terms so they know their\r
-rights.\r
-\r
-  We protect your rights with two steps: (1) copyright the software, and\r
-(2) offer you this license which gives you legal permission to copy,\r
-distribute and/or modify the software.\r
-\r
-  Also, for each author's protection and ours, we want to make certain\r
-that everyone understands that there is no warranty for this free\r
-software.  If the software is modified by someone else and passed on, we\r
-want its recipients to know that what they have is not the original, so\r
-that any problems introduced by others will not reflect on the original\r
-authors' reputations.\r
-\r
-  Finally, any free program is threatened constantly by software\r
-patents.  We wish to avoid the danger that redistributors of a free\r
-program will individually obtain patent licenses, in effect making the\r
-program proprietary.  To prevent this, we have made it clear that any\r
-patent must be licensed for everyone's free use or not licensed at all.\r
-\r
-  The precise terms and conditions for copying, distribution and\r
-modification follow.\r
-\r
-                   GNU GENERAL PUBLIC LICENSE\r
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
-\r
-  0. This License applies to any program or other work which contains\r
-a notice placed by the copyright holder saying it may be distributed\r
-under the terms of this General Public License.  The "Program", below,\r
-refers to any such program or work, and a "work based on the Program"\r
-means either the Program or any derivative work under copyright law:\r
-that is to say, a work containing the Program or a portion of it,\r
-either verbatim or with modifications and/or translated into another\r
-language.  (Hereinafter, translation is included without limitation in\r
-the term "modification".)  Each licensee is addressed as "you".\r
-\r
-Activities other than copying, distribution and modification are not\r
-covered by this License; they are outside its scope.  The act of\r
-running the Program is not restricted, and the output from the Program\r
-is covered only if its contents constitute a work based on the\r
-Program (independent of having been made by running the Program).\r
-Whether that is true depends on what the Program does.\r
-\r
-  1. You may copy and distribute verbatim copies of the Program's\r
-source code as you receive it, in any medium, provided that you\r
-conspicuously and appropriately publish on each copy an appropriate\r
-copyright notice and disclaimer of warranty; keep intact all the\r
-notices that refer to this License and to the absence of any warranty;\r
-and give any other recipients of the Program a copy of this License\r
-along with the Program.\r
-\r
-You may charge a fee for the physical act of transferring a copy, and\r
-you may at your option offer warranty protection in exchange for a fee.\r
-\r
-  2. You may modify your copy or copies of the Program or any portion\r
-of it, thus forming a work based on the Program, and copy and\r
-distribute such modifications or work under the terms of Section 1\r
-above, provided that you also meet all of these conditions:\r
-\r
-    a) You must cause the modified files to carry prominent notices\r
-    stating that you changed the files and the date of any change.\r
-\r
-    b) You must cause any work that you distribute or publish, that in\r
-    whole or in part contains or is derived from the Program or any\r
-    part thereof, to be licensed as a whole at no charge to all third\r
-    parties under the terms of this License.\r
-\r
-    c) If the modified program normally reads commands interactively\r
-    when run, you must cause it, when started running for such\r
-    interactive use in the most ordinary way, to print or display an\r
-    announcement including an appropriate copyright notice and a\r
-    notice that there is no warranty (or else, saying that you provide\r
-    a warranty) and that users may redistribute the program under\r
-    these conditions, and telling the user how to view a copy of this\r
-    License.  (Exception: if the Program itself is interactive but\r
-    does not normally print such an announcement, your work based on\r
-    the Program is not required to print an announcement.)\r
-\r
-These requirements apply to the modified work as a whole.  If\r
-identifiable sections of that work are not derived from the Program,\r
-and can be reasonably considered independent and separate works in\r
-themselves, then this License, and its terms, do not apply to those\r
-sections when you distribute them as separate works.  But when you\r
-distribute the same sections as part of a whole which is a work based\r
-on the Program, the distribution of the whole must be on the terms of\r
-this License, whose permissions for other licensees extend to the\r
-entire whole, and thus to each and every part regardless of who wrote it.\r
-\r
-Thus, it is not the intent of this section to claim rights or contest\r
-your rights to work written entirely by you; rather, the intent is to\r
-exercise the right to control the distribution of derivative or\r
-collective works based on the Program.\r
-\r
-In addition, mere aggregation of another work not based on the Program\r
-with the Program (or with a work based on the Program) on a volume of\r
-a storage or distribution medium does not bring the other work under\r
-the scope of this License.\r
-\r
-  3. You may copy and distribute the Program (or a work based on it,\r
-under Section 2) in object code or executable form under the terms of\r
-Sections 1 and 2 above provided that you also do one of the following:\r
-\r
-    a) Accompany it with the complete corresponding machine-readable\r
-    source code, which must be distributed under the terms of Sections\r
-    1 and 2 above on a medium customarily used for software interchange; or,\r
-\r
-    b) Accompany it with a written offer, valid for at least three\r
-    years, to give any third party, for a charge no more than your\r
-    cost of physically performing source distribution, a complete\r
-    machine-readable copy of the corresponding source code, to be\r
-    distributed under the terms of Sections 1 and 2 above on a medium\r
-    customarily used for software interchange; or,\r
-\r
-    c) Accompany it with the information you received as to the offer\r
-    to distribute corresponding source code.  (This alternative is\r
-    allowed only for noncommercial distribution and only if you\r
-    received the program in object code or executable form with such\r
-    an offer, in accord with Subsection b above.)\r
-\r
-The source code for a work means the preferred form of the work for\r
-making modifications to it.  For an executable work, complete source\r
-code means all the source code for all modules it contains, plus any\r
-associated interface definition files, plus the scripts used to\r
-control compilation and installation of the executable.  However, as a\r
-special exception, the source code distributed need not include\r
-anything that is normally distributed (in either source or binary\r
-form) with the major components (compiler, kernel, and so on) of the\r
-operating system on which the executable runs, unless that component\r
-itself accompanies the executable.\r
-\r
-If distribution of executable or object code is made by offering\r
-access to copy from a designated place, then offering equivalent\r
-access to copy the source code from the same place counts as\r
-distribution of the source code, even though third parties are not\r
-compelled to copy the source along with the object code.\r
-\r
-  4. You may not copy, modify, sublicense, or distribute the Program\r
-except as expressly provided under this License.  Any attempt\r
-otherwise to copy, modify, sublicense or distribute the Program is\r
-void, and will automatically terminate your rights under this License.\r
-However, parties who have received copies, or rights, from you under\r
-this License will not have their licenses terminated so long as such\r
-parties remain in full compliance.\r
-\r
-  5. You are not required to accept this License, since you have not\r
-signed it.  However, nothing else grants you permission to modify or\r
-distribute the Program or its derivative works.  These actions are\r
-prohibited by law if you do not accept this License.  Therefore, by\r
-modifying or distributing the Program (or any work based on the\r
-Program), you indicate your acceptance of this License to do so, and\r
-all its terms and conditions for copying, distributing or modifying\r
-the Program or works based on it.\r
-\r
-  6. Each time you redistribute the Program (or any work based on the\r
-Program), the recipient automatically receives a license from the\r
-original licensor to copy, distribute or modify the Program subject to\r
-these terms and conditions.  You may not impose any further\r
-restrictions on the recipients' exercise of the rights granted herein.\r
-You are not responsible for enforcing compliance by third parties to\r
-this License.\r
-\r
-  7. If, as a consequence of a court judgment or allegation of patent\r
-infringement or for any other reason (not limited to patent issues),\r
-conditions are imposed on you (whether by court order, agreement or\r
-otherwise) that contradict the conditions of this License, they do not\r
-excuse you from the conditions of this License.  If you cannot\r
-distribute so as to satisfy simultaneously your obligations under this\r
-License and any other pertinent obligations, then as a consequence you\r
-may not distribute the Program at all.  For example, if a patent\r
-license would not permit royalty-free redistribution of the Program by\r
-all those who receive copies directly or indirectly through you, then\r
-the only way you could satisfy both it and this License would be to\r
-refrain entirely from distribution of the Program.\r
-\r
-If any portion of this section is held invalid or unenforceable under\r
-any particular circumstance, the balance of the section is intended to\r
-apply and the section as a whole is intended to apply in other\r
-circumstances.\r
-\r
-It is not the purpose of this section to induce you to infringe any\r
-patents or other property right claims or to contest validity of any\r
-such claims; this section has the sole purpose of protecting the\r
-integrity of the free software distribution system, which is\r
-implemented by public license practices.  Many people have made\r
-generous contributions to the wide range of software distributed\r
-through that system in reliance on consistent application of that\r
-system; it is up to the author/donor to decide if he or she is willing\r
-to distribute software through any other system and a licensee cannot\r
-impose that choice.\r
-\r
-This section is intended to make thoroughly clear what is believed to\r
-be a consequence of the rest of this License.\r
-\r
-  8. If the distribution and/or use of the Program is restricted in\r
-certain countries either by patents or by copyrighted interfaces, the\r
-original copyright holder who places the Program under this License\r
-may add an explicit geographical distribution limitation excluding\r
-those countries, so that distribution is permitted only in or among\r
-countries not thus excluded.  In such case, this License incorporates\r
-the limitation as if written in the body of this License.\r
-\r
-  9. The Free Software Foundation may publish revised and/or new versions\r
-of the General Public License from time to time.  Such new versions will\r
-be similar in spirit to the present version, but may differ in detail to\r
-address new problems or concerns.\r
-\r
-Each version is given a distinguishing version number.  If the Program\r
-specifies a version number of this License which applies to it and "any\r
-later version", you have the option of following the terms and conditions\r
-either of that version or of any later version published by the Free\r
-Software Foundation.  If the Program does not specify a version number of\r
-this License, you may choose any version ever published by the Free Software\r
-Foundation.\r
-\r
-  10. If you wish to incorporate parts of the Program into other free\r
-programs whose distribution conditions are different, write to the author\r
-to ask for permission.  For software which is copyrighted by the Free\r
-Software Foundation, write to the Free Software Foundation; we sometimes\r
-make exceptions for this.  Our decision will be guided by the two goals\r
-of preserving the free status of all derivatives of our free software and\r
-of promoting the sharing and reuse of software generally.\r
-\r
-                           NO WARRANTY\r
-\r
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
-REPAIR OR CORRECTION.\r
-\r
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
-POSSIBILITY OF SUCH DAMAGES.\r
-\r
-                    END OF TERMS AND CONDITIONS\r
-\r
-           How to Apply These Terms to Your New Programs\r
-\r
-  If you develop a new program, and you want it to be of the greatest\r
-possible use to the public, the best way to achieve this is to make it\r
-free software which everyone can redistribute and change under these terms.\r
-\r
-  To do so, attach the following notices to the program.  It is safest\r
-to attach them to the start of each source file to most effectively\r
-convey the exclusion of warranty; and each file should have at least\r
-the "copyright" line and a pointer to where the full notice is found.\r
-\r
-    <one line to give the program's name and a brief idea of what it does.>\r
-    Copyright (C) <year>  <name of author>\r
-\r
-    This program is free software; you can redistribute it and/or modify\r
-    it under the terms of the GNU General Public License as published by\r
-    the Free Software Foundation; either version 2 of the License, or\r
-    (at your option) any later version.\r
-\r
-    This program is distributed in the hope that it will be useful,\r
-    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-    GNU General Public License for more details.\r
-\r
-    You should have received a copy of the GNU General Public License\r
-    along with this program; if not, write to the Free Software\r
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-\r
-\r
-Also add information on how to contact you by electronic and paper mail.\r
-\r
-If the program is interactive, make it output a short notice like this\r
-when it starts in an interactive mode:\r
-\r
-    Gnomovision version 69, Copyright (C) year  name of author\r
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
-    This is free software, and you are welcome to redistribute it\r
-    under certain conditions; type `show c' for details.\r
-\r
-The hypothetical commands `show w' and `show c' should show the appropriate\r
-parts of the General Public License.  Of course, the commands you use may\r
-be called something other than `show w' and `show c'; they could even be\r
-mouse-clicks or menu items--whatever suits your program.\r
-\r
-You should also get your employer (if you work as a programmer) or your\r
-school, if any, to sign a "copyright disclaimer" for the program, if\r
-necessary.  Here is a sample; alter the names:\r
-\r
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
-\r
-  <signature of Ty Coon>, 1 April 1989\r
-  Ty Coon, President of Vice\r
-\r
-This General Public License does not permit incorporating your program into\r
-proprietary programs.  If your program is a subroutine library, you may\r
-consider it more useful to permit linking proprietary applications with the\r
-library.  If this is what you want to do, use the GNU Library General\r
-Public License instead of this License.\r
diff --git a/README.md b/README.md
deleted file mode 100644 (file)
index 9cab93c..0000000
--- a/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# WinIMerge #\r
-\r
-WinIMerge is a simple image diff/merge tool like WinMerge.\r
-\r
-## Screenshot \r
-\r
-![winimerge.png](https://bitbucket.org/repo/RoKbrr/images/3384177401-winimerge.png)\r
-\r
-## Dependencies\r
-\r
-This software uses the FreeImage open source image library.\r
-\r
-See http://freeimage.sourceforge.net for details.\r
-\r
-FreeImage is used under the the GNU GPL version.\r
-\r
-## How to build (Visual Studio 2013)\r
-~~~\r
-hg clone https://bitbucket.org/sdottaka/winimergebuild\r
-cd winimergebuild\winimerge\r
-buildbin.cmd\r
-~~~\r
-\r
-## License\r
-\r
-GPL2
\ No newline at end of file
diff --git a/SetVersion.cmd b/SetVersion.cmd
deleted file mode 100644 (file)
index 610bd34..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-set MAJOR=1\r
-set MINOR=0\r
-set REVISION=4\r
-set PATCHLEVEL=0\r
diff --git a/Version.h b/Version.h
deleted file mode 100644 (file)
index 6a97276..0000000
--- a/Version.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#define FILEVER        1,0,4,0\r
-#define PRODUCTVER     1,0,4,0\r
-#define STRFILEVER     "1.0.4.0"\r
-#define STRPRODUCTVER  "1.0.4.0"\r
diff --git a/Version.in b/Version.in
deleted file mode 100644 (file)
index c85d044..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#define FILEVER        %MAJOR%,%MINOR%,%REVISION%,%PATCHLEVEL%
-#define PRODUCTVER     %MAJOR%,%MINOR%,%REVISION%,%PATCHLEVEL%
-#define STRFILEVER     "%MAJOR%.%MINOR%.%REVISION%.%PATCHLEVEL%"
-#define STRPRODUCTVER  "%MAJOR%.%MINOR%.%REVISION%.%PATCHLEVEL%"
diff --git a/WinIMerge.sln b/WinIMerge.sln
deleted file mode 100644 (file)
index e5b73d7..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00\r
-# Visual Studio 2015\r
-VisualStudioVersion = 14.0.24720.0\r
-MinimumVisualStudioVersion = 10.0.40219.1\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinIMerge", "src\winimerge.vcxproj", "{36365C8C-04A0-4892-9B83-AD6E05D50D67}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A} = {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}\r
-       EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeImageLib", "..\FreeImage\Source\FreeImageLib\FreeImageLib.2015.vcxproj", "{9E219DF2-315D-478E-8A07-8960C377CE1E}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098} = {E3536C28-A7F1-4B53-8E52-7D2232F9E098}\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF} = {17A4874B-0606-4687-90B6-F91F8CB3B8AF}\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB} = {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9} = {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52} = {33134F61-C1AD-4B6F-9CEA-503A9F140C52}\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8} = {097D9F6C-FD0E-4CBC-9676-009012AAECA8}\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27} = {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A} = {07F662C1-1323-42AB-B6AF-FBFD34A7437A}\r
-               {244455E0-5F25-4451-9540-F317883E52A8} = {244455E0-5F25-4451-9540-F317883E52A8}\r
-       EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibJPEG", "..\FreeImage\Source\LibJPEG\LibJPEG.2015.vcxproj", "{5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibJXR", "..\FreeImage\Source\LibJXR\LibJXR.2015.vcxproj", "{244455E0-5F25-4451-9540-F317883E52A8}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibOpenJPEG", "..\FreeImage\Source\LibOpenJPEG\LibOpenJPEG.2015.vcxproj", "{E3536C28-A7F1-4B53-8E52-7D2232F9E098}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibPNG", "..\FreeImage\Source\LibPNG\LibPNG.2015.vcxproj", "{7DB10B50-CE00-4D7A-B322-6824F05D2FCB}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52} = {33134F61-C1AD-4B6F-9CEA-503A9F140C52}\r
-       EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibRaw", "..\FreeImage\Source\LibRawLite\LibRawLite.2015.vcxproj", "{07F662C1-1323-42AB-B6AF-FBFD34A7437A}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibTIFF4", "..\FreeImage\Source\LibTIFF4\LibTIFF4.2015.vcxproj", "{EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibWebP", "..\FreeImage\Source\LibWebP\LibWebP.2015.vcxproj", "{097D9F6C-FD0E-4CBC-9676-009012AAECA8}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenEXR", "..\FreeImage\Source\OpenEXR\OpenEXR.2015.vcxproj", "{17A4874B-0606-4687-90B6-F91F8CB3B8AF}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZLib", "..\FreeImage\Source\ZLib\ZLib.2015.vcxproj", "{33134F61-C1AD-4B6F-9CEA-503A9F140C52}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeImagePlus", "..\FreeImage\Wrapper\FreeImagePlus\FreeImagePlus.2015.vcxproj", "{94F36908-A4E2-4533-939D-64FF6EADA5A1}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E} = {9E219DF2-315D-478E-8A07-8960C377CE1E}\r
-       EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinIMergeLib", "src\WinIMergeLib.vcxproj", "{C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1} = {94F36908-A4E2-4533-939D-64FF6EADA5A1}\r
-       EndProjectSection\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FreeImage", "FreeImage", "{AD6E6E47-0363-409F-8B7A-48341147E632}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cidiff", "src\cidiff.vcxproj", "{49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1} = {94F36908-A4E2-4533-939D-64FF6EADA5A1}\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E} = {9E219DF2-315D-478E-8A07-8960C377CE1E}\r
-       EndProjectSection\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug|Win32 = Debug|Win32\r
-               Debug|x64 = Debug|x64\r
-               Release|Win32 = Release|Win32\r
-               Release|x64 = Release|x64\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {36365C8C-04A0-4892-9B83-AD6E05D50D67}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {36365C8C-04A0-4892-9B83-AD6E05D50D67}.Debug|Win32.Build.0 = Debug|Win32\r
-               {36365C8C-04A0-4892-9B83-AD6E05D50D67}.Debug|x64.ActiveCfg = Debug|x64\r
-               {36365C8C-04A0-4892-9B83-AD6E05D50D67}.Debug|x64.Build.0 = Debug|x64\r
-               {36365C8C-04A0-4892-9B83-AD6E05D50D67}.Release|Win32.ActiveCfg = Release|Win32\r
-               {36365C8C-04A0-4892-9B83-AD6E05D50D67}.Release|Win32.Build.0 = Release|Win32\r
-               {36365C8C-04A0-4892-9B83-AD6E05D50D67}.Release|x64.ActiveCfg = Release|x64\r
-               {36365C8C-04A0-4892-9B83-AD6E05D50D67}.Release|x64.Build.0 = Release|x64\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E}.Debug|Win32.Build.0 = Debug|Win32\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E}.Debug|x64.ActiveCfg = Debug|x64\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E}.Debug|x64.Build.0 = Debug|x64\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E}.Release|Win32.ActiveCfg = Release|Win32\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E}.Release|Win32.Build.0 = Release|Win32\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E}.Release|x64.ActiveCfg = Release|x64\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E}.Release|x64.Build.0 = Release|x64\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}.Debug|Win32.Build.0 = Debug|Win32\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}.Debug|x64.ActiveCfg = Debug|x64\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}.Debug|x64.Build.0 = Debug|x64\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}.Release|Win32.ActiveCfg = Release|Win32\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}.Release|Win32.Build.0 = Release|Win32\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}.Release|x64.ActiveCfg = Release|x64\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9}.Release|x64.Build.0 = Release|x64\r
-               {244455E0-5F25-4451-9540-F317883E52A8}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {244455E0-5F25-4451-9540-F317883E52A8}.Debug|Win32.Build.0 = Debug|Win32\r
-               {244455E0-5F25-4451-9540-F317883E52A8}.Debug|x64.ActiveCfg = Debug|x64\r
-               {244455E0-5F25-4451-9540-F317883E52A8}.Debug|x64.Build.0 = Debug|x64\r
-               {244455E0-5F25-4451-9540-F317883E52A8}.Release|Win32.ActiveCfg = Release|Win32\r
-               {244455E0-5F25-4451-9540-F317883E52A8}.Release|Win32.Build.0 = Release|Win32\r
-               {244455E0-5F25-4451-9540-F317883E52A8}.Release|x64.ActiveCfg = Release|x64\r
-               {244455E0-5F25-4451-9540-F317883E52A8}.Release|x64.Build.0 = Release|x64\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098}.Debug|Win32.Build.0 = Debug|Win32\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098}.Debug|x64.ActiveCfg = Debug|x64\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098}.Debug|x64.Build.0 = Debug|x64\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098}.Release|Win32.ActiveCfg = Release|Win32\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098}.Release|Win32.Build.0 = Release|Win32\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098}.Release|x64.ActiveCfg = Release|x64\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098}.Release|x64.Build.0 = Release|x64\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}.Debug|Win32.Build.0 = Debug|Win32\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}.Debug|x64.ActiveCfg = Debug|x64\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}.Debug|x64.Build.0 = Debug|x64\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}.Release|Win32.ActiveCfg = Release|Win32\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}.Release|Win32.Build.0 = Release|Win32\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}.Release|x64.ActiveCfg = Release|x64\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB}.Release|x64.Build.0 = Release|x64\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A}.Debug|Win32.Build.0 = Debug|Win32\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A}.Debug|x64.ActiveCfg = Debug|x64\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A}.Debug|x64.Build.0 = Debug|x64\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A}.Release|Win32.ActiveCfg = Release|Win32\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A}.Release|Win32.Build.0 = Release|Win32\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A}.Release|x64.ActiveCfg = Release|x64\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A}.Release|x64.Build.0 = Release|x64\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}.Debug|Win32.Build.0 = Debug|Win32\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}.Debug|x64.ActiveCfg = Debug|x64\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}.Debug|x64.Build.0 = Debug|x64\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}.Release|Win32.ActiveCfg = Release|Win32\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}.Release|Win32.Build.0 = Release|Win32\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}.Release|x64.ActiveCfg = Release|x64\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27}.Release|x64.Build.0 = Release|x64\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8}.Debug|Win32.Build.0 = Debug|Win32\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8}.Debug|x64.ActiveCfg = Debug|x64\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8}.Debug|x64.Build.0 = Debug|x64\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8}.Release|Win32.ActiveCfg = Release|Win32\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8}.Release|Win32.Build.0 = Release|Win32\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8}.Release|x64.ActiveCfg = Release|x64\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8}.Release|x64.Build.0 = Release|x64\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF}.Debug|Win32.Build.0 = Debug|Win32\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF}.Debug|x64.ActiveCfg = Debug|x64\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF}.Debug|x64.Build.0 = Debug|x64\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF}.Release|Win32.ActiveCfg = Release|Win32\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF}.Release|Win32.Build.0 = Release|Win32\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF}.Release|x64.ActiveCfg = Release|x64\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF}.Release|x64.Build.0 = Release|x64\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|Win32.Build.0 = Debug|Win32\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|x64.ActiveCfg = Debug|x64\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Debug|x64.Build.0 = Debug|x64\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|Win32.ActiveCfg = Release|Win32\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|Win32.Build.0 = Release|Win32\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|x64.ActiveCfg = Release|x64\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52}.Release|x64.Build.0 = Release|x64\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1}.Debug|Win32.Build.0 = Debug|Win32\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1}.Debug|x64.ActiveCfg = Debug|x64\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1}.Debug|x64.Build.0 = Debug|x64\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1}.Release|Win32.ActiveCfg = Release|Win32\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1}.Release|Win32.Build.0 = Release|Win32\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1}.Release|x64.ActiveCfg = Release|x64\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1}.Release|x64.Build.0 = Release|x64\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}.Debug|Win32.Build.0 = Debug|Win32\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}.Debug|x64.ActiveCfg = Debug|x64\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}.Debug|x64.Build.0 = Debug|x64\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}.Release|Win32.ActiveCfg = Release|Win32\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}.Release|Win32.Build.0 = Release|Win32\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}.Release|x64.ActiveCfg = Release|x64\r
-               {C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}.Release|x64.Build.0 = Release|x64\r
-               {49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}.Debug|Win32.Build.0 = Debug|Win32\r
-               {49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}.Debug|x64.ActiveCfg = Debug|x64\r
-               {49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}.Debug|x64.Build.0 = Debug|x64\r
-               {49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}.Release|Win32.ActiveCfg = Release|Win32\r
-               {49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}.Release|Win32.Build.0 = Release|Win32\r
-               {49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}.Release|x64.ActiveCfg = Release|x64\r
-               {49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}.Release|x64.Build.0 = Release|x64\r
-       EndGlobalSection\r
-       GlobalSection(SolutionProperties) = preSolution\r
-               HideSolutionNode = FALSE\r
-       EndGlobalSection\r
-       GlobalSection(NestedProjects) = preSolution\r
-               {5E1D4E5F-E10C-4BA3-B663-F33014FD21D9} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {244455E0-5F25-4451-9540-F317883E52A8} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {E3536C28-A7F1-4B53-8E52-7D2232F9E098} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {7DB10B50-CE00-4D7A-B322-6824F05D2FCB} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {07F662C1-1323-42AB-B6AF-FBFD34A7437A} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {EC085CBD-E9C3-477F-9A97-CB9D5DA30E27} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {097D9F6C-FD0E-4CBC-9676-009012AAECA8} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {17A4874B-0606-4687-90B6-F91F8CB3B8AF} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {33134F61-C1AD-4B6F-9CEA-503A9F140C52} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {94F36908-A4E2-4533-939D-64FF6EADA5A1} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-               {9E219DF2-315D-478E-8A07-8960C377CE1E} = {AD6E6E47-0363-409F-8B7A-48341147E632}\r
-       EndGlobalSection\r
-EndGlobal\r
diff --git a/freeimage-license-gplv2.txt b/freeimage-license-gplv2.txt
deleted file mode 100644 (file)
index 6020906..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-GNU General Public License, version 2 (GPL-2.0)\r
-[OSI Approved License]\r
-The GNU General Public License (GPL-2.0)\r
-Version 2, June 1991\r
-\r
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-Everyone is permitted to copy and distribute verbatim copies\r
-of this license document, but changing it is not allowed.\r
-\r
-Preamble\r
-\r
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.\r
-\r
-When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.\r
-\r
-To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.\r
-\r
-For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\r
-\r
-We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.\r
-\r
-Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.\r
-\r
-Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.\r
-\r
-The precise terms and conditions for copying, distribution and modification follow.\r
-\r
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
-\r
-0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".\r
-\r
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.\r
-\r
-1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.\r
-\r
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.\r
-\r
-2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:\r
-\r
-    a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.\r
-\r
-    b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.\r
-\r
-    c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)\r
-\r
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.\r
-\r
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.\r
-\r
-In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.\r
-\r
-3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:\r
-\r
-    a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,\r
-\r
-    b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,\r
-\r
-    c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)\r
-\r
-The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.\r
-\r
-If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.\r
-\r
-4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.\r
-\r
-5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.\r
-\r
-6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.\r
-\r
-7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.\r
-\r
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.\r
-\r
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.\r
-\r
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.\r
-\r
-8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.\r
-\r
-9. The Free Software Foundation may publish revised and/or new versions of the 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.\r
-\r
-Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.\r
-\r
-10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.\r
-\r
-NO WARRANTY\r
-\r
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r
-\r
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\r
-\r
-END OF TERMS AND CONDITIONS\r
-\r
-How to Apply These Terms to Your New Programs\r
-\r
-If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.\r
-\r
-To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.\r
-\r
-    One line to give the program's name and a brief idea of what it does.\r
-    Copyright (C) <year> <name of author>\r
-\r
-    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r
-\r
-    This program is distributed in the hope that 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.\r
-\r
-    You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-Also add information on how to contact you by electronic and paper mail.\r
-\r
-If the program is interactive, make it output a short notice like this when it starts in an interactive mode:\r
-\r
-    Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.\r
-\r
-The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.\r
-\r
-You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:\r
-\r
-    Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
-\r
-    signature of Ty Coon, 1 April 1989\r
-    Ty Coon, President of Vice\r
-\r
-This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.\r
diff --git a/src/ImgDiffBuffer.hpp b/src/ImgDiffBuffer.hpp
deleted file mode 100644 (file)
index bbe663c..0000000
+++ /dev/null
@@ -1,1168 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////\r
-//    License (GPLv2+):\r
-//    This program is free software; you can redistribute it and/or modify\r
-//    it under the terms of the GNU General Public License as published by\r
-//    the Free Software Foundation; either version 2 of the License, or\r
-//    (at your option) any later version.\r
-//\r
-//    This program is distributed in the hope that it will be useful, but\r
-//    WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//    General Public License for more details.\r
-//\r
-//    You should have received a copy of the GNU General Public License\r
-//    along with this program; if not, write to the Free Software\r
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#pragma once\r
-\r
-#include "image.hpp"\r
-#include <string>\r
-#include <algorithm>\r
-#include <cstdio>\r
-#include <cstring>\r
-#include <cmath>\r
-#include <vector>\r
-#include <chrono>\r
-#include <cmath>\r
-\r
-template<class T> struct Point\r
-{\r
-       Point(): x(0), y(0) {}\r
-       Point(T x, T y): x(x), y(y) {}\r
-       T x, y;\r
-};\r
-\r
-template<class T> struct Size\r
-{\r
-       Size(T cx, T cy): cx(cx), cy(cy) {}\r
-       T cx, cy;\r
-};\r
-\r
-template<class T> struct Rect\r
-{\r
-       Rect(T left, T top, T right, T bottom): left(left), top(top), right(right), bottom(bottom) {}\r
-       T left, top, right, bottom;\r
-};\r
-\r
-template <class T> struct Array2D\r
-{\r
-       Array2D() : m_width(0), m_height(0), m_data(NULL)\r
-       {\r
-       }\r
-\r
-       Array2D(size_t width, size_t height) : m_width(width), m_height(height), m_data(new T[width * height])\r
-       {\r
-               memset(m_data, 0, m_width * m_height * sizeof(T));\r
-       }\r
-\r
-       Array2D(const Array2D& other) : m_width(other.m_width), m_height(other.m_height), m_data(new T[other.m_width * other.m_height])\r
-       {\r
-               memcpy(m_data, other.m_data, m_width * m_height * sizeof(T));\r
-       }\r
-\r
-       Array2D& operator=(const Array2D& other)\r
-       {\r
-               if (this != &other)\r
-               {\r
-                       delete[] m_data;\r
-                       m_width  = other.m_width;\r
-                       m_height = other.m_height;\r
-                       m_data = new T[other.m_width * other.m_height];\r
-                       memcpy(m_data, other.m_data, m_width * m_height * sizeof(T));\r
-               }\r
-               return *this;\r
-       }\r
-\r
-       ~Array2D()\r
-       {\r
-               delete[] m_data;\r
-       }\r
-\r
-       void resize(size_t width, size_t height)\r
-       {\r
-               delete[] m_data;\r
-               m_data = new T[width * height];\r
-               m_width  = width;\r
-               m_height = height;\r
-               memset(m_data, 0, sizeof(T) * width * height);\r
-       }\r
-\r
-       T& operator()(int x, int y)\r
-       {\r
-               return m_data[y * m_width + x];\r
-       }\r
-\r
-       const T& operator()(int x, int y) const\r
-       {\r
-               return m_data[y * m_width + x];\r
-       }\r
-\r
-       void clear()\r
-       {\r
-               delete[] m_data;\r
-               m_data = NULL;\r
-               m_width = 0;\r
-               m_height = 0;\r
-       }\r
-\r
-       size_t height() const\r
-       {\r
-               return m_height;\r
-       }\r
-\r
-       size_t width() const\r
-       {\r
-               return m_width;\r
-       }\r
-\r
-       size_t m_width, m_height;\r
-       T* m_data;\r
-};\r
-\r
-struct DiffInfo\r
-{\r
-       enum OP_TYPE\r
-       {\r
-               OP_NONE = 0, OP_1STONLY, OP_2NDONLY, OP_3RDONLY, OP_DIFF, OP_TRIVIAL\r
-       };\r
-       DiffInfo(int op, int x, int y) : op(op), rc(x, y, x + 1, y + 1) {}\r
-       int op;\r
-       Rect<int> rc;\r
-};\r
-\r
-struct DiffStat { int d1, d2, d3, detc; };\r
-\r
-namespace\r
-{\r
-       int GetColorDistance2(Image::Color c1, Image::Color c2)\r
-       {\r
-               int rdist = Image::valueR(c1) - Image::valueR(c2);\r
-               int gdist = Image::valueG(c1) - Image::valueG(c2);\r
-               int bdist = Image::valueB(c1) - Image::valueB(c2);\r
-               int adist = Image::valueA(c1) - Image::valueA(c2);\r
-               return rdist * rdist + gdist * gdist + bdist * bdist + adist * adist;\r
-       }\r
-}\r
-\r
-class CImgDiffBuffer\r
-{\r
-       typedef Array2D<int> DiffBlocks;\r
-\r
-public:\r
-       enum OVERLAY_MODE {\r
-               OVERLAY_NONE = 0, OVERLAY_XOR, OVERLAY_ALPHABLEND, OVERLAY_ALPHABLEND_ANIM\r
-       };\r
-       \r
-       enum { BLINK_TIME = 800 };\r
-       enum { OVERLAY_ALPHABLEND_ANIM_TIME = 1000 };\r
-\r
-       CImgDiffBuffer() : \r
-                 m_nImages(0)\r
-               , m_showDifferences(true)\r
-               , m_blinkDifferences(false)\r
-               , m_overlayMode(OVERLAY_NONE)\r
-               , m_overlayAlpha(0.3)\r
-               , m_diffBlockSize(8)\r
-               , m_selDiffColor(Image::Rgb(0xff, 0x40, 0x40))\r
-               , m_diffColor(Image::Rgb(0xff, 0xff, 0x40))\r
-               , m_diffColorAlpha(0.7)\r
-               , m_colorDistanceThreshold(0.0)\r
-               , m_currentDiffIndex(-1)\r
-               , m_diffCount(0)\r
-       {\r
-               for (int i = 0; i < 3; ++i)\r
-                       m_currentPage[i] = 0;\r
-       }\r
-\r
-       virtual ~CImgDiffBuffer()\r
-       {\r
-               CloseImages();\r
-       }\r
-\r
-       const wchar_t *GetFileName(int pane)\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return NULL;\r
-               return m_filename[pane].c_str();\r
-       }\r
-\r
-       int GetPaneCount() const\r
-       {\r
-               return m_nImages;\r
-       }\r
-\r
-       Image::Color GetPixelColor(int pane, int x, int y) const\r
-       {\r
-               return m_imgOrig32[pane].pixel(x - m_offset[pane].x, y - m_offset[pane].y);\r
-       }\r
-\r
-       double GetColorDistance(int pane1, int pane2, int x, int y) const\r
-       {\r
-               return std::sqrt(static_cast<double>(\r
-                       ::GetColorDistance2(GetPixelColor(pane1, x, y), GetPixelColor(pane2, x, y)) ));\r
-       }\r
-\r
-       Image::Color GetDiffColor() const\r
-       {\r
-               return m_diffColor;\r
-       }\r
-\r
-       void SetDiffColor(Image::Color clrDiffColor)\r
-       {\r
-               m_diffColor = clrDiffColor;\r
-               RefreshImages();\r
-       }\r
-\r
-       Image::Color GetSelDiffColor() const\r
-       {\r
-               return m_selDiffColor;\r
-       }\r
-\r
-       void SetSelDiffColor(Image::Color clrSelDiffColor)\r
-       {\r
-               m_selDiffColor = clrSelDiffColor;\r
-               RefreshImages();\r
-       }\r
-\r
-       double GetDiffColorAlpha() const\r
-       {\r
-               return m_diffColorAlpha;\r
-       }\r
-\r
-       void SetDiffColorAlpha(double diffColorAlpha)\r
-       {\r
-               m_diffColorAlpha = diffColorAlpha;\r
-               RefreshImages();\r
-       }\r
-\r
-       int  GetCurrentPage(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return -1;\r
-               return m_currentPage[pane];\r
-       }\r
-\r
-       void SetCurrentPage(int pane, int page)\r
-       {\r
-               if (page >= 0 && page < GetPageCount(pane))\r
-               {\r
-                       if (m_imgOrigMultiPage[pane].isValid())\r
-                       {\r
-                               m_currentPage[pane] = page;\r
-                               m_imgOrig[pane] = m_imgOrigMultiPage[pane].getImage(page);\r
-                               m_imgOrig32[pane] = m_imgOrig[pane];\r
-                               m_imgOrig32[pane].convertTo32Bits();\r
-                               CompareImages();\r
-                       }\r
-               }\r
-       }\r
-\r
-       void SetCurrentPageAll(int page)\r
-       {\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       SetCurrentPage(i, page);\r
-       }\r
-\r
-       int  GetCurrentMaxPage() const\r
-       {\r
-               int maxpage = 0;\r
-               for (int i = 0; i < m_nImages; ++i)\r
-               {\r
-                       int page = GetCurrentPage(i);\r
-                       maxpage = maxpage < page ? page : maxpage;\r
-               }\r
-               return maxpage;\r
-       }\r
-\r
-       int  GetPageCount(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return -1;\r
-               if (m_imgOrigMultiPage[pane].isValid())\r
-                       return m_imgOrigMultiPage[pane].getPageCount();\r
-               else\r
-                       return 1;\r
-       }\r
-\r
-       int  GetMaxPageCount() const\r
-       {\r
-               int maxpage = 0;\r
-               for (int i = 0; i < m_nImages; ++i)\r
-               {\r
-                       int page = GetPageCount(i);\r
-                       maxpage = page > maxpage ? page : maxpage;\r
-               }\r
-               return maxpage;\r
-       }\r
-\r
-       double GetColorDistanceThreshold() const\r
-       {\r
-               return m_colorDistanceThreshold;\r
-       }\r
-\r
-       void SetColorDistanceThreshold(double threshold)\r
-       {\r
-               m_colorDistanceThreshold = threshold;\r
-               CompareImages();\r
-       }\r
-\r
-       int  GetDiffBlockSize() const\r
-       {\r
-               return m_diffBlockSize;\r
-       }\r
-       \r
-       void SetDiffBlockSize(int blockSize)\r
-       {\r
-               m_diffBlockSize = blockSize;\r
-               CompareImages();\r
-       }\r
-\r
-       OVERLAY_MODE GetOverlayMode() const\r
-       {\r
-               return m_overlayMode;\r
-       }\r
-\r
-       void SetOverlayMode(OVERLAY_MODE overlayMode)\r
-       {\r
-               m_overlayMode = overlayMode;\r
-               RefreshImages();\r
-       }\r
-\r
-       double GetOverlayAlpha() const\r
-       {\r
-               return m_overlayAlpha;\r
-       }\r
-\r
-       void SetOverlayAlpha(double overlayAlpha)\r
-       {\r
-               m_overlayAlpha = overlayAlpha;\r
-               RefreshImages();\r
-       }\r
-\r
-       bool GetShowDifferences() const\r
-       {\r
-               return m_showDifferences;\r
-       }\r
-\r
-       void SetShowDifferences(bool visible)\r
-       {\r
-               m_showDifferences = visible;\r
-               CompareImages();\r
-       }\r
-\r
-       bool GetBlinkDifferences() const\r
-       {\r
-               return m_blinkDifferences;\r
-       }\r
-\r
-       void SetBlinkDifferences(bool blink)\r
-       {\r
-               m_blinkDifferences = blink;\r
-               RefreshImages();\r
-       }\r
-\r
-       const DiffInfo *GetDiffInfo(int diffIndex) const\r
-       {\r
-               if (diffIndex < 0 || diffIndex >= m_diffCount)\r
-                       return NULL;\r
-               return &m_diffInfos[diffIndex];\r
-       }\r
-\r
-       int  GetDiffCount() const\r
-       {\r
-               return m_diffCount;\r
-       }\r
-\r
-       int  GetConflictCount() const\r
-       {\r
-               int conflictCount = 0;\r
-               for (int i = 0; i < m_diffCount; ++i)\r
-                       if (m_diffInfos[i].op == DiffInfo::OP_DIFF)\r
-                               ++conflictCount;\r
-               return conflictCount;\r
-       }\r
-\r
-       int  GetCurrentDiffIndex() const\r
-       {\r
-               return m_currentDiffIndex;\r
-       }\r
-\r
-       bool FirstDiff()\r
-       {\r
-               int oldDiffIndex = m_currentDiffIndex;\r
-               if (m_diffCount == 0)\r
-                       m_currentDiffIndex = -1;\r
-               else\r
-                       m_currentDiffIndex = 0;\r
-               if (oldDiffIndex == m_currentDiffIndex)\r
-                       return false;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-\r
-       bool LastDiff()\r
-       {\r
-               int oldDiffIndex = m_currentDiffIndex;\r
-               m_currentDiffIndex = m_diffCount - 1;\r
-               if (oldDiffIndex == m_currentDiffIndex)\r
-                       return false;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-\r
-       bool NextDiff()\r
-       {\r
-               int oldDiffIndex = m_currentDiffIndex;\r
-               ++m_currentDiffIndex;\r
-               if (m_currentDiffIndex >= m_diffCount)\r
-                       m_currentDiffIndex = m_diffCount - 1;\r
-               if (oldDiffIndex == m_currentDiffIndex)\r
-                       return false;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-\r
-       bool PrevDiff()\r
-       {\r
-               int oldDiffIndex = m_currentDiffIndex;\r
-               if (m_diffCount == 0)\r
-                       m_currentDiffIndex = -1;\r
-               else\r
-               {\r
-                       --m_currentDiffIndex;\r
-                       if (m_currentDiffIndex < 0)\r
-                               m_currentDiffIndex = 0;\r
-               }\r
-               if (oldDiffIndex == m_currentDiffIndex)\r
-                       return false;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-\r
-       bool FirstConflict()\r
-       {\r
-               int oldDiffIndex = m_currentDiffIndex;\r
-               for (size_t i = 0; i < m_diffInfos.size(); ++i)\r
-                       if (m_diffInfos[i].op == DiffInfo::OP_DIFF)\r
-                               m_currentDiffIndex = static_cast<int>(i);\r
-               if (oldDiffIndex == m_currentDiffIndex)\r
-                       return false;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-\r
-       bool LastConflict()\r
-       {\r
-               int oldDiffIndex = m_currentDiffIndex;\r
-               for (int i = static_cast<int>(m_diffInfos.size() - 1); i >= 0; --i)\r
-               {\r
-                       if (m_diffInfos[i].op == DiffInfo::OP_DIFF)\r
-                       {\r
-                               m_currentDiffIndex = i;\r
-                               break;\r
-                       }\r
-               }\r
-               if (oldDiffIndex == m_currentDiffIndex)\r
-                       return false;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-\r
-       bool NextConflict()\r
-       {\r
-               int oldDiffIndex = m_currentDiffIndex;\r
-               for (size_t i = m_currentDiffIndex + 1; i < m_diffInfos.size(); ++i)\r
-               {\r
-                       if (m_diffInfos[i].op == DiffInfo::OP_DIFF)\r
-                       {\r
-                               m_currentDiffIndex = static_cast<int>(i);\r
-                               break;\r
-                       }\r
-               }\r
-               if (oldDiffIndex == m_currentDiffIndex)\r
-                       return false;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-\r
-       bool PrevConflict()\r
-       {\r
-               int oldDiffIndex = m_currentDiffIndex;\r
-               for (int i = m_currentDiffIndex - 1; i >= 0; --i)\r
-               {\r
-                       if (m_diffInfos[i].op == DiffInfo::OP_DIFF)\r
-                       {\r
-                               m_currentDiffIndex = i;\r
-                               break;\r
-                       }\r
-               }\r
-               if (oldDiffIndex == m_currentDiffIndex)\r
-                       return false;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-\r
-       bool SelectDiff(int diffIndex)\r
-       {\r
-               if (diffIndex == m_currentDiffIndex || diffIndex < -1 || diffIndex >= m_diffCount)\r
-                       return false;\r
-               m_currentDiffIndex = diffIndex;\r
-               RefreshImages();\r
-               return true;\r
-       }\r
-       \r
-       int  GetNextDiffIndex() const\r
-       {\r
-               if (m_diffCount == 0 || m_currentDiffIndex >= m_diffCount - 1)\r
-                       return -1;\r
-               return m_currentDiffIndex + 1;\r
-       }\r
-\r
-       int  GetPrevDiffIndex() const\r
-       {\r
-               if (m_diffCount == 0 || m_currentDiffIndex <= 0)\r
-                       return -1;\r
-               return m_currentDiffIndex - 1;\r
-       }\r
-\r
-       int  GetNextConflictIndex() const\r
-       {\r
-               for (size_t i = m_currentDiffIndex + 1; i < m_diffInfos.size(); ++i)\r
-                       if (m_diffInfos[i].op == DiffInfo::OP_DIFF)\r
-                               return static_cast<int>(i);\r
-               return -1;\r
-       }\r
-\r
-       int  GetPrevConflictIndex() const\r
-       {\r
-               for (int i = static_cast<int>(m_currentDiffIndex - 1); i >= 0; --i)\r
-                       if (m_diffInfos[i].op == DiffInfo::OP_DIFF)\r
-                               return i;\r
-               return -1;\r
-       }\r
-\r
-       void CompareImages()\r
-       {\r
-               if (m_nImages <= 1)\r
-                       return;\r
-               InitializeDiff();\r
-               if (m_nImages == 2)\r
-               {\r
-                       CompareImages2(0, 1, m_diff);\r
-                       m_diffCount = MarkDiffIndex(m_diff);\r
-               }\r
-               else if (m_nImages == 3)\r
-               {\r
-                       CompareImages2(0, 1, m_diff01);\r
-                       CompareImages2(2, 1, m_diff21);\r
-                       CompareImages2(0, 2, m_diff02);\r
-                       Make3WayDiff(m_diff01, m_diff21, m_diff);\r
-                       m_diffCount = MarkDiffIndex3way(m_diff01, m_diff21, m_diff02, m_diff);\r
-               }\r
-               if (m_currentDiffIndex >= m_diffCount)\r
-                       m_currentDiffIndex = m_diffCount - 1;\r
-               RefreshImages();\r
-       }\r
-\r
-       void RefreshImages()\r
-       {\r
-               if (m_nImages <= 1)\r
-                       return;\r
-               InitializeDiffImages();\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       CopyOriginalImageToDiffImage(i);\r
-               void (CImgDiffBuffer::*func)(int src, int dst) = NULL;\r
-               if (m_overlayMode == OVERLAY_ALPHABLEND || m_overlayMode == OVERLAY_ALPHABLEND_ANIM)\r
-                       func = &CImgDiffBuffer::AlphaBlendImages2;\r
-               else if (m_overlayMode == OVERLAY_XOR)\r
-                       func = &CImgDiffBuffer::XorImages2;\r
-               if (func)\r
-               {\r
-                       if (m_nImages == 2)\r
-                       {\r
-                               (this->*func)(1, 0);\r
-                               (this->*func)(0, 1);\r
-                       }\r
-                       else if (m_nImages == 3)\r
-                       {\r
-                               (this->*func)(1, 0);\r
-                               (this->*func)(0, 1);\r
-                               (this->*func)(2, 1);\r
-                               (this->*func)(1, 2);\r
-                       }\r
-               }\r
-               if (m_showDifferences)\r
-               {\r
-                       bool showDiff = true;\r
-                       if (m_blinkDifferences)\r
-                       {\r
-                               auto now = std::chrono::system_clock::now();\r
-                               auto tse = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch());\r
-                               if ((tse.count() % BLINK_TIME) < BLINK_TIME / 2)\r
-                               {\r
-                                       showDiff = false;\r
-                               }\r
-\r
-                       }\r
-                       if (showDiff)\r
-                       {\r
-                               for (int i = 0; i < m_nImages; ++i)\r
-                                       MarkDiff(i, m_diff);\r
-                       }\r
-               }\r
-       }\r
-\r
-       bool OpenImages(int nImages, const wchar_t * const filename[3])\r
-       {\r
-               CloseImages();\r
-               m_nImages = nImages;\r
-               for (int i = 0; i < nImages; ++i)\r
-                       m_filename[i] = filename[i];\r
-               return LoadImages();\r
-       }\r
-\r
-       virtual bool CloseImages()\r
-       {\r
-               for (int i = 0; i < m_nImages; ++i)\r
-               {\r
-                       m_imgOrig[i].clear();\r
-                       m_imgOrig32[i].clear();\r
-                       m_offset[i].x = 0;\r
-                       m_offset[i].y = 0;\r
-               }\r
-               m_nImages = 0;\r
-               return true;\r
-       }\r
-\r
-       bool SaveDiffImageAs(int pane, const wchar_t *filename)\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return false;\r
-               return !!m_imgDiff[pane].save(filename);\r
-       }\r
-\r
-       int  GetImageWidth(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return -1;\r
-               return m_imgOrig32[pane].width();\r
-       }\r
-\r
-       int  GetImageHeight(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return -1;\r
-               return m_imgOrig32[pane].height();\r
-       }\r
-\r
-       int  GetDiffImageWidth() const\r
-       {\r
-               if (m_nImages <= 0)\r
-                       return -1;\r
-               return m_imgDiff[0].width();\r
-       }\r
-\r
-       int  GetDiffImageHeight() const\r
-       {\r
-               if (m_nImages <= 0)\r
-                       return -1;\r
-               return m_imgDiff[0].height();\r
-       }\r
-\r
-       int  GetImageBitsPerPixel(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return -1;\r
-               return m_imgOrig[pane].depth();\r
-       }\r
-\r
-       int GetDiffIndexFromPoint(int x, int y) const\r
-       {\r
-               if (x > 0 && y > 0 && \r
-                       x < static_cast<int>(m_imgDiff[0].width()) &&\r
-                       y < static_cast<int>(m_imgDiff[0].height()))\r
-               {\r
-                       return m_diff(x / m_diffBlockSize, y / m_diffBlockSize) - 1;\r
-               }\r
-               return -1;\r
-       }\r
-\r
-       Image *GetImage(int pane)\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return NULL;\r
-               return &m_imgDiff[pane];\r
-       }\r
-\r
-       Image *GetDiffMapImage(unsigned w, unsigned h)\r
-       {\r
-               m_imgDiffMap.clear();\r
-               m_imgDiffMap.setSize(w, h);\r
-               if (m_nImages == 0)\r
-                       return &m_imgDiffMap;\r
-               double diffMapBlockSizeW = static_cast<double>(m_diffBlockSize) * w / m_imgDiff[0].width();\r
-               double diffMapBlockSizeH = static_cast<double>(m_diffBlockSize) * h / m_imgDiff[0].height();\r
-               for (unsigned by = 0; by < m_diff.height(); ++by)\r
-               {\r
-                       for (unsigned bx = 0; bx < m_diff.width(); ++bx)\r
-                       {\r
-                               int diffIndex = m_diff(bx, by);\r
-                               if (diffIndex != 0)\r
-                               {\r
-                                       Image::Color color = (diffIndex - 1 == m_currentDiffIndex) ? m_selDiffColor : m_diffColor;\r
-                                       unsigned bsy = static_cast<unsigned>(diffMapBlockSizeH + 1);\r
-                                       unsigned y = static_cast<unsigned>(by * diffMapBlockSizeH);\r
-                                       if (y + bsy - 1 >= h)\r
-                                               bsy = h - y;\r
-                                       for (unsigned i = 0; i < bsy; ++i)\r
-                                       {\r
-                                               unsigned y = static_cast<unsigned>(by * diffMapBlockSizeH + i);\r
-                                               unsigned char *scanline = m_imgDiffMap.scanLine(y);\r
-                                               unsigned bsx = static_cast<unsigned>(diffMapBlockSizeW + 1);\r
-                                               unsigned x = static_cast<unsigned>(bx * diffMapBlockSizeW);\r
-                                               if (x + bsx - 1 >= w)\r
-                                                       bsx = w - x;\r
-                                               for (unsigned j = 0; j < bsx; ++j)\r
-                                               {\r
-                                                       unsigned x = static_cast<unsigned>(bx * diffMapBlockSizeW + j);\r
-                                                       scanline[x * 4 + 0] = Image::valueB(color);\r
-                                                       scanline[x * 4 + 1] = Image::valueG(color);\r
-                                                       scanline[x * 4 + 2] = Image::valueR(color);\r
-                                                       scanline[x * 4 + 3] = 0xff;\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-               return &m_imgDiffMap;\r
-       }\r
-\r
-       Point<unsigned> GetImageOffset(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return Point<unsigned>();\r
-               return m_offset[pane];\r
-       }\r
-\r
-       void AddImageOffset(int pane, int dx, int dy)\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return;\r
-               int minx = INT_MAX, miny = INT_MAX;\r
-               Point<int> offset[3];\r
-               for (int i = 0; i < m_nImages; ++i)\r
-               {\r
-                       offset[i].x = m_offset[i].x;\r
-                       offset[i].y = m_offset[i].y;\r
-                       if (i == pane)\r
-                       {\r
-                               offset[i].x += dx;\r
-                               offset[i].y += dy;\r
-                       }\r
-                       if (offset[i].x < minx)\r
-                               minx = offset[i].x;\r
-                       if (offset[i].y < miny)\r
-                               miny = offset[i].y;\r
-               }\r
-               for (int i = 0; i < m_nImages; ++i)\r
-               {\r
-                       m_offset[i].x = offset[i].x - minx;\r
-                       m_offset[i].y = offset[i].y - miny;\r
-               }\r
-               CompareImages();\r
-               RefreshImages();\r
-       }\r
-\r
-protected:\r
-       bool LoadImages()\r
-       {\r
-               bool bSucceeded = true;\r
-               for (int i = 0; i < m_nImages; ++i)\r
-               {\r
-                       m_currentPage[i] = 0;\r
-                       m_imgOrigMultiPage[i].load(m_filename[i]);\r
-                       if (m_imgOrigMultiPage[i].isValid() && m_imgOrigMultiPage[i].getPageCount() > 1)\r
-                       {\r
-                               m_imgOrig[i] = m_imgOrigMultiPage[i].getImage(0);\r
-                               m_imgOrig32[i] = m_imgOrig[i];\r
-                       }\r
-                       else\r
-                       {\r
-                               m_imgOrigMultiPage[i].close();\r
-                               if (!m_imgOrig[i].load(m_filename[i]))\r
-                                       bSucceeded = false;\r
-                               m_imgOrig32[i] = m_imgOrig[i];\r
-                       }\r
-                       m_imgOrig32[i].convertTo32Bits();\r
-               }\r
-               return bSucceeded;\r
-       }\r
-\r
-       Size<unsigned> GetMaxWidthHeight()\r
-       {\r
-               unsigned wmax = 0;\r
-               unsigned hmax = 0;\r
-               for (int i = 0; i < m_nImages; ++i)\r
-               {\r
-                       wmax = (std::max)(wmax, static_cast<unsigned>(m_imgOrig32[i].width())  + m_offset[i].x);\r
-                       hmax = (std::max)(hmax, static_cast<unsigned>(m_imgOrig32[i].height()) + m_offset[i].y);\r
-               }\r
-               return Size<unsigned>(wmax, hmax);\r
-       }\r
-\r
-       void InitializeDiff()\r
-       {\r
-               Size<unsigned> size = GetMaxWidthHeight();\r
-               int nBlocksX = (size.cx + m_diffBlockSize - 1) / m_diffBlockSize;\r
-               int nBlocksY = (size.cy + m_diffBlockSize - 1) / m_diffBlockSize;\r
-\r
-               m_diff.clear();\r
-               m_diff.resize(nBlocksX, nBlocksY);\r
-               if (m_nImages == 3)\r
-               {\r
-                       m_diff01.clear();\r
-                       m_diff01.resize(nBlocksX, nBlocksY);\r
-                       m_diff21.clear();\r
-                       m_diff21.resize(nBlocksX, nBlocksY);\r
-                       m_diff02.clear();\r
-                       m_diff02.resize(nBlocksX, nBlocksY);\r
-               }\r
-               m_diffInfos.clear();\r
-       }\r
-\r
-       void InitializeDiffImages()\r
-       {\r
-               Size<unsigned> size = GetMaxWidthHeight();\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       m_imgDiff[i].setSize(size.cx, size.cy);\r
-       }\r
-\r
-       void CompareImages2(int pane1, int pane2, DiffBlocks& diff)\r
-       {\r
-               unsigned x1min = m_imgOrig32[pane1].width()  > 0 ? m_offset[pane1].x : -1;\r
-               unsigned y1min = m_imgOrig32[pane1].height() > 0 ? m_offset[pane1].y : -1;\r
-               unsigned x2min = m_imgOrig32[pane2].width()  > 0 ? m_offset[pane2].x : -1;\r
-               unsigned y2min = m_imgOrig32[pane2].height() > 0 ? m_offset[pane2].y : -1;\r
-               unsigned x1max = x1min + m_imgOrig32[pane1].width() - 1;\r
-               unsigned y1max = y1min + m_imgOrig32[pane1].height() - 1;\r
-               unsigned x2max = x2min + m_imgOrig32[pane2].width() - 1;\r
-               unsigned y2max = y2min + m_imgOrig32[pane2].height() - 1;\r
-\r
-               const unsigned wmax = (std::max)(x1max + 1, x2max + 1);\r
-               const unsigned hmax = (std::max)(y1max + 1, y2max + 1);\r
-\r
-               for (unsigned by = 0; by < diff.height(); ++by)\r
-               {\r
-                       unsigned bsy = (hmax - by * m_diffBlockSize) >= m_diffBlockSize ? m_diffBlockSize : (hmax - by * m_diffBlockSize); \r
-                       for (unsigned i = 0; i < bsy; ++i)\r
-                       {\r
-                               unsigned y = by * m_diffBlockSize + i;\r
-                               if (y < y1min || y > y1max || y < y2min || y > y2max)\r
-                               {\r
-                                       for (unsigned bx = 0; bx < diff.width(); ++bx)\r
-                                               diff(bx, by) = -1;\r
-                               }\r
-                               else\r
-                               {\r
-                                       const unsigned char *scanline1 = m_imgOrig32[pane1].scanLine(y - y1min);\r
-                                       const unsigned char *scanline2 = m_imgOrig32[pane2].scanLine(y - y2min);\r
-                                       if (x1min == x2min && x1max == x2max && m_colorDistanceThreshold == 0.0)\r
-                                       {\r
-                                               if (memcmp(scanline1, scanline2, (x2max + 1 - x1min) * 4) == 0)\r
-                                                       continue;\r
-                                       }\r
-                                       for (unsigned x = 0; x < wmax; ++x)\r
-                                       {\r
-                                               if (x < x1min || x > x1max || x < x2min || x > x2max)\r
-                                                       diff(x / m_diffBlockSize, by) = -1;\r
-                                               else\r
-                                               {\r
-                                                       if (m_colorDistanceThreshold > 0.0)\r
-                                                       {\r
-                                                               int bdist = scanline1[(x - x1min) * 4 + 0] - scanline2[(x - x2min) * 4 + 0];\r
-                                                               int gdist = scanline1[(x - x1min) * 4 + 1] - scanline2[(x - x2min) * 4 + 1];\r
-                                                               int rdist = scanline1[(x - x1min) * 4 + 2] - scanline2[(x - x2min) * 4 + 2];\r
-                                                               int adist = scanline1[(x - x1min) * 4 + 3] - scanline2[(x - x2min) * 4 + 3];\r
-                                                               int colorDistance2 = rdist * rdist + gdist * gdist + bdist * bdist + adist * adist;\r
-                                                               if (colorDistance2 > m_colorDistanceThreshold * m_colorDistanceThreshold)\r
-                                                                       diff(x / m_diffBlockSize, by) = -1;\r
-                                                       }\r
-                                                       else\r
-                                                       {\r
-                                                               if (scanline1[(x - x1min) * 4 + 0] != scanline2[(x - x2min) * 4 + 0] ||\r
-                                                                       scanline1[(x - x1min) * 4 + 1] != scanline2[(x - x2min) * 4 + 1] ||\r
-                                                                       scanline1[(x - x1min) * 4 + 2] != scanline2[(x - x2min) * 4 + 2] ||\r
-                                                                       scanline1[(x - x1min) * 4 + 3] != scanline2[(x - x2min) * 4 + 3])\r
-                                                               {\r
-                                                                       diff(x / m_diffBlockSize, by) = -1;\r
-                                                               }\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-       }\r
-               \r
-       void FloodFill8Directions(DiffBlocks& data, int x, int y, unsigned val)\r
-       {\r
-               std::vector<Point<int> > stack;\r
-               stack.push_back(Point<int>(x, y));\r
-               while (!stack.empty())\r
-               {\r
-                       const Point<int>& pt = stack.back();\r
-                       const int x = pt.x;\r
-                       const int y = pt.y;\r
-                       stack.pop_back();\r
-                       if (data(x, y) != -1)\r
-                               continue;\r
-                       data(x, y) = val;\r
-                       if (x + 1 < static_cast<int>(data.width()))\r
-                       {\r
-                               stack.push_back(Point<int>(x + 1, y));\r
-                               if (y + 1 < static_cast<int>(data.height()))\r
-                                       stack.push_back(Point<int>(x + 1, y + 1));\r
-                               if (y - 1 >= 0)\r
-                                       stack.push_back(Point<int>(x + 1, y - 1));\r
-                       }\r
-                       if (x - 1 >= 0)\r
-                       {\r
-                               stack.push_back(Point<int>(x - 1, y));\r
-                               if (y + 1 < static_cast<int>(data.height()))\r
-                                       stack.push_back(Point<int>(x - 1, y + 1));\r
-                               if (y - 1 >= 0)\r
-                                       stack.push_back(Point<int>(x - 1, y - 1));\r
-                       }\r
-                       if (y + 1 < static_cast<int>(data.height()))\r
-                               stack.push_back(Point<int>(x, y + 1));\r
-                       if (y - 1 >= 0)\r
-                               stack.push_back(Point<int>(x, y - 1));\r
-               }\r
-       }\r
-\r
-       int MarkDiffIndex(DiffBlocks& diff)\r
-       {\r
-               int diffCount = 0;\r
-               for (unsigned by = 0; by < diff.height(); ++by)\r
-               {\r
-                       for (unsigned bx = 0; bx < diff.width(); ++bx)\r
-                       {\r
-                               int idx = diff(bx, by);\r
-                               if (idx == -1)\r
-                               {\r
-                                       m_diffInfos.push_back(DiffInfo(DiffInfo::OP_DIFF, bx, by));\r
-                                       ++diffCount;\r
-                                       FloodFill8Directions(diff, bx, by, diffCount);\r
-                               }\r
-                               else if (idx != 0)\r
-                               {\r
-                                       Rect<int>& rc = m_diffInfos[idx - 1].rc;\r
-                                       if (static_cast<int>(bx) < rc.left)\r
-                                               rc.left = bx;\r
-                                       else if (static_cast<int>(bx + 1) > rc.right)\r
-                                               rc.right = bx + 1;\r
-                                       if (static_cast<int>(by) < rc.top)\r
-                                               rc.top = by;\r
-                                       else if (static_cast<int>(by + 1) > rc.bottom)\r
-                                               rc.bottom = by + 1;\r
-                               }\r
-                       }\r
-               }\r
-               return diffCount;\r
-       }\r
-\r
-       int MarkDiffIndex3way(DiffBlocks& diff01, DiffBlocks& diff21, DiffBlocks& diff02, DiffBlocks& diff3)\r
-       {\r
-               int diffCount = MarkDiffIndex(diff3);\r
-               std::vector<DiffStat> counter(m_diffInfos.size());\r
-               for (unsigned by = 0; by < diff3.height(); ++by)\r
-               {\r
-                       for (unsigned bx = 0; bx < diff3.width(); ++bx)\r
-                       {\r
-                               int diffIndex = diff3(bx, by);\r
-                               if (diffIndex == 0)\r
-                                       continue;\r
-                               --diffIndex;\r
-                               if (diff21(bx, by) == 0)\r
-                                       ++counter[diffIndex].d1;\r
-                               else if (diff02(bx, by) == 0)\r
-                                       ++counter[diffIndex].d2;\r
-                               else if (diff01(bx, by) == 0)\r
-                                       ++counter[diffIndex].d3;\r
-                               else\r
-                                       ++counter[diffIndex].detc;\r
-                       }\r
-               }\r
-               \r
-               for (size_t i = 0; i < m_diffInfos.size(); ++i)\r
-               {\r
-                       int op;\r
-                       if (counter[i].d1 != 0 && counter[i].d2 == 0 && counter[i].d3 == 0 && counter[i].detc == 0)\r
-                               op = DiffInfo::OP_1STONLY;\r
-                       else if (counter[i].d1 == 0 && counter[i].d2 != 0 && counter[i].d3 == 0 && counter[i].detc == 0)\r
-                               op = DiffInfo::OP_2NDONLY;\r
-                       else if (counter[i].d1 == 0 && counter[i].d2 == 0 && counter[i].d3 != 0 && counter[i].detc == 0)\r
-                               op = DiffInfo::OP_3RDONLY;\r
-                       else\r
-                               op = DiffInfo::OP_DIFF;\r
-                       m_diffInfos[i].op = op;\r
-               }\r
-               return diffCount;\r
-       }\r
-\r
-       void Make3WayDiff(const DiffBlocks& diff01, const DiffBlocks& diff21, DiffBlocks& diff3)\r
-       {\r
-               diff3 = diff01;\r
-               for (unsigned bx = 0; bx < diff3.width(); ++bx)\r
-               {\r
-                       for (unsigned by = 0; by < diff3.height(); ++by)\r
-                       {\r
-                               if (diff21(bx, by) != 0)\r
-                                       diff3(bx, by) = -1;\r
-                       }\r
-               }\r
-       }\r
-\r
-       void MarkDiff(int pane, const DiffBlocks& diff)\r
-       {\r
-               const unsigned w = m_imgDiff[pane].width();\r
-               const unsigned h = m_imgDiff[pane].height();\r
-\r
-               for (unsigned by = 0; by < diff.height(); ++by)\r
-               {\r
-                       for (unsigned bx = 0; bx < diff.width(); ++bx)\r
-                       {\r
-                               int diffIndex = diff(bx, by);\r
-                               if (diffIndex != 0 && (\r
-                                       (pane == 0 && m_diffInfos[diffIndex - 1].op != DiffInfo::OP_3RDONLY) ||\r
-                                       (pane == 1) ||\r
-                                       (pane == 2 && m_diffInfos[diffIndex - 1].op != DiffInfo::OP_1STONLY)\r
-                                       ))\r
-                               {\r
-                                       Image::Color color = (diffIndex - 1 == m_currentDiffIndex) ? m_selDiffColor : m_diffColor;\r
-                                       unsigned bsy = (h - by * m_diffBlockSize < m_diffBlockSize) ? (h - by * m_diffBlockSize) : m_diffBlockSize;\r
-                                       for (unsigned i = 0; i < bsy; ++i)\r
-                                       {\r
-                                               unsigned y = by * m_diffBlockSize + i;\r
-                                               unsigned char *scanline = m_imgDiff[pane].scanLine(y);\r
-                                               unsigned bsx = (w - bx * m_diffBlockSize < m_diffBlockSize) ? (w - bx * m_diffBlockSize) : m_diffBlockSize;\r
-                                               for (unsigned j = 0; j < bsx; ++j)\r
-                                               {\r
-                                                       unsigned x = bx * m_diffBlockSize + j;\r
-                                                       if (scanline[x * 4 + 3] != 0)\r
-                                                       {\r
-                                                               scanline[x * 4 + 0] = static_cast<unsigned char>(scanline[x * 4 + 0] * (1 - m_diffColorAlpha) + Image::valueB(color) * m_diffColorAlpha);\r
-                                                               scanline[x * 4 + 1] = static_cast<unsigned char>(scanline[x * 4 + 1] * (1 - m_diffColorAlpha) + Image::valueG(color) * m_diffColorAlpha);\r
-                                                               scanline[x * 4 + 2] = static_cast<unsigned char>(scanline[x * 4 + 2] * (1 - m_diffColorAlpha) + Image::valueR(color) * m_diffColorAlpha);\r
-                                                       }\r
-                                                       else\r
-                                                       {\r
-                                                               scanline[x * 4 + 0] = Image::valueB(color);\r
-                                                               scanline[x * 4 + 1] = Image::valueG(color);\r
-                                                               scanline[x * 4 + 2] = Image::valueR(color);\r
-                                                               scanline[x * 4 + 3] = static_cast<unsigned char>(0xff * m_diffColorAlpha);\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-       }\r
-\r
-       void CopyOriginalImageToDiffImage(int dst)\r
-       {\r
-               unsigned w = m_imgOrig32[dst].width();\r
-               unsigned h = m_imgOrig32[dst].height();\r
-               unsigned offset_x = m_offset[dst].x;\r
-               for (unsigned y = 0; y < h; ++y)\r
-               {\r
-                       const unsigned char *scanline_src = m_imgOrig32[dst].scanLine(y);\r
-                       unsigned char *scanline_dst = m_imgDiff[dst].scanLine(y + m_offset[dst].y);\r
-                       for (unsigned x = 0; x < w; ++x)\r
-                       {\r
-                               scanline_dst[(x + offset_x) * 4 + 0] = scanline_src[x * 4 + 0];\r
-                               scanline_dst[(x + offset_x) * 4 + 1] = scanline_src[x * 4 + 1];\r
-                               scanline_dst[(x + offset_x) * 4 + 2] = scanline_src[x * 4 + 2];\r
-                               scanline_dst[(x + offset_x) * 4 + 3] = scanline_src[x * 4 + 3];\r
-                       }\r
-               }       \r
-       }\r
-\r
-       void XorImages2(int src, int dst)\r
-       {\r
-               unsigned w = m_imgOrig32[src].width();\r
-               unsigned h = m_imgOrig32[src].height();\r
-               unsigned offset_x = m_offset[src].x;\r
-               for (unsigned y = 0; y < h; ++y)\r
-               {\r
-                       const unsigned char *scanline_src = m_imgOrig32[src].scanLine(y);\r
-                       unsigned char *scanline_dst = m_imgDiff[dst].scanLine(y + m_offset[src].y);\r
-                       for (unsigned x = 0; x < w; ++x)\r
-                       {\r
-                               scanline_dst[(x + offset_x) * 4 + 0] ^= scanline_src[x * 4 + 0];\r
-                               scanline_dst[(x + offset_x) * 4 + 1] ^= scanline_src[x * 4 + 1];\r
-                               scanline_dst[(x + offset_x) * 4 + 2] ^= scanline_src[x * 4 + 2];\r
-                       }\r
-               }       \r
-       }\r
-\r
-       void AlphaBlendImages2(int src, int dst)\r
-       {\r
-               unsigned w = m_imgOrig32[src].width();\r
-               unsigned h = m_imgOrig32[src].height();\r
-               unsigned offset_x = m_offset[src].x;\r
-               double overlayAlpha = m_overlayAlpha;\r
-               if (m_overlayMode == OVERLAY_ALPHABLEND_ANIM)\r
-               {\r
-                       auto now = std::chrono::system_clock::now();\r
-                       auto tse = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch());\r
-                       double t = (tse.count() % OVERLAY_ALPHABLEND_ANIM_TIME);\r
-                       if (t < OVERLAY_ALPHABLEND_ANIM_TIME * 2 / 10)\r
-                               overlayAlpha = t / (OVERLAY_ALPHABLEND_ANIM_TIME * 2 / 10);\r
-                       else if (t < OVERLAY_ALPHABLEND_ANIM_TIME * 5 / 10)\r
-                               overlayAlpha = 1.0;\r
-                       else if (t < OVERLAY_ALPHABLEND_ANIM_TIME * 7 / 10)\r
-                               overlayAlpha = ((OVERLAY_ALPHABLEND_ANIM_TIME * 2 / 10) - (t - (OVERLAY_ALPHABLEND_ANIM_TIME * 5 / 10)))\r
-                                             / (OVERLAY_ALPHABLEND_ANIM_TIME * 2 / 10);\r
-                       else\r
-                               overlayAlpha = 0.0;\r
-               }\r
-               for (unsigned y = 0; y < h; ++y)\r
-               {\r
-                       const unsigned char *scanline_src = m_imgOrig32[src].scanLine(y);\r
-                       unsigned char *scanline_dst = m_imgDiff[dst].scanLine(y + m_offset[src].y);\r
-                       for (unsigned x = 0; x < w; ++x)\r
-                       {\r
-                               scanline_dst[(x + offset_x) * 4 + 0] = static_cast<unsigned char>(scanline_dst[(x + offset_x) * 4 + 0] * (1 - overlayAlpha) + scanline_src[x * 4 + 0] * overlayAlpha);\r
-                               scanline_dst[(x + offset_x) * 4 + 1] = static_cast<unsigned char>(scanline_dst[(x + offset_x) * 4 + 1] * (1 - overlayAlpha) + scanline_src[x * 4 + 1] * overlayAlpha);\r
-                               scanline_dst[(x + offset_x) * 4 + 2] = static_cast<unsigned char>(scanline_dst[(x + offset_x) * 4 + 2] * (1 - overlayAlpha) + scanline_src[x * 4 + 2] * overlayAlpha);\r
-                               scanline_dst[(x + offset_x) * 4 + 3] = static_cast<unsigned char>(scanline_dst[(x + offset_x) * 4 + 3] * (1 - overlayAlpha) + scanline_src[x * 4 + 3] * overlayAlpha);\r
-                       }\r
-               }       \r
-       }\r
-\r
-       int m_nImages;\r
-       MultiPageImages m_imgOrigMultiPage[3];\r
-       Point<unsigned> m_offset[3];\r
-       Image m_imgOrig[3];\r
-       Image m_imgOrig32[3];\r
-       Image m_imgDiff[3];\r
-       Image m_imgDiffMap;\r
-       std::wstring m_filename[3];\r
-       bool m_showDifferences;\r
-       bool m_blinkDifferences;\r
-       OVERLAY_MODE m_overlayMode;\r
-       double m_overlayAlpha;\r
-       unsigned m_diffBlockSize;\r
-       Image::Color m_selDiffColor;\r
-       Image::Color m_diffColor;\r
-       double m_diffColorAlpha;\r
-       double m_colorDistanceThreshold;\r
-       int m_currentPage[3];\r
-       int m_currentDiffIndex;\r
-       int m_diffCount;\r
-       DiffBlocks m_diff, m_diff01, m_diff21, m_diff02;\r
-       std::vector<DiffInfo> m_diffInfos;\r
-};\r
diff --git a/src/ImgMergeBuffer.hpp b/src/ImgMergeBuffer.hpp
deleted file mode 100644 (file)
index 14959f9..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////\r
-//    License (GPLv2+):\r
-//    This program is free software; you can redistribute it and/or modify\r
-//    it under the terms of the GNU General Public License as published by\r
-//    the Free Software Foundation; either version 2 of the License, or\r
-//    (at your option) any later version.\r
-//\r
-//    This program is distributed in the hope that it will be useful, but\r
-//    WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//    General Public License for more details.\r
-//\r
-//    You should have received a copy of the GNU General Public License\r
-//    along with this program; if not, write to the Free Software\r
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#pragma once\r
-\r
-#include "ImgDiffBuffer.hpp"\r
-\r
-struct UndoRecord\r
-{\r
-       UndoRecord(int pane, Image *oldbitmap, Image *newbitmap, const int modcountnew[3]) : \r
-               pane(pane), oldbitmap(oldbitmap), newbitmap(newbitmap)\r
-       {\r
-               for (int i = 0; i < 3; ++i)\r
-                       modcount[i] = modcountnew[i];\r
-       }\r
-       int pane;\r
-       int modcount[3];\r
-       Image *oldbitmap, *newbitmap;\r
-};\r
-\r
-struct UndoRecords\r
-{\r
-       UndoRecords() : m_currentUndoBufIndex(-1)\r
-       {\r
-               clear();\r
-       }\r
-\r
-       ~UndoRecords()\r
-       {\r
-               clear();\r
-       }\r
-\r
-       void push_back(int pane, Image *oldbitmap, Image *newbitmap)\r
-       {\r
-               ++m_currentUndoBufIndex;\r
-               while (m_currentUndoBufIndex < static_cast<int>(m_undoBuf.size()))\r
-               {\r
-                       --m_modcount[m_undoBuf.back().pane];\r
-                       delete m_undoBuf.back().newbitmap;\r
-                       delete m_undoBuf.back().oldbitmap;\r
-                       m_undoBuf.pop_back();\r
-               }\r
-               ++m_modcount[pane];\r
-               m_undoBuf.push_back(UndoRecord(pane, oldbitmap, newbitmap, m_modcount));\r
-       }\r
-\r
-       const UndoRecord& undo()\r
-       {\r
-               if (m_currentUndoBufIndex < 0)\r
-                       throw "no undoable";\r
-               const UndoRecord& rec = m_undoBuf[m_currentUndoBufIndex];\r
-               --m_currentUndoBufIndex;\r
-               return rec;\r
-       }\r
-\r
-       const UndoRecord& redo()\r
-       {\r
-               if (m_currentUndoBufIndex >= static_cast<int>(m_undoBuf.size()) - 1)\r
-                       throw "no redoable";\r
-               ++m_currentUndoBufIndex;\r
-               const UndoRecord& rec = m_undoBuf[m_currentUndoBufIndex];\r
-               return rec;\r
-       }\r
-\r
-       bool is_modified(int pane) const\r
-       {\r
-               if (m_currentUndoBufIndex < 0)\r
-                       return (m_modcountonsave[pane] != 0);\r
-               else\r
-                       return (m_modcountonsave[pane] != m_undoBuf[m_currentUndoBufIndex].modcount[pane]);\r
-       }\r
-\r
-       void save(int pane)\r
-       {\r
-               if (m_currentUndoBufIndex < 0)\r
-                       m_modcountonsave[pane] = 0;\r
-               else\r
-                       m_modcountonsave[pane] = m_undoBuf[m_currentUndoBufIndex].modcount[pane];\r
-       }\r
-\r
-       bool undoable() const\r
-       {\r
-               return (m_currentUndoBufIndex >= 0);\r
-       }\r
-\r
-       bool redoable() const\r
-       {\r
-               return (m_currentUndoBufIndex < static_cast<int>(m_undoBuf.size()) - 1);\r
-       }\r
-\r
-       void clear()\r
-       {\r
-               m_currentUndoBufIndex = -1;\r
-               for (int i = 0; i < 3; ++i)\r
-               {\r
-                       m_modcount[i] = 0;\r
-                       m_modcountonsave[i] = 0;\r
-               }\r
-               while (!m_undoBuf.empty())\r
-               {\r
-                       delete m_undoBuf.back().newbitmap;\r
-                       delete m_undoBuf.back().oldbitmap;\r
-                       m_undoBuf.pop_back();\r
-               }\r
-       }\r
-\r
-       std::vector<UndoRecord> m_undoBuf;\r
-       int m_currentUndoBufIndex;\r
-       int m_modcount[3];\r
-       int m_modcountonsave[3];\r
-};\r
-\r
-class CImgMergeBuffer : public CImgDiffBuffer\r
-{\r
-public:\r
-       CImgMergeBuffer()\r
-       {\r
-               for (int i = 0; i < 3; ++i)\r
-                       m_bRO[i] = false;\r
-       }\r
-\r
-       virtual ~CImgMergeBuffer()\r
-       {\r
-       }\r
-\r
-       bool GetReadOnly(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return true;\r
-               return m_bRO[pane];\r
-       }\r
-\r
-       void SetReadOnly(int pane, bool readOnly)\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return;\r
-               m_bRO[pane] = readOnly;\r
-       }\r
-\r
-       void CopyDiffInternal(int diffIndex, int srcPane, int dstPane)\r
-       {\r
-               if (srcPane < 0 || srcPane >= m_nImages)\r
-                       return;\r
-               if (dstPane < 0 || dstPane >= m_nImages)\r
-                       return;\r
-               if (diffIndex < 0 || diffIndex >= m_diffCount)\r
-                       return;\r
-               if (m_bRO[dstPane])\r
-                       return;\r
-\r
-               const Rect<int>& rc = m_diffInfos[diffIndex].rc;\r
-               unsigned xmin = rc.left   * m_diffBlockSize;\r
-               if (xmin < m_offset[srcPane].x)\r
-                       xmin = m_offset[srcPane].x;\r
-               unsigned ymin = rc.top    * m_diffBlockSize;\r
-               if (ymin < m_offset[srcPane].y)\r
-                       ymin = m_offset[srcPane].y;\r
-               unsigned xmax = rc.right  * m_diffBlockSize - 1;\r
-               if (xmax >= m_imgOrig32[srcPane].width()  + m_offset[srcPane].x)\r
-                       xmax = m_imgOrig32[srcPane].width()  + m_offset[srcPane].x - 1;\r
-               unsigned ymax = rc.bottom * m_diffBlockSize - 1;\r
-               if (ymax >= m_imgOrig32[srcPane].height() + m_offset[srcPane].y)\r
-                       ymax = m_imgOrig32[srcPane].height() + m_offset[srcPane].y - 1;\r
-               unsigned dsx = 0, dsy = 0, ox = 0, oy = 0;\r
-               if (xmin < m_offset[dstPane].x)\r
-                       ox = m_offset[dstPane].x - xmin, dsx += ox;\r
-               if (ymin < m_offset[dstPane].y)\r
-                       oy = m_offset[dstPane].y - ymin, dsy += oy;\r
-               if (xmax >= m_imgOrig32[dstPane].width() + m_offset[dstPane].x)\r
-                       dsx += xmax - (m_imgOrig32[dstPane].width()  + m_offset[dstPane].x - 1);\r
-               if (ymax >= m_imgOrig32[dstPane].height() + m_offset[dstPane].y)\r
-                       dsy += ymax - (m_imgOrig32[dstPane].height() + m_offset[dstPane].y - 1);\r
-               if (dsx > 0 || dsy > 0)\r
-               {\r
-                       Image imgTemp = m_imgOrig32[dstPane];\r
-                       m_imgOrig32[dstPane].setSize(m_imgOrig32[dstPane].width() + dsx, m_imgOrig32[dstPane].height() + dsy);\r
-                       m_imgOrig32[dstPane].pasteSubImage(imgTemp, ox, oy);\r
-                       m_offset[dstPane].x -= ox;\r
-                       m_offset[dstPane].y -= oy;\r
-               }\r
-               \r
-               for (unsigned y = rc.top * m_diffBlockSize; y < rc.bottom * m_diffBlockSize; y += m_diffBlockSize)\r
-               {\r
-                       for (unsigned x = rc.left * m_diffBlockSize; x < rc.right * m_diffBlockSize; x += m_diffBlockSize)\r
-                       {\r
-                               if (m_diff(x / m_diffBlockSize, y / m_diffBlockSize) == diffIndex + 1)\r
-                               {\r
-                                       for (unsigned i = 0; i < m_diffBlockSize; ++i)\r
-                                       {\r
-                                               int sy = y + i - m_offset[srcPane].y; \r
-                                               if (sy >= 0 && sy < static_cast<int>(m_imgOrig32[srcPane].height()))\r
-                                               {\r
-                                                       const unsigned char *scanline_src = m_imgOrig32[srcPane].scanLine(sy);\r
-                                                       unsigned char *scanline_dst = m_imgOrig32[dstPane].scanLine(y + i - m_offset[dstPane].y);\r
-                                                       for (unsigned j = 0; j < m_diffBlockSize; ++j)\r
-                                                       {\r
-                                                               int sx = x + j - m_offset[srcPane].x; \r
-                                                               if (sx >= 0 && sx < static_cast<int>(m_imgOrig32[srcPane].width()))\r
-                                                                       memcpy(&scanline_dst[(x + j - m_offset[dstPane].x) * 4], &scanline_src[sx * 4], 4);\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-       }\r
-\r
-       void CopyDiff(int diffIndex, int srcPane, int dstPane)\r
-       {\r
-               if (srcPane < 0 || srcPane >= m_nImages)\r
-                       return;\r
-               if (dstPane < 0 || dstPane >= m_nImages)\r
-                       return;\r
-               if (diffIndex < 0 || diffIndex >= m_diffCount)\r
-                       return;\r
-               if (m_bRO[dstPane])\r
-                       return;\r
-               if (srcPane == dstPane)\r
-                       return;\r
-\r
-               Image *oldbitmap = new Image(m_imgOrig32[dstPane]);\r
-\r
-               CopyDiffInternal(diffIndex, srcPane, dstPane);\r
-\r
-               Image *newbitmap = new Image(m_imgOrig32[dstPane]);\r
-               m_undoRecords.push_back(dstPane, oldbitmap, newbitmap);\r
-               CompareImages();\r
-       }\r
-\r
-       void CopyDiffAll(int srcPane, int dstPane)\r
-       {\r
-               if (srcPane < 0 || srcPane >= m_nImages)\r
-                       return;\r
-               if (dstPane < 0 || dstPane >= m_nImages)\r
-                       return;\r
-               if (m_bRO[dstPane])\r
-                       return;\r
-               if (srcPane == dstPane)\r
-                       return;\r
-\r
-               Image *oldbitmap = new Image(m_imgOrig32[dstPane]);\r
-\r
-               for (int diffIndex = 0; diffIndex < m_diffCount; ++diffIndex)\r
-                       CopyDiffInternal(diffIndex, srcPane, dstPane);\r
-\r
-               Image *newbitmap = new Image(m_imgOrig32[dstPane]);\r
-               m_undoRecords.push_back(dstPane, oldbitmap, newbitmap);\r
-               CompareImages();\r
-       }\r
-\r
-       int CopyDiff3Way(int dstPane)\r
-       {\r
-               if (dstPane < 0 || dstPane >= m_nImages)\r
-                       return 0;\r
-               if (m_bRO[dstPane])\r
-                       return 0;\r
-\r
-               Image *oldbitmap = new Image(m_imgOrig32[dstPane]);\r
-\r
-               int nMerged = 0;\r
-               for (int diffIndex = 0; diffIndex < m_diffCount; ++diffIndex)\r
-               {\r
-                       int srcPane;\r
-                       switch (m_diffInfos[diffIndex].op)\r
-                       {\r
-                       case DiffInfo::OP_1STONLY:\r
-                               if (dstPane == 1)\r
-                                       srcPane = 0;\r
-                               else\r
-                                       srcPane = -1;\r
-                               break;\r
-                       case DiffInfo::OP_2NDONLY:\r
-                               if (dstPane != 1)\r
-                                       srcPane = 1;\r
-                               else\r
-                                       srcPane = -1;\r
-                               break;\r
-                       case DiffInfo::OP_3RDONLY:\r
-                               if (dstPane == 1)\r
-                                       srcPane = 2;\r
-                               else\r
-                                       srcPane = -1;\r
-                               break;\r
-                       case DiffInfo::OP_DIFF:\r
-                               srcPane = -1;\r
-                               break;\r
-                       }\r
-\r
-                       if (srcPane >= 0)\r
-                       {\r
-                               CopyDiffInternal(diffIndex, srcPane, dstPane);\r
-                               ++nMerged;\r
-                       }\r
-               }\r
-\r
-               Image *newbitmap = new Image(m_imgOrig32[dstPane]);\r
-               m_undoRecords.push_back(dstPane, oldbitmap, newbitmap);\r
-               CompareImages();\r
-\r
-               return nMerged;\r
-       }\r
-\r
-       bool IsModified(int pane) const\r
-       {\r
-               return m_undoRecords.is_modified(pane);\r
-       }\r
-\r
-       bool IsUndoable() const\r
-       {\r
-               return m_undoRecords.undoable();\r
-       }\r
-\r
-       bool IsRedoable() const\r
-       {\r
-               return m_undoRecords.redoable();\r
-       }\r
-\r
-       bool Undo()\r
-       {\r
-               if (!m_undoRecords.undoable())\r
-                       return false;\r
-               const UndoRecord& rec = m_undoRecords.undo();\r
-               m_imgOrig32[rec.pane] = *rec.oldbitmap;\r
-               CompareImages();\r
-               return true;\r
-       }\r
-\r
-       bool Redo()\r
-       {\r
-               if (!m_undoRecords.redoable())\r
-                       return false;\r
-               const UndoRecord& rec = m_undoRecords.redo();\r
-               m_imgOrig32[rec.pane] = *rec.newbitmap;\r
-               CompareImages();\r
-               return true;\r
-       }\r
-\r
-       bool SaveImage(int pane)\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return false;\r
-               if (m_bRO[pane])\r
-                       return false;\r
-               if (!m_undoRecords.is_modified(pane))\r
-                       return true;\r
-               bool result = SaveImageAs(pane, m_filename[pane].c_str());\r
-               if (result)\r
-                       m_undoRecords.save(pane);\r
-               return result;\r
-       }\r
-\r
-       bool SaveImages()\r
-       {\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       if (!SaveImage(i))\r
-                               return false;\r
-               return true;\r
-       }\r
-\r
-       bool SaveImageAs(int pane, const wchar_t *filename)\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return false;\r
-               m_imgOrig[pane].pullImageKeepingBPP(m_imgOrig32[pane]);\r
-               if (m_imgOrigMultiPage[pane].isValid())\r
-               {\r
-                       m_imgOrigMultiPage[pane].replacePage(m_currentPage[pane], m_imgOrig[pane]);\r
-                       return m_imgOrigMultiPage[pane].save(filename);\r
-               }\r
-               else\r
-               {\r
-                       return m_imgOrig[pane].save(filename);\r
-               }\r
-       }\r
-\r
-       virtual bool CloseImages()\r
-       {\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       m_undoRecords.clear();\r
-               return CImgDiffBuffer::CloseImages();\r
-       }\r
-\r
-private:\r
-       bool m_bRO[3];\r
-       UndoRecords m_undoRecords;\r
-};\r
-\r
diff --git a/src/ImgMergeWindow.hpp b/src/ImgMergeWindow.hpp
deleted file mode 100644 (file)
index 48e0afb..0000000
+++ /dev/null
@@ -1,1072 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////\r
-//    License (GPLv2+):\r
-//    This program is free software; you can redistribute it and/or modify\r
-//    it under the terms of the GNU General Public License as published by\r
-//    the Free Software Foundation; either version 2 of the License, or\r
-//    (at your option) any later version.\r
-//\r
-//    This program is distributed in the hope that it will be useful, but\r
-//    WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//    General Public License for more details.\r
-//\r
-//    You should have received a copy of the GNU General Public License\r
-//    along with this program; if not, write to the Free Software\r
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#pragma once\r
-#pragma warning(disable: 4819)\r
-\r
-#include <Windows.h>\r
-#include "FreeImagePlus.h"\r
-#include "ImgWindow.hpp"\r
-#include "ImgMergeBuffer.hpp"\r
-#include "WinIMergeLib.h"\r
-\r
-\r
-namespace\r
-{\r
-       RGBQUAD COLORREFtoRGBQUAD(COLORREF c)\r
-       {\r
-               RGBQUAD rgb;\r
-               rgb.rgbRed   = GetRValue(c);\r
-               rgb.rgbGreen = GetGValue(c);\r
-               rgb.rgbBlue  = GetBValue(c);\r
-               rgb.rgbReserved = (c >> 24);\r
-               return rgb;\r
-       }\r
-\r
-       COLORREF RGBQUADtoCOLORREF(RGBQUAD c)\r
-       {\r
-               return RGB(c.rgbRed, c.rgbGreen, c.rgbBlue) | (c.rgbReserved << 24);\r
-       }\r
-}\r
-\r
-class CImgMergeWindow : public IImgMergeWindow\r
-{\r
-       struct EventListenerInfo \r
-       {\r
-               EventListenerInfo(EventListenerFunc func, void *userdata) : func(func), userdata(userdata) {}\r
-               EventListenerFunc func;\r
-               void *userdata;\r
-       };\r
-\r
-public:\r
-       CImgMergeWindow() : \r
-                 m_nImages(0)\r
-               , m_hWnd(NULL)\r
-               , m_hInstance(NULL)\r
-               , m_nDraggingSplitter(-1)\r
-               , m_bHorizontalSplit(false)\r
-               , m_oldSplitPosX(-4)\r
-               , m_oldSplitPosY(-4)\r
-       {\r
-               for (int i = 0; i < 3; ++i)\r
-                       m_ChildWndProc[i] = NULL;\r
-       }\r
-\r
-       ~CImgMergeWindow()\r
-       {\r
-       }\r
-\r
-       bool Create(HINSTANCE hInstance, HWND hWndParent, int nID, const RECT &rc)\r
-       {\r
-               m_hInstance = hInstance;\r
-               MyRegisterClass(hInstance);\r
-               m_hWnd = CreateWindowExW(0, L"WinImgMergeWindowClass", NULL, WS_CHILD | WS_VISIBLE,\r
-                       rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hWndParent, reinterpret_cast<HMENU>(nID), hInstance, this);\r
-               return m_hWnd ? true : false;\r
-       }\r
-\r
-       bool Destroy()\r
-       {\r
-               BOOL bSucceeded = DestroyWindow(m_hWnd);\r
-               m_hWnd = NULL;\r
-               return !!bSucceeded;\r
-       }\r
-\r
-       void AddEventListener(EventListenerFunc func, void *userdata)\r
-       {\r
-               m_listener.push_back(EventListenerInfo(func, userdata));\r
-       }\r
-\r
-       const wchar_t *GetFileName(int pane)\r
-       {\r
-               return m_buffer.GetFileName(pane);\r
-       }\r
-\r
-       int GetPaneCount() const\r
-       {\r
-               return m_nImages;\r
-       }\r
-\r
-       RECT GetPaneWindowRect(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-               {\r
-                       RECT rc = {-1, -1, -1, -1};\r
-                       return rc;\r
-               }\r
-               return m_imgWindow[pane].GetWindowRect();\r
-       }\r
-\r
-       RECT GetWindowRect() const\r
-       {\r
-               RECT rc, rcParent;\r
-               HWND hwndParent = GetParent(m_hWnd);\r
-               ::GetWindowRect(hwndParent, &rcParent);\r
-               ::GetWindowRect(m_hWnd, &rc);\r
-               rc.left   -= rcParent.left;\r
-               rc.top    -= rcParent.top;\r
-               rc.right  -= rcParent.left;\r
-               rc.bottom -= rcParent.top;\r
-               return rc;\r
-       }\r
-\r
-       bool SetWindowRect(const RECT& rc)\r
-       {\r
-               MoveWindow(m_hWnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);\r
-               return true;\r
-       }\r
-\r
-       POINT GetCursorPos(int pane) const\r
-       {\r
-               POINT pt = {-1, -1};\r
-               if (pane < 0 || pane > m_nImages)\r
-                       return pt;\r
-               POINT dpt;\r
-               ::GetCursorPos(&dpt);\r
-               RECT rc;\r
-               ::GetWindowRect(m_hWnd, &rc);\r
-               RECT rcPane = GetPaneWindowRect(pane);\r
-               dpt.x -= rc.left + rcPane.left;\r
-               dpt.y -= rc.top + rcPane.top;\r
-               return m_imgWindow[pane].ConvertDPtoLP(dpt.x, dpt.y);\r
-       }\r
-\r
-       RGBQUAD GetPixelColor(int pane, int x, int y) const\r
-       {\r
-               return m_buffer.GetPixelColor(pane, x, y);\r
-       }\r
-\r
-       double GetColorDistance(int pane1, int pane2, int x, int y) const\r
-       {\r
-               return m_buffer.GetColorDistance(pane1, pane2, x, y);\r
-       }\r
-\r
-       int GetActivePane() const\r
-       {\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       if (m_imgWindow[i].IsFocused())\r
-                               return i;\r
-               return -1;\r
-       }\r
-\r
-       void SetActivePane(int pane)\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return;\r
-               m_imgWindow[pane].SetFocus();\r
-       }\r
-\r
-       bool GetReadOnly(int pane) const\r
-       {\r
-               return m_buffer.GetReadOnly(pane);\r
-       }\r
-\r
-       void SetReadOnly(int pane, bool readOnly)\r
-       {\r
-               m_buffer.SetReadOnly(pane, readOnly);\r
-       }\r
-\r
-       bool GetHorizontalSplit() const\r
-       {\r
-               return m_bHorizontalSplit;\r
-       }\r
-\r
-       void SetHorizontalSplit(bool horizontalSplit)\r
-       {\r
-               m_bHorizontalSplit = horizontalSplit;\r
-               std::vector<RECT> rects = CalcChildImgWindowRect(m_hWnd, m_nImages, m_bHorizontalSplit);\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       m_imgWindow[i].SetWindowRect(rects[i]);\r
-       }\r
-\r
-       COLORREF GetDiffColor() const\r
-       {\r
-               return RGBQUADtoCOLORREF(m_buffer.GetDiffColor());\r
-       }\r
-\r
-       void SetDiffColor(COLORREF clrDiffColor)\r
-       {\r
-               m_buffer.SetDiffColor(COLORREFtoRGBQUAD(clrDiffColor));\r
-               Invalidate();\r
-       }\r
-\r
-       COLORREF GetSelDiffColor() const\r
-       {\r
-               return RGBQUADtoCOLORREF(m_buffer.GetSelDiffColor());\r
-       }\r
-\r
-       void SetSelDiffColor(COLORREF clrSelDiffColor)\r
-       {\r
-               m_buffer.SetSelDiffColor(COLORREFtoRGBQUAD(clrSelDiffColor));\r
-               Invalidate();\r
-       }\r
-\r
-       double GetDiffColorAlpha() const\r
-       {\r
-               return m_buffer.GetDiffColorAlpha();\r
-       }\r
-\r
-       void SetDiffColorAlpha(double diffColorAlpha)\r
-       {\r
-               m_buffer.SetDiffColorAlpha(diffColorAlpha);\r
-               Invalidate();\r
-       }\r
-\r
-       RGBQUAD GetBackColor() const\r
-       {\r
-               return m_imgWindow[0].GetBackColor();\r
-       }\r
-\r
-       void SetBackColor(RGBQUAD backColor)\r
-       {\r
-               for (int i = 0; i < 3; ++i)\r
-                       m_imgWindow[i].SetBackColor(backColor);\r
-       }\r
-\r
-       bool GetUseBackColor() const\r
-       {\r
-               return m_imgWindow[0].GetUseBackColor();\r
-       }\r
-\r
-       void SetUseBackColor(bool useBackColor)\r
-       {\r
-               for (int i = 0; i < 3; ++i)\r
-                       m_imgWindow[i].SetUseBackColor(useBackColor);\r
-       }\r
-\r
-       double GetZoom() const\r
-       {\r
-               return m_imgWindow[0].GetZoom();\r
-       }\r
-\r
-       void SetZoom(double zoom)\r
-       {\r
-               for (int i = 0; i < 3; ++i)\r
-                       m_imgWindow[i].SetZoom(zoom);\r
-       }\r
-\r
-       int  GetCurrentPage(int pane) const\r
-       {\r
-               return m_buffer.GetCurrentPage(pane);\r
-       }\r
-\r
-       void SetCurrentPage(int pane, int page)\r
-       {\r
-               m_buffer.SetCurrentPage(pane, page);\r
-               Invalidate();\r
-       }\r
-\r
-       void SetCurrentPageAll(int page)\r
-       {\r
-               m_buffer.SetCurrentPageAll(page);\r
-               Invalidate();\r
-       }\r
-\r
-       int  GetCurrentMaxPage() const\r
-       {\r
-               return m_buffer.GetCurrentMaxPage();\r
-       }\r
-\r
-       int  GetPageCount(int pane) const\r
-       {\r
-               return m_buffer.GetPageCount(pane);\r
-       }\r
-\r
-       int  GetMaxPageCount() const\r
-       {\r
-               return m_buffer.GetMaxPageCount();\r
-       }\r
-\r
-       double GetColorDistanceThreshold() const\r
-       {\r
-               return m_buffer.GetColorDistanceThreshold();\r
-       }\r
-\r
-       void SetColorDistanceThreshold(double threshold)\r
-       {\r
-               m_buffer.SetColorDistanceThreshold(threshold);\r
-               Invalidate();\r
-       }\r
-\r
-       int  GetDiffBlockSize() const\r
-       {\r
-               return m_buffer.GetDiffBlockSize();\r
-       }\r
-       \r
-       void SetDiffBlockSize(int blockSize)\r
-       {\r
-               m_buffer.SetDiffBlockSize(blockSize);\r
-               Invalidate();\r
-       }\r
-\r
-       OVERLAY_MODE GetOverlayMode() const\r
-       {\r
-               return static_cast<OVERLAY_MODE>(m_buffer.GetOverlayMode());\r
-       }\r
-\r
-       void SetOverlayMode(OVERLAY_MODE overlayMode)\r
-       {\r
-               m_buffer.SetOverlayMode(static_cast<CImgMergeBuffer::OVERLAY_MODE>(overlayMode));\r
-               Invalidate();\r
-               if (overlayMode == OVERLAY_ALPHABLEND_ANIM)\r
-                       SetTimer(m_hWnd, 2, 50, NULL);\r
-               else\r
-                       KillTimer(m_hWnd, 2);\r
-       }\r
-\r
-       double GetOverlayAlpha() const\r
-       {\r
-               return m_buffer.GetOverlayAlpha();\r
-       }\r
-\r
-       void SetOverlayAlpha(double overlayAlpha)\r
-       {\r
-               m_buffer.SetOverlayAlpha(overlayAlpha);\r
-               Invalidate();\r
-       }\r
-\r
-       bool GetShowDifferences() const\r
-       {\r
-               return m_buffer.GetShowDifferences();\r
-       }\r
-\r
-       void SetShowDifferences(bool visible)\r
-       {\r
-               m_buffer.SetShowDifferences(visible);\r
-               Invalidate();\r
-       }\r
-\r
-       bool GetBlinkDifferences() const\r
-       {\r
-               return m_buffer.GetBlinkDifferences();\r
-       }\r
-\r
-       void SetBlinkDifferences(bool blink)\r
-       {\r
-               m_buffer.SetBlinkDifferences(blink);\r
-               Invalidate();\r
-               if (blink)\r
-                       SetTimer(m_hWnd, 1, 400, NULL);\r
-               else\r
-                       KillTimer(m_hWnd, 1);\r
-       }\r
-\r
-       int  GetDiffCount() const\r
-       {\r
-               return m_buffer.GetDiffCount();\r
-       }\r
-\r
-       int  GetConflictCount() const\r
-       {\r
-               return m_buffer.GetConflictCount();\r
-       }\r
-\r
-       int  GetCurrentDiffIndex() const\r
-       {\r
-               return m_buffer.GetCurrentDiffIndex();\r
-       }\r
-\r
-       bool FirstDiff()\r
-       {\r
-               bool result = m_buffer.FirstDiff();\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-\r
-       bool LastDiff()\r
-       {\r
-               bool result = m_buffer.LastDiff();\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-\r
-       bool NextDiff()\r
-       {\r
-               bool result = m_buffer.NextDiff();\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-\r
-       bool PrevDiff()\r
-       {\r
-               bool result = m_buffer.PrevDiff();\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-\r
-       bool FirstConflict()\r
-       {\r
-               bool result = m_buffer.FirstConflict();\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-\r
-       bool LastConflict()\r
-       {\r
-               bool result = m_buffer.LastConflict();\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-\r
-       bool NextConflict()\r
-       {\r
-               bool result = m_buffer.NextConflict();\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-\r
-       bool PrevConflict()\r
-       {\r
-               bool result = m_buffer.PrevConflict();\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-\r
-       bool SelectDiff(int diffIndex)\r
-       {\r
-               bool result = m_buffer.SelectDiff(diffIndex);\r
-               if (result)\r
-                       ScrollToDiff(m_buffer.GetCurrentDiffIndex());\r
-               return result;\r
-       }\r
-       \r
-       int  GetNextDiffIndex() const\r
-       {\r
-               return m_buffer.GetNextDiffIndex();\r
-       }\r
-\r
-       int  GetPrevDiffIndex() const\r
-       {\r
-               return m_buffer.GetPrevDiffIndex();\r
-       }\r
-\r
-       int  GetNextConflictIndex() const\r
-       {\r
-               return m_buffer.GetNextConflictIndex();\r
-       }\r
-\r
-       int  GetPrevConflictIndex() const\r
-       {\r
-               return m_buffer.GetPrevConflictIndex();\r
-       }\r
-\r
-       void CopyDiff(int diffIndex, int srcPane, int dstPane)\r
-       {\r
-               m_buffer.CopyDiff(diffIndex, srcPane, dstPane);\r
-               Invalidate();\r
-       }\r
-\r
-       void CopyDiffAll(int srcPane, int dstPane)\r
-       {\r
-               m_buffer.CopyDiffAll(srcPane, dstPane);\r
-               Invalidate();\r
-       }\r
-\r
-       int CopyDiff3Way(int dstPane)\r
-       {\r
-               int result = m_buffer.CopyDiff3Way(dstPane);\r
-               Invalidate();\r
-               return result;\r
-       }\r
-\r
-       bool IsModified(int pane) const\r
-       {\r
-               return m_buffer.IsModified(pane);\r
-       }\r
-\r
-       bool IsUndoable() const\r
-       {\r
-               return m_buffer.IsUndoable();\r
-       }\r
-\r
-       bool IsRedoable() const\r
-       {\r
-               return m_buffer.IsRedoable();\r
-       }\r
-\r
-       bool Undo()\r
-       {\r
-               bool result = m_buffer.Undo();\r
-               if (result)\r
-                       Invalidate();\r
-               return result;\r
-       }\r
-\r
-       bool Redo()\r
-       {\r
-               bool result = m_buffer.Redo();\r
-               if (result)\r
-                       Invalidate();\r
-               return result;\r
-       }\r
-\r
-       void ScrollToDiff(int diffIndex)\r
-       {\r
-               if (diffIndex >= 0 && diffIndex < m_buffer.GetDiffCount())\r
-               {\r
-                       Rect<int> rc = m_buffer.GetDiffInfo(diffIndex)->rc;\r
-                       for (int i = 0; i < m_nImages; ++i)\r
-                               m_imgWindow[i].ScrollTo(rc.left * m_buffer.GetDiffBlockSize(), rc.top * m_buffer.GetDiffBlockSize());\r
-               }\r
-               else\r
-               {\r
-                       for (int i = 0; i < m_nImages; ++i)\r
-                               m_imgWindow[i].Invalidate();\r
-               }\r
-\r
-               Event evt;\r
-               evt.eventType = SCROLLTODIFF;\r
-               evt.diffIndex = diffIndex;\r
-               notify(evt);\r
-       }\r
-\r
-       void ScrollTo(int x, int y, bool force = false)\r
-       {\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       m_imgWindow[i].ScrollTo(x, y, force);\r
-               Event evt;\r
-               evt.eventType = VSCROLL;\r
-               notify(evt);\r
-               evt.eventType = HSCROLL;\r
-               notify(evt);\r
-       }\r
-\r
-       void Invalidate(bool erase = false)\r
-       {\r
-               if (m_nImages <= 1)\r
-                       return;\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       m_imgWindow[i].Invalidate(erase);\r
-\r
-               Event evt;\r
-               evt.eventType = REFRESH;\r
-               notify(evt);\r
-       }\r
-\r
-       bool OpenImages(int nImages, const wchar_t * const filename[3])\r
-       {\r
-               CloseImages();\r
-               m_nImages = nImages;\r
-               bool bSucceeded = m_buffer.OpenImages(nImages, filename);\r
-               for (int i = 0; i < nImages; ++i)\r
-               {\r
-                       m_imgWindow[i].Create(m_hInstance, m_hWnd);\r
-                       m_ChildWndProc[i] = (WNDPROC)SetWindowLongPtr(m_imgWindow[i].GetHWND(), GWLP_WNDPROC, (LONG_PTR)&ChildWndProc);\r
-               }\r
-               m_buffer.CompareImages();\r
-               std::vector<RECT> rects = CalcChildImgWindowRect(m_hWnd, nImages, m_bHorizontalSplit);\r
-               for (int i = 0; i < nImages; ++i)\r
-               {\r
-                       m_imgWindow[i].SetWindowRect(rects[i]);\r
-                       m_imgWindow[i].SetImage(m_buffer.GetImage(i)->getFipImage());\r
-               }\r
-\r
-               Event evt;\r
-               evt.eventType = OPEN;\r
-               notify(evt);\r
-\r
-               return bSucceeded;\r
-       }\r
-\r
-       bool OpenImages(const wchar_t *filename1, const wchar_t *filename2)\r
-       {\r
-               const wchar_t *filenames[] = {filename1, filename2};\r
-               return OpenImages(2, filenames);\r
-       }\r
-\r
-       bool OpenImages(const wchar_t *filename1, const wchar_t *filename2, const wchar_t *filename3)\r
-       {\r
-               const wchar_t *filenames[] = {filename1, filename2, filename3};\r
-               return OpenImages(3, filenames);\r
-       }\r
-\r
-       bool ReloadImages()\r
-       {\r
-               if (m_nImages == 2)\r
-                       return OpenImages(m_buffer.GetFileName(0), m_buffer.GetFileName(1));\r
-               else if (m_nImages == 3)\r
-                       return OpenImages(m_buffer.GetFileName(0), m_buffer.GetFileName(1), m_buffer.GetFileName(2));\r
-               return false;\r
-       }\r
-\r
-       bool SaveImage(int pane)\r
-       {\r
-               return m_buffer.SaveImage(pane);\r
-       }\r
-\r
-       bool SaveImages()\r
-       {\r
-               return m_buffer.SaveImages();\r
-       }\r
-\r
-       bool SaveImageAs(int pane, const wchar_t *filename)\r
-       {\r
-               return m_buffer.SaveImageAs(pane, filename);\r
-       }\r
-\r
-       bool CloseImages()\r
-       {\r
-               m_buffer.CloseImages();\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       m_imgWindow[i].Destroy();\r
-               return true;\r
-       }\r
-\r
-       bool SaveDiffImageAs(int pane, const wchar_t *filename)\r
-       {\r
-               return m_buffer.SaveDiffImageAs(pane, filename);\r
-       }\r
-\r
-       HWND GetPaneHWND(int pane) const\r
-       {\r
-               if (pane < 0 || pane >= m_nImages)\r
-                       return NULL;\r
-               return m_imgWindow[pane].GetHWND();\r
-       }\r
-\r
-       HWND GetHWND() const\r
-       {\r
-               return m_hWnd;\r
-       }\r
-\r
-       int  GetImageWidth(int pane) const\r
-       {\r
-               return m_buffer.GetImageWidth(pane);\r
-       }\r
-\r
-       int  GetImageHeight(int pane) const\r
-       {\r
-               return m_buffer.GetImageHeight(pane);\r
-       }\r
-\r
-       int  GetDiffImageWidth() const\r
-       {\r
-               return m_buffer.GetDiffImageWidth();\r
-       }\r
-\r
-       int  GetDiffImageHeight() const\r
-       {\r
-               return m_buffer.GetDiffImageHeight();\r
-       }\r
-\r
-       int  GetImageBitsPerPixel(int pane) const\r
-       {\r
-               return m_buffer.GetImageBitsPerPixel(pane);\r
-       }\r
-\r
-       int GetDiffIndexFromPoint(int x, int y) const\r
-       {\r
-               return m_buffer.GetDiffIndexFromPoint(x, y);\r
-       }\r
-\r
-       POINT GetImageOffset(int pane) const\r
-       {\r
-               Point<unsigned> pt = m_buffer.GetImageOffset(pane);\r
-               POINT pt2 = {pt.x, pt.y};\r
-               return pt2;\r
-       }\r
-\r
-       void AddImageOffset(int pane, int dx, int dy)\r
-       {\r
-               m_buffer.AddImageOffset(pane, dx, dy);\r
-               Invalidate();\r
-       }\r
-\r
-       Image *GetImage(int pane)\r
-       {\r
-               return m_buffer.GetImage(pane);\r
-       }\r
-\r
-       Image *GetDiffMapImage(unsigned w, unsigned h)\r
-       {\r
-               return m_buffer.GetDiffMapImage(w, h);\r
-       }\r
-\r
-private:\r
-\r
-       ATOM MyRegisterClass(HINSTANCE hInstance)\r
-       {\r
-               WNDCLASSEXW wcex = {0};\r
-               wcex.cbSize         = sizeof(WNDCLASSEX); \r
-               wcex.style                      = CS_HREDRAW | CS_VREDRAW;\r
-               wcex.lpfnWndProc        = (WNDPROC)CImgMergeWindow::WndProc;\r
-               wcex.cbClsExtra         = 0;\r
-               wcex.cbWndExtra         = 0;\r
-               wcex.hInstance          = hInstance;\r
-               wcex.hCursor        = LoadCursor (NULL, IDC_ARROW);\r
-               wcex.hbrBackground  = (HBRUSH)(COLOR_3DFACE+1);\r
-               wcex.lpszClassName      = L"WinImgMergeWindowClass";\r
-               return RegisterClassExW(&wcex);\r
-       }\r
-\r
-       std::vector<RECT> CalcChildImgWindowRect(HWND hWnd, int nImages, bool bHorizontalSplit)\r
-       {\r
-               std::vector<RECT> childrects;\r
-               RECT rcParent;\r
-               GetClientRect(hWnd, &rcParent);\r
-               RECT rc = rcParent;\r
-               if (!bHorizontalSplit)\r
-               {\r
-                       int width = (rcParent.left + rcParent.right) / (nImages > 0 ? nImages : 1) - 2;\r
-                       rc.left = 0;\r
-                       rc.right = rc.left + width;\r
-                       for (int i = 0; i < nImages - 1; ++i)\r
-                       {\r
-                               childrects.push_back(rc);\r
-                               rc.left  = rc.right + 2 * 2;\r
-                               rc.right = rc.left  + width;\r
-                       }\r
-                       rc.right = rcParent.right;\r
-                       rc.left  = rc.right - width;\r
-                       childrects.push_back(rc);\r
-               }\r
-               else\r
-               {\r
-                       int height = (rcParent.top + rcParent.bottom) / (nImages > 0 ? nImages : 1) - 2;\r
-                       rc.top = 0;\r
-                       rc.bottom = rc.top + height;\r
-                       for (int i = 0; i < nImages - 1; ++i)\r
-                       {\r
-                               childrects.push_back(rc);\r
-                               rc.top    = rc.bottom + 2 * 2;\r
-                               rc.bottom = rc.top    + height;\r
-                       }\r
-                       rc.bottom = rcParent.bottom;\r
-                       rc.top    = rc.bottom - height;\r
-                       childrects.push_back(rc);\r
-               }\r
-               return childrects;\r
-       }\r
-\r
-       void MoveSplitter(int x, int y)\r
-       {\r
-               RECT rcParent;\r
-               GetClientRect(m_hWnd, &rcParent);\r
-\r
-               RECT rc[3];\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       rc[i] = m_imgWindow[i].GetWindowRect();\r
-\r
-               if (!m_bHorizontalSplit)\r
-               {\r
-                       int minx = rc[m_nDraggingSplitter].left + 32; \r
-                       int maxx = rc[m_nDraggingSplitter + 1].right - 32; \r
-                       if (x < minx)\r
-                               rc[m_nDraggingSplitter].right = minx;\r
-                       else if (x > maxx)\r
-                               rc[m_nDraggingSplitter].right = maxx;\r
-                       else\r
-                               rc[m_nDraggingSplitter].right = x;\r
-                       for (int i = m_nDraggingSplitter + 1; i < m_nImages; ++i)\r
-                       {\r
-                               int width   = rc[i].right - rc[i].left;\r
-                               rc[i].left  = rc[i - 1].right + 2 * 2;\r
-                               rc[i].right = rc[i].left + width;\r
-                       }\r
-                       rc[m_nImages - 1].right = rcParent.right;\r
-               }\r
-               else\r
-               {\r
-                       rc[m_nDraggingSplitter].bottom = y;\r
-                       int miny = rc[m_nDraggingSplitter].top + 32; \r
-                       int maxy = rc[m_nDraggingSplitter + 1].bottom - 32; \r
-                       if (y < miny)\r
-                               rc[m_nDraggingSplitter].bottom = miny;\r
-                       else if (y > maxy)\r
-                               rc[m_nDraggingSplitter].bottom = maxy;\r
-                       else\r
-                               rc[m_nDraggingSplitter].bottom = y;\r
-                       for (int i = m_nDraggingSplitter + 1; i < m_nImages; ++i)\r
-                       {\r
-                               int height    = rc[i].bottom - rc[i].top;\r
-                               rc[i].top    = rc[i - 1].bottom + 2 * 2;\r
-                               rc[i].bottom = rc[i].top + height;\r
-                       }\r
-                       rc[m_nImages - 1].bottom = rcParent.bottom;\r
-               }\r
-\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       m_imgWindow[i].SetWindowRect(rc[i]);\r
-       }\r
-\r
-       void DrawXorBar(HDC hdc, int x1, int y1, int width, int height)\r
-       {\r
-               static WORD _dotPatternBmp[8] = \r
-               { \r
-                       0x00aa, 0x0055, 0x00aa, 0x0055, \r
-                       0x00aa, 0x0055, 0x00aa, 0x0055\r
-               };\r
-\r
-               HBITMAP hbm;\r
-               HBRUSH  hbr, hbrushOld;\r
-\r
-               hbm = CreateBitmap(8, 8, 1, 1, _dotPatternBmp);\r
-               hbr = CreatePatternBrush(hbm);\r
-               \r
-               SetBrushOrgEx(hdc, x1, y1, 0);\r
-               hbrushOld = (HBRUSH)SelectObject(hdc, hbr);\r
-               \r
-               PatBlt(hdc, x1, y1, width, height, PATINVERT);\r
-               \r
-               SelectObject(hdc, hbrushOld);\r
-               \r
-               DeleteObject(hbr);\r
-               DeleteObject(hbm);\r
-       }\r
-\r
-       void OnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct)\r
-       {\r
-       }\r
-\r
-       void OnSize(UINT nType, int cx, int cy)\r
-       {\r
-               std::vector<RECT> rects = CalcChildImgWindowRect(m_hWnd, m_nImages, m_bHorizontalSplit);\r
-               for (int i = 0; i < m_nImages; ++i)\r
-                       m_imgWindow[i].SetWindowRect(rects[i]);\r
-       }\r
-       \r
-       void OnLButtonDown(UINT nFlags, int x, int y)\r
-       {\r
-               int i;\r
-               for (i = 0; i < m_nImages - 1; ++i)\r
-               {\r
-                       if (!m_bHorizontalSplit)\r
-                       {\r
-                               if (x < m_imgWindow[i + 1].GetWindowRect().left)\r
-                                       break;\r
-                       }\r
-                       else\r
-                       {\r
-                               if (y < m_imgWindow[i + 1].GetWindowRect().top)\r
-                                       break;\r
-                       }\r
-               }\r
-               m_oldSplitPosX = -4;\r
-               m_oldSplitPosY = -4;\r
-               m_nDraggingSplitter = i;\r
-               SetCapture(m_hWnd);\r
-       }\r
-\r
-       void OnLButtonUp(UINT nFlags, int x, int y)\r
-       {\r
-               if (m_nDraggingSplitter == -1)\r
-                       return;\r
-               ReleaseCapture();\r
-               HDC hdc = GetWindowDC(m_hWnd);\r
-               if (!m_bHorizontalSplit)\r
-                       DrawXorBar(hdc, m_oldSplitPosX - 2, 1, 4, m_imgWindow[0].GetWindowRect().bottom);\r
-               else\r
-                       DrawXorBar(hdc, 1, m_oldSplitPosY - 2, m_imgWindow[0].GetWindowRect().right, 4);\r
-               ReleaseDC(m_hWnd, hdc);\r
-               MoveSplitter(x, y);\r
-               m_nDraggingSplitter = -1;\r
-       }\r
-\r
-       void OnMouseMove(UINT nFlags, int x, int y)\r
-       {\r
-               if (m_nImages < 2)\r
-                       return;\r
-               SetCursor(LoadCursor(NULL, m_bHorizontalSplit ? IDC_SIZENS : IDC_SIZEWE));\r
-               if (m_nDraggingSplitter == -1)\r
-                       return;\r
-               HDC hdc = GetWindowDC(m_hWnd);\r
-               if (!m_bHorizontalSplit)\r
-               {\r
-                       DrawXorBar(hdc, m_oldSplitPosX - 2, 1, 4, m_imgWindow[0].GetWindowRect().bottom);\r
-                       DrawXorBar(hdc, x              - 2, 1, 4, m_imgWindow[0].GetWindowRect().bottom);\r
-               }\r
-               else\r
-               {\r
-                       DrawXorBar(hdc, 1, m_oldSplitPosY - 2, m_imgWindow[0].GetWindowRect().right, 4);        \r
-                       DrawXorBar(hdc, 1, y              - 2, m_imgWindow[0].GetWindowRect().right, 4);        \r
-               }\r
-               m_oldSplitPosX = x;\r
-               m_oldSplitPosY = y;\r
-               ReleaseDC(m_hWnd, hdc);\r
-       }\r
-\r
-       void OnDestroy()\r
-       {\r
-               for (int i = 0; i < m_nImages; ++i)\r
-               {\r
-                       if (m_ChildWndProc[i])\r
-                       {\r
-                               SetWindowLongPtr(m_imgWindow[i].GetHWND(), GWLP_WNDPROC, (LONG_PTR)m_ChildWndProc[i]);\r
-                               m_ChildWndProc[i] = NULL;\r
-                       }\r
-               }\r
-       }\r
-\r
-       LRESULT OnWndMsg(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)\r
-       {\r
-               switch (iMsg)\r
-               {\r
-               case WM_CREATE:\r
-                       OnCreate(hwnd, (LPCREATESTRUCT)lParam);\r
-                       break;\r
-               case WM_COMMAND:\r
-                       PostMessage(GetParent(m_hWnd), iMsg, wParam, lParam);\r
-                       break;\r
-               case WM_SIZE:\r
-                       OnSize((UINT)wParam, LOWORD(lParam), HIWORD(lParam));\r
-                       break;\r
-               case WM_LBUTTONDOWN:\r
-                       OnLButtonDown((UINT)(wParam), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam));\r
-                       break;\r
-               case WM_LBUTTONUP:\r
-                       OnLButtonUp((UINT)(wParam), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam));\r
-                       break;\r
-               case WM_MOUSEMOVE:\r
-                       OnMouseMove((UINT)(wParam), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam));\r
-                       break;\r
-               case WM_MOUSEWHEEL:\r
-                       PostMessage(m_imgWindow[0].GetHWND(), iMsg, wParam, lParam);\r
-                       break;\r
-               case WM_TIMER:\r
-                       m_buffer.RefreshImages();\r
-                       if (m_nImages <= 1)\r
-                               break;\r
-                       for (int i = 0; i < m_nImages; ++i)\r
-                               m_imgWindow[i].Invalidate(false);\r
-                       break;\r
-               case WM_DESTROY:\r
-                       OnDestroy();\r
-                       break;\r
-               default:\r
-                       return DefWindowProc(hwnd, iMsg, wParam, lParam);\r
-               }\r
-               return 0;\r
-       }\r
-\r
-       void notify(const Event &evt)\r
-       {\r
-               Event evt2 = evt;\r
-               std::vector<EventListenerInfo>::iterator it;\r
-               for (it = m_listener.begin(); it != m_listener.end(); ++it)\r
-               {\r
-                       evt2.userdata = (*it).userdata;\r
-                       (*it).func(evt2);\r
-               }\r
-       }\r
-\r
-       static LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)\r
-       {\r
-               if (iMsg == WM_NCCREATE)\r
-                       SetWindowLongPtr(hwnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(reinterpret_cast<LPCREATESTRUCT>(lParam)->lpCreateParams));\r
-               CImgMergeWindow *pImgWnd = reinterpret_cast<CImgMergeWindow *>(GetWindowLongPtr(hwnd, GWLP_USERDATA));\r
-               LRESULT lResult = pImgWnd->OnWndMsg(hwnd, iMsg, wParam, lParam);\r
-               return lResult;\r
-       }\r
-\r
-       static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)\r
-       {\r
-               Event evt;\r
-               int i;\r
-               CImgMergeWindow *pImgWnd = reinterpret_cast<CImgMergeWindow *>(GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA));\r
-               for (i = 0; i < pImgWnd->m_nImages; ++i)\r
-                       if (pImgWnd->m_imgWindow[i].GetHWND() == hwnd)\r
-                               break;\r
-               evt.pane = i;\r
-               evt.flags = (unsigned)wParam; \r
-               evt.x = (int)(short)LOWORD(lParam);\r
-               evt.y = (int)(short)HIWORD(lParam);\r
-               switch(iMsg)\r
-               {\r
-               case WM_LBUTTONDOWN:\r
-                       evt.eventType = LBUTTONDOWN; goto NEXT;\r
-               case WM_LBUTTONUP:\r
-                       evt.eventType = LBUTTONUP; goto NEXT;\r
-               case WM_LBUTTONDBLCLK:\r
-                       evt.eventType = LBUTTONDBLCLK; goto NEXT;\r
-               case WM_RBUTTONDOWN:\r
-                       evt.eventType = RBUTTONDOWN; goto NEXT;\r
-               case WM_RBUTTONUP:\r
-                       evt.eventType = RBUTTONUP; goto NEXT;\r
-               case WM_RBUTTONDBLCLK:\r
-                       evt.eventType = RBUTTONDBLCLK; goto NEXT;\r
-               case WM_MOUSEMOVE:\r
-                       evt.eventType = MOUSEMOVE; goto NEXT;\r
-               case WM_MOUSEWHEEL:\r
-                       evt.flags = GET_KEYSTATE_WPARAM(wParam);\r
-                       evt.eventType = MOUSEWHEEL;\r
-                       evt.delta = GET_WHEEL_DELTA_WPARAM(wParam);\r
-                       goto NEXT;\r
-               case WM_KEYDOWN:\r
-                       evt.eventType = KEYDOWN; evt.keycode = static_cast<int>(wParam); goto NEXT;\r
-               case WM_KEYUP:\r
-                       evt.eventType = KEYUP; evt.keycode = static_cast<int>(wParam); goto NEXT;\r
-               case WM_CONTEXTMENU:\r
-                       evt.eventType = CONTEXTMENU; goto NEXT;\r
-               case WM_SIZE:\r
-                       evt.eventType = SIZE; evt.width = LOWORD(lParam); evt.height = HIWORD(wParam); goto NEXT;\r
-               case WM_HSCROLL:\r
-                       evt.eventType = HSCROLL;goto NEXT;\r
-               case WM_VSCROLL:\r
-                       evt.eventType = VSCROLL; goto NEXT;\r
-               case WM_SETFOCUS:\r
-                       evt.eventType = SETFOCUS; goto NEXT;\r
-               case WM_KILLFOCUS:\r
-                       evt.eventType = KILLFOCUS; goto NEXT;\r
-               NEXT:\r
-                       pImgWnd->notify(evt);\r
-                       break;\r
-               }\r
-               switch (iMsg)\r
-               {\r
-               case WM_LBUTTONDBLCLK:\r
-               {\r
-                       POINT pt = pImgWnd->GetCursorPos(i);\r
-                       int diffIndex = pImgWnd->GetDiffIndexFromPoint(pt.x, pt.y);\r
-                       if (diffIndex >= 0)\r
-                               pImgWnd->SelectDiff(diffIndex);\r
-                       else\r
-                               pImgWnd->SelectDiff(-1);\r
-                       break;\r
-               }\r
-               case WM_HSCROLL:\r
-               case WM_VSCROLL:\r
-               case WM_MOUSEWHEEL:\r
-                       for (int j = 0; j < pImgWnd->m_nImages; ++j)\r
-                       {\r
-                               if (j != i)\r
-                                       (pImgWnd->m_ChildWndProc[j])(pImgWnd->m_imgWindow[j].GetHWND(), iMsg, wParam, lParam);\r
-                       }\r
-                       break;\r
-               }\r
-               return (pImgWnd->m_ChildWndProc[i])(hwnd, iMsg, wParam, lParam);\r
-       }\r
-\r
-       int m_nImages;\r
-       HWND m_hWnd;\r
-       HINSTANCE m_hInstance;\r
-       CImgWindow m_imgWindow[3];\r
-       WNDPROC m_ChildWndProc[3];\r
-       std::vector<EventListenerInfo> m_listener;\r
-       int m_nDraggingSplitter;\r
-       bool m_bHorizontalSplit;\r
-       int m_oldSplitPosX;\r
-       int m_oldSplitPosY;\r
-       CImgMergeBuffer m_buffer;\r
-};\r
diff --git a/src/ImgToolWindow.hpp b/src/ImgToolWindow.hpp
deleted file mode 100644 (file)
index 79b41df..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-#include <WindowsX.h>\r
-#include <CommCtrl.h>\r
-#include <tchar.h>\r
-#include "ImgMergeWindow.hpp"\r
-#include "WinIMergeLib.h"\r
-#include "resource.h"\r
-\r
-#pragma once\r
-\r
-class CImgToolWindow : public IImgToolWindow\r
-{\r
-public:\r
-       CImgToolWindow() :\r
-                 m_hWnd(NULL)\r
-               , m_hInstance(NULL)\r
-               , m_pImgMergeWindow(NULL)\r
-       {\r
-       }\r
-\r
-       ~CImgToolWindow()\r
-       {\r
-       }\r
-\r
-       bool Create(HINSTANCE hInstance, HWND hWndParent)\r
-       {\r
-               m_hInstance = hInstance;\r
-               m_hWnd = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_DIALOGBAR), hWndParent, DlgProc, reinterpret_cast<LPARAM>(this));\r
-               return m_hWnd ? true : false;\r
-       }\r
-\r
-       bool Destroy()\r
-       {\r
-               BOOL bSucceeded = DestroyWindow(m_hWnd);\r
-               m_hWnd = NULL;\r
-               return !!bSucceeded;\r
-       }\r
-\r
-       HWND GetHWND() const\r
-       {\r
-               return m_hWnd;\r
-       }\r
-\r
-       void Sync()\r
-       {\r
-               if (!m_pImgMergeWindow)\r
-                       return;\r
-               TCHAR buf[256];\r
-               wsprintf(buf, _T("(%d)"), m_pImgMergeWindow->GetDiffBlockSize());\r
-               SetDlgItemText(m_hWnd, IDC_DIFF_BLOCKSIZE_STATIC, buf);\r
-               wsprintf(buf, _T("(%d)"), static_cast<int>(m_pImgMergeWindow->GetDiffColorAlpha() * 100));\r
-               SetDlgItemText(m_hWnd, IDC_DIFF_BLOCKALPHA_STATIC, buf);\r
-               wsprintf(buf, _T("(%d)"), static_cast<int>(m_pImgMergeWindow->GetColorDistanceThreshold()));\r
-               SetDlgItemText(m_hWnd, IDC_DIFF_CDTHRESHOLD_STATIC, buf);\r
-               wsprintf(buf, _T("(%d)"), static_cast<int>(m_pImgMergeWindow->GetOverlayAlpha() * 100));\r
-               SetDlgItemText(m_hWnd, IDC_OVERLAY_ALPHA_STATIC, buf);\r
-               wsprintf(buf, _T("(%d%%)"), static_cast<int>(100 * m_pImgMergeWindow->GetZoom()));\r
-               SetDlgItemText(m_hWnd, IDC_ZOOM_STATIC, buf);\r
-\r
-               SendDlgItemMessage(m_hWnd, IDC_DIFF_HIGHLIGHT, BM_SETCHECK, m_pImgMergeWindow->GetShowDifferences() ? BST_CHECKED : BST_UNCHECKED, 0);\r
-               SendDlgItemMessage(m_hWnd, IDC_DIFF_BLOCKSIZE_SLIDER, TBM_SETPOS, TRUE, m_pImgMergeWindow->GetDiffBlockSize());\r
-               SendDlgItemMessage(m_hWnd, IDC_DIFF_BLOCKALPHA_SLIDER, TBM_SETPOS, TRUE, static_cast<LPARAM>(m_pImgMergeWindow->GetDiffColorAlpha() * 100));\r
-               SendDlgItemMessage(m_hWnd, IDC_DIFF_CDTHRESHOLD_SLIDER, TBM_SETPOS, TRUE, static_cast<LPARAM>(m_pImgMergeWindow->GetColorDistanceThreshold()));\r
-               SendDlgItemMessage(m_hWnd, IDC_OVERLAY_ALPHA_SLIDER, TBM_SETPOS, TRUE, static_cast<LPARAM>(m_pImgMergeWindow->GetOverlayAlpha() * 100));\r
-               SendDlgItemMessage(m_hWnd, IDC_ZOOM_SLIDER, TBM_SETPOS, TRUE, static_cast<LPARAM>(m_pImgMergeWindow->GetZoom() * 8 - 8));\r
-               SendDlgItemMessage(m_hWnd, IDC_OVERLAY_MODE, CB_SETCURSEL, m_pImgMergeWindow->GetOverlayMode(), 0);\r
-               SendDlgItemMessage(m_hWnd, IDC_PAGE_SPIN, UDM_SETRANGE, 0, MAKELONG(1, m_pImgMergeWindow->GetMaxPageCount()));\r
-               SendDlgItemMessage(m_hWnd, IDC_PAGE_SPIN, UDM_SETPOS, 0, MAKELONG(m_pImgMergeWindow->GetCurrentMaxPage() + 1, 0));\r
-\r
-               int w = static_cast<CImgMergeWindow *>(m_pImgMergeWindow)->GetDiffImageWidth();\r
-               int h = static_cast<CImgMergeWindow *>(m_pImgMergeWindow)->GetDiffImageHeight();\r
-\r
-               RECT rc;\r
-               GetClientRect(m_hWnd, &rc);\r
-               int cx = rc.right - rc.left;\r
-               int cy = rc.bottom - rc.top;\r
-\r
-               RECT rcTmp;\r
-               HWND hwndDiffMap = GetDlgItem(m_hWnd, IDC_DIFFMAP);\r
-               GetWindowRect(hwndDiffMap, &rcTmp);\r
-               POINT pt = { rcTmp.left, rcTmp.top };\r
-               ScreenToClient(m_hWnd, &pt);\r
-               int mh = h * (cx - 8) / w;\r
-               if (mh + pt.y > cy - 8)\r
-                       mh = cy - 8 - pt.y;\r
-               int mw = mh * w / h;\r
-               RECT rcDiffMap = { (cx - mw) / 2, pt.y, (cx + mw) / 2, pt.y + mh };\r
-               SetWindowPos(hwndDiffMap, NULL, rcDiffMap.left, rcDiffMap.top, \r
-                       rcDiffMap.right - rcDiffMap.left, rcDiffMap.bottom - rcDiffMap.top, SWP_NOZORDER);\r
-\r
-               InvalidateRect(GetDlgItem(m_hWnd, IDC_DIFFMAP), NULL, TRUE);\r
-       }\r
-\r
-       void SetImgMergeWindow(IImgMergeWindow *pImgMergeWindow)\r
-       {\r
-               m_pImgMergeWindow = pImgMergeWindow;\r
-               m_pImgMergeWindow->AddEventListener(OnEvent, this);\r
-       }\r
-\r
-private:\r
-       BOOL OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)\r
-       {\r
-               SendDlgItemMessage(hwnd, IDC_DIFF_BLOCKSIZE_SLIDER, TBM_SETRANGE, TRUE, MAKELPARAM(1, 64));\r
-               SendDlgItemMessage(hwnd, IDC_DIFF_BLOCKALPHA_SLIDER, TBM_SETRANGE, TRUE, MAKELPARAM(0, 100));\r
-               SendDlgItemMessage(hwnd, IDC_OVERLAY_ALPHA_SLIDER, TBM_SETRANGE, TRUE, MAKELPARAM(0, 100));\r
-               SendDlgItemMessage(hwnd, IDC_ZOOM_SLIDER, TBM_SETRANGE, TRUE, MAKELPARAM(-7, 56));\r
-               SendDlgItemMessage(hwnd, IDC_OVERLAY_MODE, CB_ADDSTRING, 0, (LPARAM)(_T("None")));\r
-               SendDlgItemMessage(hwnd, IDC_OVERLAY_MODE, CB_ADDSTRING, 0, (LPARAM)(_T("XOR")));\r
-               SendDlgItemMessage(hwnd, IDC_OVERLAY_MODE, CB_ADDSTRING, 0, (LPARAM)(_T("Alpha")));\r
-               SendDlgItemMessage(hwnd, IDC_OVERLAY_MODE, CB_ADDSTRING, 0, (LPARAM)(_T("Alpha Animation")));\r
-               return TRUE;\r
-       }\r
-\r
-       void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)\r
-       {\r
-               switch (id)\r
-               {\r
-               case IDC_DIFF_HIGHLIGHT:\r
-                       if (codeNotify == BN_CLICKED)\r
-                               m_pImgMergeWindow->SetShowDifferences(Button_GetCheck(hwndCtl) == BST_CHECKED);\r
-                       break;\r
-               case IDC_DIFF_BLINK:\r
-                       if (codeNotify == BN_CLICKED)\r
-                               m_pImgMergeWindow->SetBlinkDifferences(Button_GetCheck(hwndCtl) == BST_CHECKED);\r
-                       break;\r
-               case IDC_OVERLAY_MODE:\r
-                       if (codeNotify == CBN_SELCHANGE)\r
-                               m_pImgMergeWindow->SetOverlayMode(static_cast<IImgMergeWindow::OVERLAY_MODE>(ComboBox_GetCurSel(hwndCtl)));\r
-                       break;\r
-               case IDC_PAGE_EDIT:\r
-                       if (codeNotify == EN_CHANGE)\r
-                       {\r
-                               int page = static_cast<int>(SendDlgItemMessage(hwnd, IDC_PAGE_SPIN, UDM_GETPOS, 0, 0));\r
-                               m_pImgMergeWindow->SetCurrentPageAll(page - 1);\r
-                       }\r
-                       break;\r
-               case IDC_DIFFMAP:\r
-                       if (codeNotify == STN_CLICKED)\r
-                       {\r
-                               POINT pt;\r
-                               GetCursorPos(&pt);\r
-                               ScreenToClient(hwndCtl, &pt);\r
-                               RECT rc;\r
-                               GetClientRect(hwndCtl, &rc);\r
-                               CImgMergeWindow *pImgMergeWindow = static_cast<CImgMergeWindow *>(m_pImgMergeWindow);\r
-                               pImgMergeWindow->ScrollTo(\r
-                                       pt.x * pImgMergeWindow->GetDiffImageWidth() / rc.right,\r
-                                       pt.y * pImgMergeWindow->GetDiffImageHeight() / rc.bottom,\r
-                                       true);\r
-                       }\r
-                       break;\r
-               }\r
-       }\r
-\r
-       void OnHScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos)\r
-       {\r
-               int val = static_cast<int>(SendMessage(hwndCtl, TBM_GETPOS, 0, 0));\r
-               switch (GetDlgCtrlID(hwndCtl))\r
-               {\r
-               case IDC_DIFF_BLOCKALPHA_SLIDER:\r
-                       m_pImgMergeWindow->SetDiffColorAlpha(val / 100.0);\r
-                       break;\r
-               case IDC_DIFF_BLOCKSIZE_SLIDER:\r
-                       m_pImgMergeWindow->SetDiffBlockSize(val);\r
-                       break;\r
-               case IDC_DIFF_CDTHRESHOLD_SLIDER:\r
-                       m_pImgMergeWindow->SetColorDistanceThreshold(val);\r
-                       break;\r
-               case IDC_OVERLAY_ALPHA_SLIDER:\r
-                       m_pImgMergeWindow->SetOverlayAlpha(val / 100.0);\r
-                       break;\r
-               case IDC_ZOOM_SLIDER:\r
-                       m_pImgMergeWindow->SetZoom(1.0 + val * 0.125);\r
-                       break;\r
-               }\r
-               Sync();\r
-       }\r
-\r
-       void OnSize(HWND hwnd, UINT nType, int cx, int cy)\r
-       {\r
-               int nIDs[] = {\r
-                       IDC_DIFF_GROUP,\r
-                       IDC_OVERLAY_GROUP,\r
-                       IDC_VIEW_GROUP,\r
-                       IDC_DIFF_BLOCKALPHA_SLIDER,\r
-                       IDC_DIFF_BLOCKSIZE_SLIDER,\r
-                       IDC_DIFF_CDTHRESHOLD_SLIDER,\r
-                       IDC_OVERLAY_ALPHA_SLIDER,\r
-                       IDC_ZOOM_SLIDER\r
-               };\r
-\r
-               RECT rc;\r
-               GetClientRect(m_hWnd, &rc);\r
-               for (int i = 0; i < sizeof(nIDs) / sizeof(nIDs[0]); ++i)\r
-               {\r
-                       RECT rcCtrl;\r
-                       HWND hwndCtrl = GetDlgItem(m_hWnd, nIDs[i]);\r
-                       GetWindowRect(hwndCtrl, &rcCtrl);\r
-                       POINT pt = { rcCtrl.left, rcCtrl.top };\r
-                       ScreenToClient(m_hWnd, &pt);\r
-                       MoveWindow(hwndCtrl, pt.x, pt.y, rc.right - pt.x * 2, rcCtrl.bottom - rcCtrl.top, TRUE);\r
-               }\r
-\r
-               Sync();\r
-       }\r
-\r
-       void OnDrawItem(HWND hwnd, const DRAWITEMSTRUCT *pDrawItem)\r
-       {\r
-               if (!m_pImgMergeWindow || m_pImgMergeWindow->GetPaneCount() == 0)\r
-                       return;\r
-               RECT rc;\r
-               GetClientRect(pDrawItem->hwndItem, &rc);\r
-               Image *pImage = static_cast<CImgMergeWindow *>(m_pImgMergeWindow)->GetDiffMapImage(rc.right - rc.left, rc.bottom - rc.top);\r
-               RGBQUAD bkColor = { 0xff, 0xff, 0xff, 0xff };\r
-               pImage->getFipImage()->drawEx(pDrawItem->hDC, rc, false, &bkColor);\r
-               HWND hwndLeftPane = m_pImgMergeWindow->GetPaneHWND(0);\r
-\r
-               SCROLLINFO sih, siv;\r
-               sih.cbSize = sizeof(sih);\r
-               sih.fMask = SIF_POS | SIF_PAGE | SIF_RANGE;\r
-               GetScrollInfo(hwndLeftPane, SB_HORZ, &sih);\r
-               siv.cbSize = sizeof(siv);\r
-               siv.fMask = SIF_POS | SIF_PAGE | SIF_RANGE;\r
-               GetScrollInfo(hwndLeftPane, SB_VERT, &siv);\r
-\r
-               if (static_cast<int>(sih.nPage) < sih.nMax || static_cast<int>(siv.nPage) < siv.nMax)\r
-               {\r
-                       RECT rcFrame;\r
-                       rcFrame.left = rc.left + (rc.right - rc.left) * sih.nPos / sih.nMax;\r
-                       rcFrame.right = rcFrame.left + (rc.right - rc.left) * sih.nPage / sih.nMax;\r
-                       rcFrame.top = rc.top + (rc.bottom - rc.top) * siv.nPos / siv.nMax;\r
-                       rcFrame.bottom = rcFrame.top + (rc.bottom - rc.top) * siv.nPage / siv.nMax;\r
-                       FrameRect(pDrawItem->hDC, &rcFrame, reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)));\r
-               }\r
-       }\r
-\r
-       INT_PTR OnWndMsg(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)\r
-       {\r
-               switch (iMsg)\r
-               {\r
-               case WM_INITDIALOG:\r
-                       return HANDLE_WM_INITDIALOG(hwnd, wParam, lParam, OnInitDialog);\r
-               case WM_COMMAND:\r
-                       HANDLE_WM_COMMAND(hwnd, wParam, lParam, OnCommand);\r
-                       break;\r
-               case WM_HSCROLL:\r
-                       HANDLE_WM_HSCROLL(hwnd, wParam, lParam, OnHScroll);\r
-                       break;\r
-               case WM_SIZE:\r
-                       HANDLE_WM_SIZE(hwnd, wParam, lParam, OnSize);\r
-                       break;\r
-               case WM_DRAWITEM:\r
-                       HANDLE_WM_DRAWITEM(hwnd, wParam, lParam, OnDrawItem);\r
-                       break;\r
-               }\r
-               return 0;\r
-       }\r
-\r
-       static INT_PTR CALLBACK DlgProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)\r
-       {\r
-               if (iMsg == WM_INITDIALOG)\r
-                       SetWindowLongPtr(hwnd, DWLP_USER, reinterpret_cast<LONG_PTR>(reinterpret_cast<CImgToolWindow *>(lParam)));\r
-               CImgToolWindow *pImgWnd = reinterpret_cast<CImgToolWindow *>(GetWindowLongPtr(hwnd, DWLP_USER));\r
-               if (pImgWnd)\r
-                       return pImgWnd->OnWndMsg(hwnd, iMsg, wParam, lParam);\r
-               else\r
-                       return FALSE;\r
-       }\r
-\r
-       static void OnEvent(const IImgMergeWindow::Event& evt)\r
-       {\r
-               switch (evt.eventType)\r
-               {\r
-               case IImgMergeWindow::HSCROLL:\r
-               case IImgMergeWindow::VSCROLL:\r
-               case IImgMergeWindow::SIZE:\r
-               case IImgMergeWindow::MOUSEWHEEL:\r
-               case IImgMergeWindow::REFRESH:\r
-               case IImgMergeWindow::SCROLLTODIFF:\r
-               case IImgMergeWindow::OPEN:\r
-                       reinterpret_cast<CImgToolWindow *>(evt.userdata)->Sync();\r
-                       break;\r
-               }\r
-       }\r
-\r
-       HWND m_hWnd;\r
-       HINSTANCE m_hInstance;\r
-       IImgMergeWindow *m_pImgMergeWindow;\r
-};\r
diff --git a/src/ImgWindow.hpp b/src/ImgWindow.hpp
deleted file mode 100644 (file)
index d4d7707..0000000
+++ /dev/null
@@ -1,534 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////\r
-//    License (GPLv2+):\r
-//    This program is free software; you can redistribute it and/or modify\r
-//    it under the terms of the GNU General Public License as published by\r
-//    the Free Software Foundation; either version 2 of the License, or\r
-//    (at your option) any later version.\r
-//\r
-//    This program is distributed in the hope that it will be useful, but\r
-//    WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//    General Public License for more details.\r
-//\r
-//    You should have received a copy of the GNU General Public License\r
-//    along with this program; if not, write to the Free Software\r
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#pragma once\r
-#pragma warning(disable: 4819)\r
-\r
-#include "FreeImagePlus.h"\r
-#include <vector>\r
-\r
-class CImgWindow\r
-{\r
-       enum { MARGIN = 16 };\r
-public:\r
-       CImgWindow() :\r
-                 m_fip(NULL)\r
-               , m_hWnd(NULL)\r
-               , m_nVScrollPos(0)\r
-               , m_nHScrollPos(0)\r
-               , m_zoom(1.0)\r
-               , m_useBackColor(true)\r
-       {\r
-               memset(&m_backColor, 0xff, sizeof(m_backColor));\r
-       }\r
-\r
-       ~CImgWindow()\r
-       {\r
-       }\r
-\r
-       HWND GetHWND() const\r
-       {\r
-               return m_hWnd;\r
-       }\r
-\r
-       bool Create(HINSTANCE hInstance, HWND hWndParent)\r
-       {\r
-               MyRegisterClass(hInstance);\r
-               m_hWnd = CreateWindowExW(0, L"WinImgWindowClass", NULL, WS_CHILD | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE,\r
-                       0, 0, 0, 0, hWndParent, NULL, hInstance, this);\r
-               return m_hWnd ? true : false;\r
-       }\r
-\r
-       bool Destroy()\r
-       {\r
-               if (m_hWnd)\r
-                       DestroyWindow(m_hWnd);\r
-               m_fip = NULL;\r
-               m_hWnd = NULL;\r
-               return true;\r
-       }\r
-\r
-       RECT GetWindowRect() const\r
-       {\r
-               RECT rc, rcParent;\r
-               HWND hwndParent = GetParent(m_hWnd);\r
-               ::GetWindowRect(hwndParent, &rcParent);\r
-               ::GetWindowRect(m_hWnd, &rc);\r
-               rc.left   -= rcParent.left;\r
-               rc.top    -= rcParent.top;\r
-               rc.right  -= rcParent.left;\r
-               rc.bottom -= rcParent.top;\r
-               return rc;\r
-       }\r
-\r
-       void SetWindowRect(const RECT& rc)\r
-       {\r
-               MoveWindow(m_hWnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);\r
-       }\r
-\r
-       void SetFocus()\r
-       {\r
-               ::SetFocus(m_hWnd);\r
-       }\r
-\r
-       POINT ConvertDPtoLP(int dx, int dy) const\r
-       {\r
-               POINT lp;\r
-               RECT rc;\r
-               GetClientRect(m_hWnd, &rc);\r
-\r
-               if (rc.right - rc.left < m_fip->getWidth() * m_zoom + MARGIN * 2)\r
-                       lp.x = static_cast<int>((dx - MARGIN + m_nHScrollPos) / m_zoom);\r
-               else\r
-                       lp.x = static_cast<int>((dx - (rc.right / 2 - m_fip->getWidth() / 2 * m_zoom)) / m_zoom);\r
-               if (rc.bottom - rc.top < m_fip->getHeight() * m_zoom + MARGIN * 2)\r
-                       lp.y = static_cast<int>((dy - MARGIN + m_nVScrollPos) / m_zoom);\r
-               else\r
-                       lp.y = static_cast<int>((dy - (rc.bottom / 2 - m_fip->getHeight() / 2 * m_zoom)) / m_zoom);\r
-               return lp;\r
-       }\r
-\r
-       bool IsFocused() const\r
-       {\r
-               return m_hWnd == GetFocus();\r
-       }\r
-\r
-       void ScrollTo(int x, int y, bool force = false)\r
-       {\r
-               SCROLLINFO sih = {0}, siv = {0};\r
-               sih.cbSize = sizeof SCROLLINFO;\r
-               sih.fMask = SIF_POS | SIF_RANGE | SIF_PAGE | SIF_TRACKPOS;\r
-               GetScrollInfo(m_hWnd, SB_HORZ, &sih);\r
-               siv.cbSize = sizeof SCROLLINFO;\r
-               siv.fMask = SIF_POS | SIF_RANGE | SIF_PAGE | SIF_TRACKPOS;\r
-               GetScrollInfo(m_hWnd, SB_VERT, &siv);\r
-\r
-               RECT rc;\r
-               GetClientRect(m_hWnd, &rc);\r
-\r
-               if (rc.right - rc.left < m_fip->getWidth() * m_zoom + MARGIN * 2)\r
-               {\r
-                       if (force)\r
-                       {\r
-                               m_nHScrollPos = static_cast<int>(x * m_zoom + MARGIN - rc.right / 2);\r
-                       }\r
-                       else\r
-                       {\r
-                               if (x * m_zoom + MARGIN < m_nHScrollPos || m_nHScrollPos + rc.right < x * m_zoom + MARGIN)\r
-                                       m_nHScrollPos = static_cast<int>(x * m_zoom + MARGIN - rc.right / 2);\r
-                       }\r
-                       if (m_nHScrollPos < 0)\r
-                               m_nHScrollPos = 0;\r
-                       else if (m_nHScrollPos > sih.nMax - static_cast<int>(sih.nPage))\r
-                               m_nHScrollPos = sih.nMax - sih.nPage;\r
-               }\r
-               if (rc.bottom - rc.top < m_fip->getHeight() * m_zoom + MARGIN * 2)\r
-               {\r
-                       if (force)\r
-                       {\r
-                               m_nVScrollPos = static_cast<int>(y * m_zoom + MARGIN - rc.bottom / 2);\r
-                       }\r
-                       else\r
-                       {\r
-                               if (y * m_zoom + MARGIN < m_nVScrollPos || m_nVScrollPos + rc.bottom < y * m_zoom + MARGIN)\r
-                                       m_nVScrollPos = static_cast<int>(y * m_zoom + MARGIN - rc.bottom / 2);\r
-                       }\r
-                       if (m_nVScrollPos < 0)\r
-                               m_nVScrollPos = 0;\r
-                       else if (m_nVScrollPos > siv.nMax - static_cast<int>(siv.nPage))\r
-                               m_nVScrollPos = siv.nMax - siv.nPage;\r
-               }\r
-\r
-               RECT rcClip = {rc.left + 1, rc.top + 1, rc.right - 1, rc.bottom - 1};\r
-               ScrollWindow(m_hWnd, sih.nPos - m_nHScrollPos, siv.nPos - m_nVScrollPos, NULL, &rcClip);\r
-               CalcScrollBarRange();\r
-               InvalidateRect(m_hWnd, NULL, FALSE);\r
-       }\r
-\r
-       RGBQUAD GetBackColor() const\r
-       {\r
-               return m_backColor;\r
-       }\r
-\r
-       void SetBackColor(RGBQUAD backColor)\r
-       {\r
-               m_backColor = backColor;\r
-               if (m_fip)\r
-               {\r
-                       m_fip->setModified(true);\r
-                       InvalidateRect(m_hWnd, NULL, TRUE);\r
-               }\r
-       }\r
-\r
-       bool GetUseBackColor() const\r
-       {\r
-               return m_useBackColor;\r
-       }\r
-\r
-       void SetUseBackColor(bool useBackColor)\r
-       {\r
-               m_useBackColor = useBackColor;\r
-               if (m_fip)\r
-               {\r
-                       m_fip->setModified(true);\r
-                       InvalidateRect(m_hWnd, NULL, TRUE);\r
-               }\r
-       }\r
-\r
-       double GetZoom() const\r
-       {\r
-               return m_zoom;\r
-       }\r
-\r
-       void SetZoom(double zoom)\r
-       {\r
-               double oldZoom = m_zoom;\r
-               m_zoom = zoom;\r
-               if (m_zoom < 0.1)\r
-                       m_zoom = 0.1;\r
-               m_nVScrollPos = static_cast<int>(m_nVScrollPos / oldZoom * m_zoom);\r
-               m_nHScrollPos = static_cast<int>(m_nHScrollPos / oldZoom * m_zoom);\r
-               if (m_fip)\r
-               {\r
-                       RECT rc;\r
-                       GetClientRect(m_hWnd, &rc);\r
-                       unsigned width  = static_cast<unsigned>(m_fip->getWidth()  * m_zoom) + MARGIN * 2; \r
-                       unsigned height = static_cast<unsigned>(m_fip->getHeight() * m_zoom) + MARGIN * 2; \r
-                       if (m_nHScrollPos > static_cast<int>(width  - rc.right))\r
-                               m_nHScrollPos = width  - rc.right;\r
-                       if (m_nHScrollPos < 0)\r
-                               m_nHScrollPos = 0;\r
-                       if (m_nVScrollPos > static_cast<int>(height - rc.bottom))\r
-                               m_nVScrollPos = height - rc.bottom;\r
-                       if (m_nVScrollPos < 0)\r
-                               m_nVScrollPos = 0;\r
-                       CalcScrollBarRange();\r
-                       InvalidateRect(m_hWnd, NULL, TRUE);\r
-               }\r
-       }\r
-\r
-       void Invalidate(bool erase = false)\r
-       {\r
-               InvalidateRect(m_hWnd, NULL, erase);\r
-       }\r
-\r
-       void SetImage(fipWinImage *pfip)\r
-       {\r
-               m_fip = pfip;\r
-               CalcScrollBarRange();\r
-       }\r
-\r
-private:\r
-\r
-       ATOM MyRegisterClass(HINSTANCE hInstance)\r
-       {\r
-               WNDCLASSEXW wcex = {0};\r
-               if (!GetClassInfoEx(hInstance, L"WinImgWindowClass", &wcex))\r
-               {\r
-                       wcex.cbSize         = sizeof(WNDCLASSEX); \r
-                       wcex.style                      = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;\r
-                       wcex.lpfnWndProc        = (WNDPROC)WndProc;\r
-                       wcex.cbClsExtra         = 0;\r
-                       wcex.cbWndExtra         = 0;\r
-                       wcex.hInstance          = hInstance;\r
-                       wcex.hCursor            = LoadCursor(NULL, IDC_ARROW);\r
-                       wcex.hbrBackground      = CreateSolidBrush(RGB(206, 215, 230));\r
-                       wcex.lpszClassName      = L"WinImgWindowClass";\r
-               }\r
-               return RegisterClassExW(&wcex);\r
-       }\r
-\r
-       void OnPaint()\r
-       {\r
-               PAINTSTRUCT ps;\r
-               HDC hdc = BeginPaint(m_hWnd, &ps);\r
-               if (m_fip)\r
-               {\r
-                       RECT rcImg, rc;\r
-                       GetClientRect(m_hWnd, &rc);\r
-                       if (rc.right - rc.left > m_fip->getWidth() * m_zoom + MARGIN * 2)\r
-                       {\r
-                               rcImg.left  = static_cast<int>(((rc.right - rc.left) - m_fip->getWidth() * m_zoom) / 2); \r
-                               rcImg.right = static_cast<int>(rcImg.left + m_fip->getWidth() * m_zoom); \r
-                       }\r
-                       else\r
-                       {\r
-                               rcImg.left = -m_nHScrollPos + MARGIN;\r
-                               rcImg.right = static_cast<int>(m_fip->getWidth() * m_zoom + MARGIN - m_nHScrollPos);\r
-                       }\r
-                       if (rc.bottom - rc.top > m_fip->getHeight() * m_zoom + MARGIN * 2)\r
-                       {\r
-                               rcImg.top    = static_cast<int>(((rc.bottom - rc.top) - m_fip->getHeight() * m_zoom) / 2); \r
-                               rcImg.bottom = static_cast<int>(rcImg.top + m_fip->getHeight() * m_zoom); \r
-                       }\r
-                       else\r
-                       {\r
-                               rcImg.top    = -m_nVScrollPos + MARGIN;\r
-                               rcImg.bottom = static_cast<int>(m_fip->getHeight() * m_zoom + MARGIN - m_nVScrollPos);\r
-                       }\r
-\r
-                       if (m_fip->isValid())\r
-                               m_fip->drawEx(hdc, rcImg, false, m_useBackColor ? &m_backColor : NULL);\r
-                       \r
-                       if (GetFocus() == m_hWnd)\r
-                       {\r
-                               DrawFocusRect(hdc, &rc);\r
-                       }\r
-                       else\r
-                       {\r
-                               HPEN hPen = (HPEN)GetStockObject(WHITE_PEN);\r
-                               HBRUSH hBrush = (HBRUSH)GetStockObject(NULL_BRUSH);\r
-                               HPEN hOldPen = (HPEN)SelectObject(hdc, hPen);\r
-                               HBRUSH hOldBrush = (HBRUSH)SelectObject(hdc, hBrush);\r
-                               Rectangle(hdc, rc.left, rc.top, rc.right, rc.bottom);\r
-                               SelectObject(hdc, hOldPen);\r
-                               SelectObject(hdc, hOldBrush);\r
-                       }\r
-               }\r
-               EndPaint(m_hWnd, &ps);\r
-       }\r
-\r
-       void OnSize(UINT nType, int cx, int cy)\r
-       {\r
-               CalcScrollBarRange();\r
-       }\r
-\r
-       void OnHScroll(UINT nSBCode, UINT nPos)\r
-       {\r
-               SCROLLINFO si = {0};\r
-               si.cbSize = sizeof SCROLLINFO;\r
-               si.fMask = SIF_POS | SIF_RANGE | SIF_PAGE | SIF_TRACKPOS;\r
-               GetScrollInfo(m_hWnd, SB_HORZ, &si);\r
-               switch (nSBCode) {\r
-               case SB_LINEUP:\r
-                       --m_nHScrollPos;\r
-                       break;\r
-               case SB_LINEDOWN:\r
-                       ++m_nHScrollPos;\r
-                       break;\r
-               case SB_PAGEUP:\r
-                       m_nHScrollPos -= si.nPage;\r
-                       break;\r
-               case SB_PAGEDOWN:\r
-                       m_nHScrollPos += si.nPage;\r
-                       break;\r
-               case SB_THUMBTRACK:\r
-                       m_nHScrollPos = nPos;\r
-                       break;\r
-               default: break;\r
-               }\r
-               if (m_nHScrollPos < 0)\r
-                       m_nHScrollPos = 0;\r
-               if (m_nHScrollPos > si.nMax - static_cast<int>(si.nPage))\r
-                       m_nHScrollPos = si.nMax - si.nPage;\r
-               RECT rc;\r
-               GetClientRect(m_hWnd, &rc);\r
-               RECT rcClip = {rc.left + 1, rc.top + 1, rc.right - 1, rc.bottom - 1};\r
-               ScrollWindow(m_hWnd, si.nPos - m_nHScrollPos, 0, NULL, &rcClip);\r
-               CalcScrollBarRange();\r
-       }\r
-\r
-       void OnVScroll(UINT nSBCode, UINT nPos)\r
-       {\r
-               SCROLLINFO si = {0};\r
-               si.cbSize = sizeof SCROLLINFO;\r
-               si.fMask = SIF_POS | SIF_RANGE | SIF_PAGE | SIF_TRACKPOS;\r
-               GetScrollInfo(m_hWnd, SB_VERT, &si);\r
-               switch (nSBCode) {\r
-               case SB_LINEUP:\r
-                       --m_nVScrollPos;\r
-                       break;\r
-               case SB_LINEDOWN:\r
-                       ++m_nVScrollPos;\r
-                       break;\r
-               case SB_PAGEUP:\r
-                       m_nVScrollPos -= si.nPage;\r
-                       break;\r
-               case SB_PAGEDOWN:\r
-                       m_nVScrollPos += si.nPage;\r
-                       break;\r
-               case SB_THUMBTRACK:\r
-                       m_nVScrollPos = nPos;\r
-                       break;\r
-               default: break;\r
-               }\r
-               if (m_nVScrollPos < 0)\r
-                       m_nVScrollPos = 0;\r
-               if (m_nVScrollPos > si.nMax - static_cast<int>(si.nPage))\r
-                       m_nVScrollPos = si.nMax - si.nPage;\r
-               RECT rc;\r
-               GetClientRect(m_hWnd, &rc);\r
-               RECT rcClip = {rc.left + 1, rc.top + 1, rc.right - 1, rc.bottom - 1};\r
-               ScrollWindow(m_hWnd, 0, si.nPos - m_nVScrollPos, NULL, &rcClip);\r
-               CalcScrollBarRange();\r
-       }\r
-\r
-       void OnLButtonDown(UINT nFlags, int x, int y)\r
-       {\r
-               SetFocus();\r
-       }\r
-\r
-       void OnRButtonDown(UINT nFlags, int x, int y)\r
-       {\r
-               SetFocus();\r
-       }\r
-\r
-       void OnMouseWheel(UINT nFlags, short zDelta)\r
-       {\r
-               if (!(nFlags & MK_CONTROL))\r
-               { \r
-                       RECT rc;\r
-                       GetClientRect(m_hWnd, &rc);\r
-                       if (!(nFlags & MK_SHIFT))\r
-                       {\r
-                               if (rc.bottom - rc.top < m_fip->getHeight() * m_zoom + MARGIN * 2)\r
-                               {\r
-                                       SCROLLINFO si = {0};\r
-                                       si.cbSize = sizeof SCROLLINFO;\r
-                                       si.fMask = SIF_POS | SIF_RANGE | SIF_PAGE | SIF_TRACKPOS;\r
-                                       GetScrollInfo(m_hWnd, SB_VERT, &si);\r
-                                       m_nVScrollPos += - zDelta / (WHEEL_DELTA / 16);\r
-                                       if (m_nVScrollPos < 0)\r
-                                               m_nVScrollPos = 0;\r
-                                       if (m_nVScrollPos > si.nMax - static_cast<int>(si.nPage))\r
-                                               m_nVScrollPos = si.nMax - si.nPage;\r
-                                       RECT rcClip = {rc.left + 1, rc.top + 1, rc.right - 1, rc.bottom - 1};\r
-                                       ScrollWindow(m_hWnd, 0, si.nPos - m_nVScrollPos, NULL, &rcClip);\r
-                                       CalcScrollBarRange();\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               if (rc.right - rc.left < m_fip->getWidth() * m_zoom + MARGIN * 2)\r
-                               {\r
-                                       SCROLLINFO si = {0};\r
-                                       si.cbSize = sizeof SCROLLINFO;\r
-                                       si.fMask = SIF_POS | SIF_RANGE | SIF_PAGE | SIF_TRACKPOS;\r
-                                       GetScrollInfo(m_hWnd, SB_HORZ, &si);\r
-                                       m_nHScrollPos += - zDelta / (WHEEL_DELTA / 16);\r
-                                       if (m_nHScrollPos < 0)\r
-                                               m_nHScrollPos = 0;\r
-                                       if (m_nHScrollPos > si.nMax - static_cast<int>(si.nPage))\r
-                                               m_nHScrollPos = si.nMax - si.nPage;\r
-                                       RECT rcClip = {rc.left + 1, rc.top + 1, rc.right - 1, rc.bottom - 1};\r
-                                       ScrollWindow(m_hWnd, si.nPos - m_nHScrollPos, 0, NULL, &rcClip);\r
-                                       CalcScrollBarRange();\r
-                               }\r
-                       }\r
-               }\r
-               else\r
-               {\r
-                       if (zDelta > 0)\r
-                               SetZoom(m_zoom + 0.1);\r
-                       else\r
-                               SetZoom(m_zoom - 0.1);\r
-               }\r
-       }\r
-\r
-       void OnSetFocus(HWND hwndOld)\r
-       {\r
-               InvalidateRect(m_hWnd, NULL, TRUE);\r
-       }\r
-\r
-       void OnKillFocus(HWND hwndNew)\r
-       {\r
-               InvalidateRect(m_hWnd, NULL, TRUE);\r
-       }\r
-\r
-       LRESULT OnWndMsg(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)\r
-       {\r
-               switch (iMsg)\r
-               {\r
-               case WM_PAINT:\r
-                       OnPaint();\r
-                       break;\r
-               case WM_HSCROLL:\r
-                       OnHScroll((UINT)(LOWORD(wParam)), (int)(short)HIWORD(wParam));\r
-                       break;\r
-               case WM_VSCROLL:\r
-                       OnVScroll((UINT)(LOWORD(wParam)), (int)(short)HIWORD(wParam));\r
-                       break;\r
-               case WM_LBUTTONDOWN:\r
-                       OnLButtonDown((UINT)(wParam), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam));\r
-                       break;\r
-               case WM_RBUTTONDOWN:\r
-                       OnRButtonDown((UINT)(wParam), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam));\r
-                       break;\r
-               case WM_MOUSEWHEEL:\r
-                       OnMouseWheel(GET_KEYSTATE_WPARAM(wParam), GET_WHEEL_DELTA_WPARAM(wParam));\r
-                       break;\r
-               case WM_SETFOCUS:\r
-                       OnSetFocus((HWND)wParam);\r
-                       break;\r
-               case WM_KILLFOCUS:\r
-                       OnKillFocus((HWND)wParam);\r
-                       break;\r
-               case WM_COMMAND:\r
-                       PostMessage(GetParent(m_hWnd), iMsg, wParam, lParam);\r
-                       break;\r
-               case WM_SIZE:\r
-                       OnSize((UINT)wParam, LOWORD(lParam), HIWORD(lParam));\r
-                       break;\r
-               default:\r
-                       return DefWindowProc(hwnd, iMsg, wParam, lParam);\r
-               }\r
-               return 0;\r
-       }\r
-\r
-       void CalcScrollBarRange()\r
-       {\r
-               RECT rc;\r
-               GetClientRect(m_hWnd, &rc);\r
-               SCROLLINFO si = {0};\r
-               si.cbSize = sizeof(SCROLLINFO);\r
-               if (m_fip)\r
-               {\r
-                       unsigned width  = static_cast<unsigned>(m_fip->getWidth()  * m_zoom) + MARGIN * 2;\r
-                       unsigned height = static_cast<unsigned>(m_fip->getHeight() * m_zoom) + MARGIN * 2; \r
-\r
-                       si.fMask = SIF_POS | SIF_RANGE | SIF_PAGE | SIF_DISABLENOSCROLL;\r
-                       si.nMin = 0;\r
-                       si.nMax = height;\r
-                       si.nPage = rc.bottom;\r
-                       si.nPos = m_nVScrollPos;\r
-                       SetScrollInfo(m_hWnd, SB_VERT, &si, TRUE);\r
-                       \r
-                       si.nMin = 0;\r
-                       si.nMax = width;\r
-                       si.nPage = rc.right;\r
-                       si.nPos = m_nHScrollPos;\r
-                       SetScrollInfo(m_hWnd, SB_HORZ, &si, TRUE);\r
-               }\r
-       }\r
-\r
-       static LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)\r
-       {\r
-               if (iMsg == WM_NCCREATE)\r
-                       SetWindowLongPtr(hwnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(reinterpret_cast<LPCREATESTRUCT>(lParam)->lpCreateParams));\r
-               CImgWindow *pImgWnd = reinterpret_cast<CImgWindow *>(GetWindowLongPtr(hwnd, GWLP_USERDATA));\r
-               LRESULT lResult = pImgWnd->OnWndMsg(hwnd, iMsg, wParam, lParam);\r
-               return lResult;\r
-       }\r
-\r
-       HWND m_hWnd;\r
-       fipWinImage *m_fip;\r
-       int m_nVScrollPos;\r
-       int m_nHScrollPos;\r
-       double m_zoom;\r
-       bool m_useBackColor;\r
-       RGBQUAD m_backColor;\r
-};\r
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644 (file)
index c88f249..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-TARGETS=cidiff
-CXXFLAGS+=-Wall -Wextra -I../../freeimage/Source -I../../freeimage/Wrapper/FreeImagePlus
-SRCS=cidiff.cpp
-OBJS=$(SRCS:.cpp=*.o)
-HEADERS=ImgDiffBuffer.hpp ImgMergeBuffer.hpp image.hpp
-LIBS=-L../../freeimage/ -lfreeimage -L../../freeimage/ -lfreeimageplus
-
-all: $(TARGETS)
-
-clean:
-       @rm -f $(TARGETS) $(OBJS)
-
-%.o : %.cpp $(HEADERS)
-       $(CXX) $(CXXFLAGS) -c $<
-
-cidiff: cidiff.o
-       $(CXX) $< $(LIBS) -o $@
-
-
diff --git a/src/WinIMerge.cpp b/src/WinIMerge.cpp
deleted file mode 100644 (file)
index 42b009b..0000000
+++ /dev/null
@@ -1,654 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////\r
-//    License (GPLv2+):\r
-//    This program is free software; you can redistribute it and/or modify\r
-//    it under the terms of the GNU General Public License as published by\r
-//    the Free Software Foundation; either version 2 of the License, or\r
-//    (at your option) any later version.\r
-//\r
-//    This program is distributed in the hope that it will be useful, but\r
-//    WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//    General Public License for more details.\r
-//\r
-//    You should have received a copy of the GNU General Public License\r
-//    along with this program; if not, write to the Free Software\r
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#include <Windows.h>\r
-#include <CommCtrl.h>\r
-#include <Shlwapi.h>\r
-#include <string>\r
-#include <algorithm>\r
-#include <iostream>\r
-#include <fstream>\r
-#include "resource.h"\r
-#include "WinIMergeLib.h"\r
-\r
-#pragma comment(lib, "comctl32.lib")\r
-#pragma comment(lib, "shlwapi.lib")\r
-\r
-#if defined _M_IX86\r
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")\r
-#elif defined _M_IA64\r
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")\r
-#elif defined _M_X64\r
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")\r
-#else\r
-#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")\r
-#endif\r
-\r
-HINSTANCE m_hInstance;\r
-HINSTANCE hInstDLL;\r
-HWND m_hWnd;\r
-HWND m_hwndStatusBar;\r
-HWND m_hwndImgToolWindow;\r
-wchar_t m_szTitle[256] = L"WinIMerge";\r
-wchar_t m_szWindowClass[256] = L"WinIMergeClass";\r
-IImgMergeWindow *m_pImgMergeWindow = NULL;\r
-IImgToolWindow *m_pImgToolWindow = NULL;\r
-\r
-struct CmdLineInfo\r
-{\r
-       explicit CmdLineInfo(const wchar_t *cmdline) : nImages(0)\r
-       {\r
-               if (cmdline[0] == 0)\r
-                       return;\r
-\r
-               int argc;\r
-               wchar_t **argv = CommandLineToArgvW(cmdline, &argc);\r
-               for (int i = 0; i < argc; ++i)\r
-               {\r
-                       if (argv[i][0] != '-' && argv[i][0] != '/' && nImages < 3)\r
-                       {\r
-                               sFileName[nImages] = argv[i];\r
-                               ++nImages;\r
-                       }\r
-               }\r
-       }\r
-\r
-       std::wstring sFileName[3];\r
-       int nImages;\r
-};\r
-\r
-bool OpenImages(HWND hWnd, int nImages, const std::wstring filename[3]);\r
-void UpdateMenuState(HWND hWnd);\r
-ATOM MyRegisterClass(HINSTANCE hInstance);\r
-BOOL InitInstance(HINSTANCE, int);\r
-LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);\r
-LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);\r
-\r
-int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)\r
-{\r
-       MSG msg;\r
-       HACCEL hAccelTable;\r
-\r
-       InitCommonControls();\r
-       MyRegisterClass(hInstance);\r
-       hInstDLL = GetModuleHandleW(L"WinIMergeLib.dll");\r
-\r
-       if (!InitInstance (hInstance, nCmdShow)) \r
-               return FALSE;\r
-\r
-       hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_WINIMERGE);\r
-\r
-       CmdLineInfo cmdline(lpCmdLine);\r
-       if (cmdline.nImages > 0)\r
-               OpenImages(m_hWnd, cmdline.nImages, cmdline.sFileName);\r
-\r
-       while (GetMessage(&msg, NULL, 0, 0)) \r
-       {\r
-               if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg) && (m_hwndImgToolWindow == 0 || !IsDialogMessage(m_hwndImgToolWindow, &msg)))\r
-               {\r
-                       TranslateMessage(&msg);\r
-                       DispatchMessage(&msg);\r
-               }\r
-       }\r
-\r
-       return (int) msg.wParam;\r
-}\r
-\r
-ATOM MyRegisterClass(HINSTANCE hInstance)\r
-{\r
-       WNDCLASSEX wcex = {0};\r
-       wcex.cbSize         = sizeof(WNDCLASSEX); \r
-       wcex.style          = CS_HREDRAW | CS_VREDRAW;\r
-       wcex.lpfnWndProc    = (WNDPROC)WndProc;\r
-       wcex.cbClsExtra     = 0;\r
-       wcex.cbWndExtra     = 0;\r
-       wcex.hInstance      = hInstance;\r
-       wcex.hIcon          = LoadIcon(hInstance, (LPCTSTR)IDI_WINIMERGE);\r
-       wcex.hCursor        = LoadCursor(NULL, IDC_ARROW);\r
-       wcex.hbrBackground  = (HBRUSH)(COLOR_WINDOW+1);\r
-       wcex.lpszMenuName   = (LPCTSTR)IDC_WINIMERGE;\r
-       wcex.lpszClassName  = m_szWindowClass;\r
-       wcex.hIconSm        = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_WINIMERGE);\r
-       return RegisterClassEx(&wcex);\r
-}\r
-\r
-BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)\r
-{\r
-   m_hInstance = hInstance;\r
-   m_hWnd = CreateWindow(m_szWindowClass, m_szTitle, WS_OVERLAPPEDWINDOW,\r
-      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);\r
-   if (!m_hWnd)\r
-      return FALSE;\r
-   ShowWindow(m_hWnd, nCmdShow);\r
-   UpdateWindow(m_hWnd);\r
-   return TRUE;\r
-}\r
-\r
-void UpdateWindowTitle(HWND hWnd)\r
-{\r
-       wchar_t title[1024];\r
-       wchar_t fnames[3][260];\r
-       for (int i = 0; i < m_pImgMergeWindow->GetPaneCount(); ++i)\r
-               wsprintfW(fnames[i], L"%s%s", m_pImgMergeWindow->GetFileName(i), m_pImgMergeWindow->IsModified(i) ? "*" : "");\r
-       int npanes = m_pImgMergeWindow->GetPaneCount();\r
-       if (npanes == 2)\r
-               wsprintfW(title, L"WinIMerge(%s - %s)", fnames[0], fnames[1]);\r
-       else if (npanes == 3)\r
-               wsprintfW(title, L"WinIMerge(%s - %s - %s)", fnames[0], fnames[1], fnames[2]);\r
-       if (npanes > 0)\r
-               SetWindowTextW(hWnd, title);\r
-}\r
-\r
-bool OpenImages(HWND hWnd, int nImages, const std::wstring filename[3])\r
-{\r
-       bool bSucceeded;\r
-       if (nImages <= 2)\r
-               bSucceeded = m_pImgMergeWindow->OpenImages(filename[0].c_str(), filename[1].c_str());\r
-       else\r
-               bSucceeded = m_pImgMergeWindow->OpenImages(filename[0].c_str(), filename[1].c_str(), filename[2].c_str());\r
-       if (bSucceeded)\r
-               UpdateWindowTitle(hWnd);\r
-       InvalidateRect(hWnd, NULL, TRUE);\r
-       return bSucceeded;\r
-}\r
-\r
-void UpdateMenuState(HWND hWnd)\r
-{\r
-       HMENU hMenu = GetMenu(hWnd);\r
-       CheckMenuItem(hMenu, ID_VIEW_VIEWDIFFERENCES,    m_pImgMergeWindow->GetShowDifferences() ? MF_CHECKED : MF_UNCHECKED);\r
-       CheckMenuItem(hMenu, ID_VIEW_SPLITHORIZONTALLY,  m_pImgMergeWindow->GetHorizontalSplit() ? MF_CHECKED : MF_UNCHECKED);\r
-       CheckMenuRadioItem(hMenu, ID_VIEW_OVERLAY_NONE, ID_VIEW_OVERLAY_ALPHABLEND,\r
-               m_pImgMergeWindow->GetOverlayMode() + ID_VIEW_OVERLAY_NONE, MF_BYCOMMAND);\r
-       int blockSize = m_pImgMergeWindow->GetDiffBlockSize();\r
-       int id = ID_VIEW_DIFFBLOCKSIZE_1;\r
-       while (blockSize > 1)\r
-       {\r
-               ++id;\r
-               blockSize >>= 1;\r
-       }\r
-       CheckMenuRadioItem(hMenu, ID_VIEW_DIFFBLOCKSIZE_1, ID_VIEW_DIFFBLOCKSIZE_32, id, MF_BYCOMMAND);\r
-       CheckMenuItem(hMenu, ID_VIEW_USEBACKCOLOR, m_pImgMergeWindow->GetUseBackColor() ? MF_CHECKED : MF_UNCHECKED);\r
-       int threshold = static_cast<int>(m_pImgMergeWindow->GetColorDistanceThreshold());\r
-       if (threshold == 0)\r
-               id = ID_VIEW_THRESHOLD_0;\r
-       else\r
-       {\r
-               id = ID_VIEW_THRESHOLD_2;\r
-               while (threshold > 2)\r
-               {\r
-                       ++id;\r
-                       threshold >>= 1;\r
-               }\r
-       }\r
-       CheckMenuRadioItem(hMenu, ID_VIEW_THRESHOLD_0, ID_VIEW_THRESHOLD_64, id, MF_BYCOMMAND);\r
-}\r
-\r
-void UpdateStatusBar()\r
-{\r
-       POINT pt = {-1, -1}, ptCursor;\r
-       GetCursorPos(&ptCursor);\r
-       for (int pane = 0; pane < m_pImgMergeWindow->GetPaneCount(); ++pane)\r
-       {\r
-               RECT rc;\r
-               GetWindowRect(m_pImgMergeWindow->GetPaneHWND(pane), &rc);\r
-               if (PtInRect(&rc, ptCursor))\r
-                       pt = m_pImgMergeWindow->GetCursorPos(pane);\r
-       }\r
-       \r
-       RGBQUAD color[3];\r
-       for (int pane = 0; pane < m_pImgMergeWindow->GetPaneCount(); ++pane)\r
-               color[pane] = m_pImgMergeWindow->GetPixelColor(pane, pt.x, pt.y);\r
-       double colorDistance01, colorDistance12;\r
-       colorDistance01 = m_pImgMergeWindow->GetColorDistance(0, 1, pt.x, pt.y);\r
-       if (m_pImgMergeWindow->GetPaneCount() == 3)\r
-               colorDistance12 = m_pImgMergeWindow->GetColorDistance(1, 2, pt.x, pt.y);\r
-       for (int pane = 0; pane < m_pImgMergeWindow->GetPaneCount(); ++pane)\r
-       {\r
-               wchar_t buf[256], *p = buf;\r
-               if (pt.x >= 0 && pt.y >= 0 &&\r
-                   pt.x < m_pImgMergeWindow->GetImageWidth(pane) &&\r
-                   pt.y < m_pImgMergeWindow->GetImageHeight(pane))\r
-               {\r
-                       POINT ptOffset = m_pImgMergeWindow->GetImageOffset(pane);\r
-                       p += wsprintfW(p, L"Pt:(%d,%d) ", pt.x - ptOffset.x, pt.y - ptOffset.y);\r
-                       p += wsprintfW(p, L"RGBA:(%d,%d,%d,%d) ",\r
-                               color[pane].rgbRed, color[pane].rgbGreen, color[pane].rgbBlue, color[pane].rgbReserved);\r
-                       if (pane == 1 && m_pImgMergeWindow->GetPaneCount() == 3)\r
-                               p += swprintf_s(p, buf + sizeof(buf)/sizeof(wchar_t) - p, L"Dist:%g,%g ", colorDistance01, colorDistance12);\r
-                       else\r
-                               p += swprintf_s(p, buf + sizeof(buf)/sizeof(wchar_t) - p, L"Dist:%g ", colorDistance01);\r
-               }\r
-               p += wsprintfW(p, L"Page:%d/%d Zoom:%d%% Diff:%d/%d %dx%dpx %dbpp", \r
-                       m_pImgMergeWindow->GetCurrentPage(pane) + 1,\r
-                       m_pImgMergeWindow->GetPageCount(pane),\r
-                       static_cast<int>(m_pImgMergeWindow->GetZoom() * 100),\r
-                       m_pImgMergeWindow->GetCurrentDiffIndex() + 1,\r
-                       m_pImgMergeWindow->GetDiffCount(),\r
-                       m_pImgMergeWindow->GetImageWidth(pane),\r
-                       m_pImgMergeWindow->GetImageHeight(pane),\r
-                       m_pImgMergeWindow->GetImageBitsPerPixel(pane)\r
-                       );\r
-               SendMessage(m_hwndStatusBar, SB_SETTEXT, (WPARAM)pane | 0, (LPARAM)buf);\r
-       }\r
-}\r
-\r
-void OnChildPaneEvent(const IImgMergeWindow::Event& evt)\r
-{\r
-       if (evt.eventType == IImgMergeWindow::CONTEXTMENU)\r
-       {\r
-               HMENU hPopup = LoadMenu(m_hInstance, MAKEINTRESOURCE(IDR_POPUPMENU));\r
-               HMENU hSubMenu = GetSubMenu(hPopup, 0);\r
-               TrackPopupMenu(hSubMenu, TPM_LEFTALIGN, evt.x, evt.y, 0, m_hWnd, NULL); \r
-       }\r
-       else if (evt.eventType == IImgMergeWindow::KEYDOWN && GetAsyncKeyState(VK_SHIFT))\r
-       {\r
-               int nActivePane = m_pImgMergeWindow->GetActivePane();\r
-               int m = GetAsyncKeyState(VK_CONTROL) ? 8 : 1;\r
-               int dx = (-(evt.keycode == VK_LEFT) + (evt.keycode == VK_RIGHT)) * m;\r
-               int dy = (-(evt.keycode == VK_UP  ) + (evt.keycode == VK_DOWN )) * m;\r
-               m_pImgMergeWindow->AddImageOffset(nActivePane, dx, dy);\r
-       }\r
-}\r
-\r
-bool GenerateHTMLReport(const wchar_t *filename)\r
-{\r
-       wchar_t imgdir[MAX_PATH], imgdir_full[MAX_PATH], imgfilepath[3][MAX_PATH], difffilename[3][MAX_PATH];\r
-       char imgfilepath_utf8[3][MAX_PATH], difffilename_utf8[3][MAX_PATH];\r
-       wcscpy_s(imgdir_full, filename);\r
-       PathRemoveExtensionW(imgdir_full);\r
-       PathAddExtensionW(imgdir_full, L".files");\r
-       wcscpy_s(imgdir, PathFindFileName(imgdir_full));\r
-       CreateDirectoryW(imgdir_full, NULL);\r
-       for (int i = 0; i < m_pImgMergeWindow->GetPaneCount(); ++i)\r
-       {\r
-               wcscpy_s(imgfilepath[i], m_pImgMergeWindow->GetFileName(i));\r
-               WideCharToMultiByte(CP_UTF8, 0, imgfilepath[i], -1, imgfilepath_utf8[i], sizeof(imgfilepath_utf8[i]), NULL, NULL);\r
-               wsprintfW(difffilename[i], L"%s/%d.png", imgdir, i + 1);\r
-               WideCharToMultiByte(CP_UTF8, 0, difffilename[i], -1, difffilename_utf8[i], sizeof(difffilename_utf8[i]), NULL, NULL);\r
-               wchar_t tmp[MAX_PATH];\r
-               wsprintfW(tmp, L"%s\\%d.png", imgdir_full, i + 1);\r
-               m_pImgMergeWindow->SaveDiffImageAs(i, tmp);\r
-       }\r
-       std::ofstream fout;\r
-       try\r
-       {\r
-               fout.open(filename, std::ios::out | std::ios::trunc);\r
-               fout << \r
-                       "<!DOCTYPE html>" << std::endl <<\r
-                       "<html>" << std::endl <<\r
-                       "<head>" << std::endl <<\r
-                       "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">" << std::endl <<\r
-                       "<title>WinMerge Image Compare Report</title>" << std::endl <<\r
-                       "<style type=\"text/css\">" << std::endl <<\r
-                       "table { table-layout: fixed; width: 100%; height: 100%; border-collapse: collapse; }" << std::endl <<\r
-                       "th,td { border: solid 1px black; }" << std::endl <<\r
-                       ".title { color: white; background-color: blue; vertical-align: top; }" << std::endl <<\r
-                       ".img   { height: 100%; overflow: scroll; text-align: center; }" << std::endl <<\r
-                       "</style>" << std::endl <<\r
-                       "</head>" << std::endl <<\r
-                       "<body>" << std::endl <<\r
-                       "<table>" << std::endl <<\r
-                       "<tr>" << std::endl;\r
-               for (int i = 0; i < m_pImgMergeWindow->GetPaneCount(); ++i)\r
-                       fout << "<th class=\"title\">" << imgfilepath_utf8[i] << "</th>" << std::endl;\r
-               fout << \r
-                       "</tr>" << std::endl <<\r
-                       "<tr>" << std::endl;\r
-               for (int i = 0; i < m_pImgMergeWindow->GetPaneCount(); ++i)\r
-                       fout << "<td><div class=\"img\"><img src=\"" << difffilename_utf8[i] << \r
-                       "\" alt=\"" << difffilename_utf8[i] << "\"></div></td>" << std::endl;\r
-               fout <<\r
-                       "</tr>" << std::endl <<\r
-                       "</table>" << std::endl <<\r
-                       "</body>" << std::endl <<\r
-                       "</html>" << std::endl;\r
-               return true;\r
-       }\r
-       catch (...)\r
-       {\r
-               return false;\r
-       }\r
-}\r
-\r
-LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)\r
-{\r
-       switch (message) \r
-       {\r
-       case WM_CREATE:\r
-               m_hwndStatusBar = CreateWindowEx(0, \r
-                       STATUSCLASSNAME, NULL, \r
-                       WS_CHILD | SBARS_SIZEGRIP | CCS_BOTTOM | WS_VISIBLE, \r
-                       0, 0, 0, 0, hWnd, (HMENU)1000, m_hInstance, NULL);\r
-               m_pImgMergeWindow = WinIMerge_CreateWindow(hInstDLL, hWnd);\r
-               m_pImgMergeWindow->AddEventListener(OnChildPaneEvent, NULL);\r
-               m_pImgToolWindow = WinIMerge_CreateToolWindow(hInstDLL, hWnd, m_pImgMergeWindow);\r
-               m_hwndImgToolWindow = m_pImgToolWindow->GetHWND();\r
-               SetTimer(hWnd, 1, 250, NULL);\r
-               UpdateMenuState(hWnd);\r
-               break;\r
-       case WM_TIMER:\r
-       {\r
-               int widths[3] = {0};\r
-               for (int i = 0; i < m_pImgMergeWindow->GetPaneCount(); ++i)\r
-               {\r
-                       RECT rc = m_pImgMergeWindow->GetPaneWindowRect(i);\r
-                       widths[i] = rc.right - rc.left + ((i > 0) ? widths[i - 1] : 0);\r
-               }\r
-               SendMessage(m_hwndStatusBar, SB_SETPARTS, (WPARAM)m_pImgMergeWindow->GetPaneCount(), (LPARAM)widths);\r
-               UpdateWindowTitle(hWnd);\r
-               UpdateStatusBar();\r
-               break;\r
-       }\r
-       case WM_SIZE:\r
-       {\r
-               RECT rc, rcToolWindow, rcStatusBar;\r
-               GetClientRect(hWnd, &rc);\r
-               GetClientRect(m_hwndStatusBar, &rcStatusBar);\r
-               GetClientRect(m_hwndImgToolWindow, &rcToolWindow);\r
-               rc.bottom -= rcStatusBar.bottom;\r
-               rc.right -= rcToolWindow.right;\r
-               m_pImgMergeWindow->SetWindowRect(rc);\r
-               MoveWindow(m_hwndImgToolWindow, rc.right, 0, rcToolWindow.right, rc.bottom, TRUE);\r
-               MoveWindow(m_hwndStatusBar, rc.left, rc.bottom, rc.right, rc.bottom + rcStatusBar.bottom, TRUE);\r
-               break;\r
-       }\r
-       case WM_COMMAND:\r
-       {\r
-               int wmId    = LOWORD(wParam); \r
-               switch (wmId)\r
-               {\r
-               case ID_FILE_OPEN:\r
-               case ID_FILE_OPEN3:\r
-               {\r
-                       wchar_t szFileName[MAX_PATH] = {0}, szFile[MAX_PATH] = {0};\r
-                       OPENFILENAMEW ofn = {0};\r
-                       ofn.lStructSize = sizeof(OPENFILENAME);\r
-                       ofn.hwndOwner = hWnd;\r
-                       ofn.lpstrFilter = L"Images (*.jpg;*.png;*.bmp;*.gif;*.tga;*.psd;*.ico;*.cur)\0*.jpg;*.png;*.bmp;*.gif;*.tga;*.psd;*.ico;*.cur\0\0";\r
-                       ofn.lpstrFile = szFileName;\r
-                       ofn.lpstrFileTitle = szFile;\r
-                       ofn.nMaxFile = MAX_PATH;\r
-                       ofn.nMaxFileTitle = sizeof(szFile);\r
-                       ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;\r
-                       ofn.lpstrTitle = L"Open File";\r
-                       std::wstring filename[3];\r
-                       wchar_t title[256];\r
-                       int nImages = (wmId - ID_FILE_OPEN) + 2;\r
-                       int i;\r
-                       for (i = 0; i < nImages; ++i)\r
-                       {\r
-                               wsprintfW(title, L"Open #%d File", i + 1);\r
-                               ofn.lpstrTitle = title;\r
-                               if (GetOpenFileNameW(&ofn) != 0)\r
-                                       filename[i] = ofn.lpstrFile;\r
-                               else\r
-                                       break;\r
-                       }\r
-                       if (nImages == i)\r
-                               OpenImages(hWnd, nImages, filename);\r
-                       break;\r
-               }\r
-               case ID_FILE_SAVE:\r
-                       m_pImgMergeWindow->SaveImages();\r
-                       break;\r
-               case ID_FILE_RELOAD:\r
-                       m_pImgMergeWindow->ReloadImages();\r
-                       break;\r
-               case ID_FILE_GENERATE_REPORT:\r
-               {\r
-                       wchar_t szFileName[MAX_PATH] = {0}, szFile[MAX_PATH] = {0};\r
-                       OPENFILENAMEW ofn = {0};\r
-                       ofn.lStructSize = sizeof(OPENFILENAME);\r
-                       ofn.hwndOwner = hWnd;\r
-                       ofn.lpstrFilter = L"HTML file(*.html)\0*.html\0\0";\r
-                       ofn.lpstrFile = szFileName;\r
-                       ofn.lpstrFileTitle = szFile;\r
-                       ofn.nMaxFile = MAX_PATH;\r
-                       ofn.nMaxFileTitle = sizeof(szFile);\r
-                       ofn.Flags = OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;\r
-                       ofn.lpstrTitle = L"Generate HTML Report File";\r
-                       ofn.lpstrDefExt = L"html";\r
-                       if (GetSaveFileNameW(&ofn) != 0)\r
-                       {\r
-                               GenerateHTMLReport(ofn.lpstrFile);\r
-                       }\r
-                       break;\r
-               }\r
-               case ID_FILE_EXIT:\r
-                       DestroyWindow(hWnd);\r
-                       break;\r
-               case ID_EDIT_UNDO:\r
-                       m_pImgMergeWindow->Undo();\r
-                       break;\r
-               case ID_EDIT_REDO:\r
-                       m_pImgMergeWindow->Redo();\r
-                       break;\r
-               case ID_VIEW_ZOOM_400:\r
-               case ID_VIEW_ZOOM_200:\r
-               case ID_VIEW_ZOOM_100:\r
-               case ID_VIEW_ZOOM_50:\r
-               case ID_VIEW_ZOOM_25:\r
-                       m_pImgMergeWindow->SetZoom(pow(2.0, (wmId - ID_VIEW_ZOOM_100)));\r
-                       break;\r
-               case ID_VIEW_OVERLAY_NONE:\r
-                       m_pImgMergeWindow->SetOverlayMode(IImgMergeWindow::OVERLAY_NONE);\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               case ID_VIEW_OVERLAY_ALPHABLEND:\r
-                       m_pImgMergeWindow->SetOverlayMode(IImgMergeWindow::OVERLAY_ALPHABLEND);\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               case ID_VIEW_OVERLAY_XOR:\r
-                       m_pImgMergeWindow->SetOverlayMode(IImgMergeWindow::OVERLAY_XOR);\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               case ID_VIEW_VIEWDIFFERENCES:\r
-                       m_pImgMergeWindow->SetShowDifferences(!m_pImgMergeWindow->GetShowDifferences());\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               case ID_VIEW_DIFFBLOCKSIZE_1:\r
-               case ID_VIEW_DIFFBLOCKSIZE_2:\r
-               case ID_VIEW_DIFFBLOCKSIZE_4:\r
-               case ID_VIEW_DIFFBLOCKSIZE_8:\r
-               case ID_VIEW_DIFFBLOCKSIZE_16:\r
-               case ID_VIEW_DIFFBLOCKSIZE_32:\r
-                       m_pImgMergeWindow->SetDiffBlockSize(1 << (wmId - ID_VIEW_DIFFBLOCKSIZE_1));\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               case ID_VIEW_THRESHOLD_0:\r
-                       m_pImgMergeWindow->SetColorDistanceThreshold(0);\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               case ID_VIEW_THRESHOLD_2:\r
-               case ID_VIEW_THRESHOLD_4:\r
-               case ID_VIEW_THRESHOLD_8:\r
-               case ID_VIEW_THRESHOLD_16:\r
-               case ID_VIEW_THRESHOLD_32:\r
-               case ID_VIEW_THRESHOLD_64:\r
-                       m_pImgMergeWindow->SetColorDistanceThreshold((1 << (wmId - ID_VIEW_THRESHOLD_2)) * 2.0);\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               case ID_VIEW_SPLITHORIZONTALLY:\r
-                       m_pImgMergeWindow->SetHorizontalSplit(!m_pImgMergeWindow->GetHorizontalSplit());\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               case ID_VIEW_PAGE_NEXTPAGE:\r
-               {\r
-                       int page = m_pImgMergeWindow->GetCurrentMaxPage();\r
-                       m_pImgMergeWindow->SetCurrentPageAll(page + 1);\r
-                       break;\r
-               }\r
-               case ID_VIEW_PAGE_PREVPAGE:\r
-               {\r
-                       int page = m_pImgMergeWindow->GetCurrentMaxPage();\r
-                       m_pImgMergeWindow->SetCurrentPageAll(page - 1);\r
-                       break;\r
-               }\r
-               case ID_VIEW_USEBACKCOLOR:\r
-               {\r
-                       bool useBackColor = !m_pImgMergeWindow->GetUseBackColor();\r
-                       if (useBackColor)\r
-                       {\r
-                               RGBQUAD backColor = m_pImgMergeWindow->GetBackColor();\r
-                               CHOOSECOLORW cc = {0};\r
-                               static DWORD dwCustColors[16];\r
-                               cc.lStructSize = sizeof(cc);\r
-                               cc.hwndOwner = hWnd;\r
-                               cc.lpCustColors = dwCustColors;\r
-                               cc.rgbResult = RGB(backColor.rgbRed, backColor.rgbGreen, backColor.rgbBlue);\r
-                               cc.Flags = CC_RGBINIT;\r
-                               if (ChooseColorW(&cc) != 0)\r
-                               {\r
-                                       RGBQUAD backColor = {GetBValue(cc.rgbResult), GetGValue(cc.rgbResult), GetRValue(cc.rgbResult)};\r
-                                       m_pImgMergeWindow->SetBackColor(backColor);\r
-                                       m_pImgMergeWindow->SetUseBackColor(useBackColor);\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               m_pImgMergeWindow->SetUseBackColor(useBackColor);\r
-                       }\r
-                       UpdateMenuState(hWnd);\r
-                       break;\r
-               }\r
-               case ID_MERGE_NEXTDIFFERENCE:\r
-                       m_pImgMergeWindow->NextDiff();\r
-                       break;\r
-               case ID_MERGE_PREVIOUSDIFFERENCE:\r
-                       m_pImgMergeWindow->PrevDiff();\r
-                       break;\r
-               case ID_MERGE_FIRSTDIFFERENCE:\r
-                       m_pImgMergeWindow->FirstDiff();\r
-                       break;\r
-               case ID_MERGE_LASTDIFFERENCE:\r
-                       m_pImgMergeWindow->LastDiff();\r
-                       break;\r
-               case ID_MERGE_NEXTCONFLICT:\r
-                       m_pImgMergeWindow->NextConflict();\r
-                       break;\r
-               case ID_MERGE_PREVIOUSCONFLICT:\r
-                       m_pImgMergeWindow->PrevConflict();\r
-                       break;\r
-               case ID_MERGE_COPYTORIGHT:\r
-               {\r
-                       int srcPane = m_pImgMergeWindow->GetActivePane();\r
-                       if (srcPane < 0)\r
-                               srcPane = 0;\r
-                       if (srcPane >= m_pImgMergeWindow->GetPaneCount() - 1)\r
-                               srcPane = m_pImgMergeWindow->GetPaneCount() - 2;\r
-                       int dstPane = srcPane + 1;\r
-                       m_pImgMergeWindow->CopyDiff(m_pImgMergeWindow->GetCurrentDiffIndex(), srcPane, dstPane);\r
-                       break;\r
-               }\r
-               case ID_MERGE_COPYTOLEFT:\r
-               {\r
-                       int srcPane = m_pImgMergeWindow->GetActivePane();\r
-                       if (srcPane < 1)\r
-                               srcPane = 1;\r
-                       int dstPane = srcPane - 1;\r
-                       m_pImgMergeWindow->CopyDiff(m_pImgMergeWindow->GetCurrentDiffIndex(), srcPane, dstPane);\r
-                       break;\r
-               }\r
-               case ID_MERGE_COPYFROMLEFT:\r
-               {\r
-                       int srcPane = m_pImgMergeWindow->GetActivePane() - 1;\r
-                       if (srcPane < 0)\r
-                               srcPane = 0;\r
-                       int dstPane = srcPane + 1;\r
-                       m_pImgMergeWindow->CopyDiff(m_pImgMergeWindow->GetCurrentDiffIndex(), srcPane, dstPane);\r
-                       break;\r
-               }\r
-               case ID_MERGE_COPYFROMRIGHT:\r
-               {\r
-                       int srcPane = m_pImgMergeWindow->GetActivePane() + 1;\r
-                       if (srcPane > m_pImgMergeWindow->GetPaneCount() - 1)\r
-                               srcPane = m_pImgMergeWindow->GetPaneCount() - 1;\r
-                       int dstPane = srcPane - 1;\r
-                       m_pImgMergeWindow->CopyDiff(m_pImgMergeWindow->GetCurrentDiffIndex(), srcPane, dstPane);\r
-                       break;\r
-               }\r
-               case ID_MERGE_COPYALLTORIGHT:\r
-               {\r
-                       int srcPane = m_pImgMergeWindow->GetActivePane();\r
-                       if (srcPane < 0)\r
-                               srcPane = 0;\r
-                       if (srcPane >= m_pImgMergeWindow->GetPaneCount() - 1)\r
-                               srcPane = m_pImgMergeWindow->GetPaneCount() - 2;\r
-                       int dstPane = srcPane + 1;\r
-                       m_pImgMergeWindow->CopyDiffAll(srcPane, dstPane);\r
-                       break;\r
-               }\r
-               case ID_MERGE_COPYALLTOLEFT:\r
-               {\r
-                       int srcPane = m_pImgMergeWindow->GetActivePane();\r
-                       if (srcPane < 1)\r
-                               srcPane = 1;\r
-                       int dstPane = srcPane - 1;\r
-                       m_pImgMergeWindow->CopyDiffAll(srcPane, dstPane);\r
-                       break;\r
-               }\r
-               case ID_MERGE_AUTOMERGE:\r
-               {\r
-                       int dstPane = m_pImgMergeWindow->GetActivePane();\r
-                       if (dstPane < 0)\r
-                               break;\r
-                       int nMerged = m_pImgMergeWindow->CopyDiff3Way(dstPane);\r
-                       wchar_t msg[256];\r
-                       wsprintfW(msg, L"The number of automatically merged changes: %d\n"\r
-                                      L"The number of unresolved conflicts: %d\n"\r
-                                                  , nMerged, m_pImgMergeWindow->GetConflictCount());\r
-                       MessageBoxW(hWnd, msg, L"WinIMerge", MB_OK | MB_ICONINFORMATION);\r
-\r
-                       break;\r
-               }\r
-               case ID_HELP_ABOUT:\r
-                       MessageBoxW(hWnd, \r
-                               L"WinIMerge\n\n"\r
-                               L"(c) 2014-2015 sdottaka@users.sourceforge.net All rights reserved.\n\n"\r
-                               L"This software uses the FreeImage open source image library. \n"\r
-                               L"See http://freeimage.sourceforge.net for details.\n"\r
-                               L"FreeImage is used under the GNU GPL version.\n", L"WinIMerge", MB_OK | MB_ICONINFORMATION);\r
-                       break;\r
-               case ID_POPUP_CURPANE_PREVIOUSPAGE:\r
-               {\r
-                       int nActivePane = m_pImgMergeWindow->GetActivePane();\r
-                       m_pImgMergeWindow->SetCurrentPage(nActivePane, m_pImgMergeWindow->GetCurrentPage(nActivePane) - 1);\r
-                       break;\r
-               }\r
-               case ID_POPUP_CURPANE_NEXTPAGE:\r
-               {\r
-                       int nActivePane = m_pImgMergeWindow->GetActivePane();\r
-                       m_pImgMergeWindow->SetCurrentPage(nActivePane, m_pImgMergeWindow->GetCurrentPage(nActivePane) + 1);\r
-                       break;\r
-               }\r
-               default:\r
-                       return DefWindowProc(hWnd, message, wParam, lParam);\r
-               }\r
-               break;\r
-       }\r
-       case WM_MOUSEWHEEL:\r
-               PostMessage(m_pImgMergeWindow->GetHWND(), message, wParam, lParam);\r
-               break;\r
-       case WM_DESTROY:\r
-               WinIMerge_DestroyWindow(m_pImgMergeWindow);     \r
-               PostQuitMessage(0);\r
-               break;\r
-       default:\r
-               return DefWindowProc(hWnd, message, wParam, lParam);\r
-       }\r
-       return 0;\r
-}\r
diff --git a/src/WinIMerge.h b/src/WinIMerge.h
deleted file mode 100644 (file)
index e60f2eb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once\r
-\r
-#include "resource.h"\r
diff --git a/src/WinIMerge.ico b/src/WinIMerge.ico
deleted file mode 100644 (file)
index b2a7c74..0000000
Binary files a/src/WinIMerge.ico and /dev/null differ
diff --git a/src/WinIMerge.rc b/src/WinIMerge.rc
deleted file mode 100644 (file)
index 21631c4..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-// Microsoft Visual C++ generated resource script.\r
-//\r
-#include "resource.h"\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#define APSTUDIO_HIDDEN_SYMBOLS\r
-#include "windows.h"\r
-#undef APSTUDIO_HIDDEN_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// \89p\8cê (\95Ä\8d\91) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
-#pragma code_page(1252)\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-\r
-1 TEXTINCLUDE \r
-BEGIN\r
-    "resource.h\0"\r
-END\r
-\r
-2 TEXTINCLUDE \r
-BEGIN\r
-    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
-    "#include ""windows.h""\r\n"\r
-    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
-    "\0"\r
-END\r
-\r
-3 TEXTINCLUDE \r
-BEGIN\r
-    "\r\n"\r
-    "\0"\r
-END\r
-\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Icon\r
-//\r
-\r
-// Icon with lowest ID value placed first to ensure application icon\r
-// remains consistent on all systems.\r
-IDI_WINIMERGE           ICON                    "WinIMerge.ico"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Menu\r
-//\r
-\r
-IDC_WINIMERGE MENU\r
-BEGIN\r
-    POPUP "&File"\r
-    BEGIN\r
-        MENUITEM "&Open Images\tCtrl+O",        ID_FILE_OPEN\r
-        MENUITEM "Open &3 Images\tCtrl+3",      ID_FILE_OPEN3\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Save\tCtrl+S",               ID_FILE_SAVE\r
-        MENUITEM "&Generate Report",            ID_FILE_GENERATE_REPORT\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Re&load\tCtrl+F5",            ID_FILE_RELOAD\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "E&xit\tAlt+F4",               ID_FILE_EXIT\r
-    END\r
-    POPUP "&Edit"\r
-    BEGIN\r
-        MENUITEM "&Undo\tCtrl+Z",               ID_EDIT_UNDO\r
-        MENUITEM "&Redo\tCtrl+Y",               ID_EDIT_REDO\r
-    END\r
-    POPUP "&View"\r
-    BEGIN\r
-        MENUITEM "View &Differences",           ID_VIEW_VIEWDIFFERENCES\r
-        POPUP "Diff &Block Size"\r
-        BEGIN\r
-            MENUITEM "&1",                          ID_VIEW_DIFFBLOCKSIZE_1\r
-            MENUITEM "&2",                          ID_VIEW_DIFFBLOCKSIZE_2\r
-            MENUITEM "&4",                          ID_VIEW_DIFFBLOCKSIZE_4\r
-            MENUITEM "&8",                          ID_VIEW_DIFFBLOCKSIZE_8\r
-            MENUITEM "1&6",                         ID_VIEW_DIFFBLOCKSIZE_16\r
-            MENUITEM "&32",                         ID_VIEW_DIFFBLOCKSIZE_32\r
-        END\r
-        POPUP "&Ignore Color Difference (Color Distance Threshold)"\r
-        BEGIN\r
-            MENUITEM "&0",                          ID_VIEW_THRESHOLD_0\r
-            MENUITEM "&2",                          ID_VIEW_THRESHOLD_2\r
-            MENUITEM "&4",                          ID_VIEW_THRESHOLD_4\r
-            MENUITEM "&8",                          ID_VIEW_THRESHOLD_8\r
-            MENUITEM "1&6",                         ID_VIEW_THRESHOLD_16\r
-            MENUITEM "&32",                         ID_VIEW_THRESHOLD_32\r
-            MENUITEM "64",                          ID_VIEW_THRESHOLD_64\r
-        END\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Prev Page",                  ID_VIEW_PAGE_PREVPAGE\r
-        MENUITEM "&Next Page",                  ID_VIEW_PAGE_NEXTPAGE\r
-        POPUP "&Active Pane"\r
-        BEGIN\r
-            MENUITEM "&Previous Page",              ID_POPUP_CURPANE_PREVIOUSPAGE\r
-            MENUITEM "&Next Page",                  ID_POPUP_CURPANE_NEXTPAGE\r
-        END\r
-        MENUITEM SEPARATOR\r
-        POPUP "&Zoom"\r
-        BEGIN\r
-            MENUITEM "&400%",                       ID_VIEW_ZOOM_400\r
-            MENUITEM "&200%",                       ID_VIEW_ZOOM_200\r
-            MENUITEM "&100%",                       ID_VIEW_ZOOM_100\r
-            MENUITEM "&50%",                        ID_VIEW_ZOOM_50\r
-            MENUITEM "&25%",                        ID_VIEW_ZOOM_25\r
-        END\r
-        POPUP "&Overlay Mode"\r
-        BEGIN\r
-            MENUITEM "&None",                       ID_VIEW_OVERLAY_NONE\r
-            MENUITEM "&XOR",                        ID_VIEW_OVERLAY_XOR\r
-            MENUITEM "&Alpha Blend",                ID_VIEW_OVERLAY_ALPHABLEND\r
-            MENUITEM "Alpha &Blend Animation",      ID_VIEW_OVERLAY_ALPHABLEND_ANIM\r
-        END\r
-        MENUITEM "Split &Horizontally",         ID_VIEW_SPLITHORIZONTALLY\r
-        MENUITEM "&Set Background Color",       ID_VIEW_USEBACKCOLOR\r
-    END\r
-    POPUP "&Merge"\r
-    BEGIN\r
-        MENUITEM "&Next Difference\tAlt+Down",  ID_MERGE_NEXTDIFFERENCE\r
-        MENUITEM "&Previous Difference\tAlt+Up", ID_MERGE_PREVIOUSDIFFERENCE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&First Difference\tAlt+Home", ID_MERGE_FIRSTDIFFERENCE\r
-        MENUITEM "&Last Difference\tAlt+End",   ID_MERGE_LASTDIFFERENCE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Next Conflict\tAlt+Shift+Down", ID_MERGE_NEXTCONFLICT\r
-        MENUITEM "Previous Conflict\tAlt+Shift+Up", ID_MERGE_PREVIOUSCONFLICT\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Copy to &Right\tAlt+Right",   ID_MERGE_COPYTORIGHT\r
-        MENUITEM "Copy to L&eft\tAlt+Left",     ID_MERGE_COPYTOLEFT\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Copy from Left\tAlt+Shift+Right", ID_MERGE_COPYFROMLEFT\r
-        MENUITEM "Copy from Right\tAlt+Shift+Left", ID_MERGE_COPYFROMRIGHT\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Copy &All to Right",          ID_MERGE_COPYALLTORIGHT\r
-        MENUITEM "Cop&y All to Left",           ID_MERGE_COPYALLTOLEFT\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Auto Merge\tAlt+Ctrl+M",      ID_MERGE_AUTOMERGE\r
-    END\r
-    POPUP "&Help"\r
-    BEGIN\r
-        MENUITEM "&About",                      ID_HELP_ABOUT\r
-    END\r
-END\r
-\r
-IDR_POPUPMENU MENU\r
-BEGIN\r
-    POPUP "popup"\r
-    BEGIN\r
-        MENUITEM "Current Pane: &Previous Page", ID_POPUP_CURPANE_PREVIOUSPAGE\r
-        MENUITEM "Current Pane: &Next Page",    ID_POPUP_CURPANE_NEXTPAGE\r
-    END\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Accelerator\r
-//\r
-\r
-IDC_WINIMERGE ACCELERATORS\r
-BEGIN\r
-    "Y",            ID_EDIT_REDO,           VIRTKEY, CONTROL, NOINVERT\r
-    "Z",            ID_EDIT_UNDO,           VIRTKEY, CONTROL, NOINVERT\r
-    "O",            ID_FILE_OPEN,           VIRTKEY, CONTROL, NOINVERT\r
-    VK_F5,          ID_FILE_RELOAD,         VIRTKEY, CONTROL, NOINVERT\r
-    "S",            ID_FILE_SAVE,           VIRTKEY, CONTROL, NOINVERT\r
-    "M",            ID_MERGE_AUTOMERGE,     VIRTKEY, CONTROL, ALT, NOINVERT\r
-    VK_RIGHT,       ID_MERGE_COPYFROMLEFT,  VIRTKEY, SHIFT, ALT, NOINVERT\r
-    VK_LEFT,        ID_MERGE_COPYFROMRIGHT, VIRTKEY, SHIFT, ALT, NOINVERT\r
-    VK_LEFT,        ID_MERGE_COPYTOLEFT,    VIRTKEY, ALT, NOINVERT\r
-    VK_RIGHT,       ID_MERGE_COPYTORIGHT,   VIRTKEY, ALT, NOINVERT\r
-    VK_HOME,        ID_MERGE_FIRSTDIFFERENCE, VIRTKEY, ALT, NOINVERT\r
-    VK_END,         ID_MERGE_LASTDIFFERENCE, VIRTKEY, ALT, NOINVERT\r
-    VK_DOWN,        ID_MERGE_NEXTCONFLICT,  VIRTKEY, SHIFT, ALT, NOINVERT\r
-    VK_DOWN,        ID_MERGE_NEXTDIFFERENCE, VIRTKEY, ALT, NOINVERT\r
-    VK_UP,          ID_MERGE_PREVIOUSCONFLICT, VIRTKEY, SHIFT, ALT, NOINVERT\r
-    VK_UP,          ID_MERGE_PREVIOUSDIFFERENCE, VIRTKEY, ALT, NOINVERT\r
-    "0",            ID_VIEW_ZOOM_100,       VIRTKEY, CONTROL, NOINVERT\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Version\r
-//\r
-\r
-#include "../Version.h"\r
-VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION FILEVER\r
- PRODUCTVERSION PRODUCTVER\r
- FILEFLAGSMASK 0x3fL\r
-#ifdef _DEBUG\r
- FILEFLAGS 0x1L\r
-#else\r
- FILEFLAGS 0x0L\r
-#endif\r
- FILEOS 0x40004L\r
- FILETYPE 0x1L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
-    BLOCK "StringFileInfo"\r
-    BEGIN\r
-        BLOCK "040904b0"\r
-        BEGIN\r
-            VALUE "CompanyName", "https://bitbucket.org/sdottaka/winimerge"\r
-            VALUE "FileDescription", "WinIMerge"\r
-            VALUE "FileVersion", STRFILEVER\r
-            VALUE "InternalName", "WinIMerge.exe"\r
-            VALUE "LegalCopyright", "Copyright (C) 2014-2015 sdottaka@users.sourceforge.net"\r
-            VALUE "OriginalFilename", "WinIMerge.exe"\r
-            VALUE "ProductName", "WinIMerge"\r
-            VALUE "ProductVersion", STRPRODUCTVER\r
-        END\r
-    END\r
-    BLOCK "VarFileInfo"\r
-    BEGIN\r
-        VALUE "Translation", 0x409, 1200\r
-    END\r
-END\r
-\r
-#endif    // \89p\8cê (\95Ä\8d\91) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif    // not APSTUDIO_INVOKED\r
-\r
diff --git a/src/WinIMerge.vcxproj b/src/WinIMerge.vcxproj
deleted file mode 100644 (file)
index 254b714..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{36365C8C-04A0-4892-9B83-AD6E05D50D67}</ProjectGuid>\r
-    <Keyword>Win32Proj</Keyword>\r
-    <ProjectName>WinIMerge</ProjectName>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\Build\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\Build\$(Platform)\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\BuildTmp\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\BuildTmp\$(Platform)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\Build\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\Build\$(Platform)\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\BuildTmp\$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\BuildTmp\$(Platform)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>WinIMergeLib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)$(TargetFileName)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ProgramDatabaseFile>$(OutDir)WinIMerge.pdb</ProgramDatabaseFile>\r
-      <SubSystem>Windows</SubSystem>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-    </Link>\r
-    <Manifest>\r
-      <EnableDpiAwareness>true</EnableDpiAwareness>\r
-    </Manifest>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist;..\..\FreeImage\Wrapper\FreeImagePlus\dist;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\r
-      <ObjectFileName>$(IntDir)</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>WinIMergeLib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)$(TargetFileName)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ProgramDatabaseFile>$(OutDir)WinIMerge.pdb</ProgramDatabaseFile>\r
-      <SubSystem>Windows</SubSystem>\r
-    </Link>\r
-    <Manifest>\r
-      <EnableDpiAwareness>true</EnableDpiAwareness>\r
-    </Manifest>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <ClCompile>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>WinIMergeLib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)$(TargetFileName)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-    </Link>\r
-    <Manifest>\r
-      <EnableDpiAwareness>true</EnableDpiAwareness>\r
-    </Manifest>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <ClCompile>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist;..\..\FreeImage\Wrapper\FreeImagePlus\dist;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\r
-      <ObjectFileName>$(IntDir)</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>WinIMergeLib.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)$(TargetFileName)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-    </Link>\r
-    <Manifest>\r
-      <EnableDpiAwareness>true</EnableDpiAwareness>\r
-    </Manifest>\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="Resource.h" />\r
-    <ClInclude Include="WinIMerge.h" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="WinIMerge.cpp" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <None Include="WinIMerge.ico" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ResourceCompile Include="WinIMerge.rc" />\r
-  </ItemGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
-  <ImportGroup Label="ExtensionTargets">\r
-  </ImportGroup>\r
-</Project>
\ No newline at end of file
diff --git a/src/WinIMerge.vcxproj.filters b/src/WinIMerge.vcxproj.filters
deleted file mode 100644 (file)
index f34bd1a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup>\r
-    <Filter Include="Source Files">\r
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
-      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
-    </Filter>\r
-    <Filter Include="Header Files">\r
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
-    </Filter>\r
-    <Filter Include="Resource Files">\r
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>\r
-    </Filter>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="Resource.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="WinIMerge.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="WinIMerge.cpp">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <None Include="WinIMerge.ico">\r
-      <Filter>Resource Files</Filter>\r
-    </None>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ResourceCompile Include="WinIMerge.rc">\r
-      <Filter>Resource Files</Filter>\r
-    </ResourceCompile>\r
-  </ItemGroup>\r
-</Project>
\ No newline at end of file
diff --git a/src/WinIMergeLib.cpp b/src/WinIMergeLib.cpp
deleted file mode 100644 (file)
index 67f7cde..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////\r
-//    License (GPLv2+):\r
-//    This program is free software; you can redistribute it and/or modify\r
-//    it under the terms of the GNU General Public License as published by\r
-//    the Free Software Foundation; either version 2 of the License, or\r
-//    (at your option) any later version.\r
-//\r
-//    This program is distributed in the hope that it will be useful, but\r
-//    WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//    General Public License for more details.\r
-//\r
-//    You should have received a copy of the GNU General Public License\r
-//    along with this program; if not, write to the Free Software\r
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#include <Windows.h>\r
-#include "ImgWindow.hpp"\r
-#include "ImgMergeWindow.hpp"\r
-#include "ImgToolWindow.hpp"\r
-\r
-extern "C" IImgMergeWindow *\r
-WinIMerge_CreateWindow(HINSTANCE hInstance, HWND hWndParent, int nID)\r
-{\r
-       RECT rc = {0};\r
-       CImgMergeWindow *pImgMergeWindow = new CImgMergeWindow();\r
-       pImgMergeWindow->Create(hInstance, hWndParent, nID, rc);\r
-       return static_cast<IImgMergeWindow *>(pImgMergeWindow);\r
-}\r
-\r
-extern "C" bool\r
-WinIMerge_DestroyWindow(IImgMergeWindow *pImgMergeWindow)\r
-{\r
-       CImgMergeWindow *pImgMergeWindow2 = static_cast<CImgMergeWindow *>(pImgMergeWindow);\r
-       pImgMergeWindow2->Destroy();\r
-       delete pImgMergeWindow2;\r
-       return true;\r
-}\r
-\r
-extern "C" IImgToolWindow *\r
-WinIMerge_CreateToolWindow(HINSTANCE hInstance, HWND hWndParent, IImgMergeWindow *pImgMergeWindow)\r
-{\r
-       RECT rc = {0};\r
-       CImgToolWindow *pImgToolWindow = new CImgToolWindow();\r
-       pImgToolWindow->Create(hInstance, hWndParent);\r
-       pImgToolWindow->SetImgMergeWindow(pImgMergeWindow);\r
-       return static_cast<IImgToolWindow *>(pImgToolWindow);\r
-}\r
-\r
-extern "C" bool\r
-WinIMerge_DestroyToolWindow(IImgToolWindow *pImgToolWindow)\r
-{\r
-       CImgToolWindow *pImgToolWindow2 = static_cast<CImgToolWindow *>(pImgToolWindow);\r
-       pImgToolWindow2->Destroy();\r
-       delete pImgToolWindow2;\r
-       return true;\r
-}\r
-\r
-BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID)\r
-{\r
-       if (dwReason == DLL_PROCESS_ATTACH)\r
-       {\r
-               FreeImage_Initialise();\r
-               return TRUE;\r
-       }\r
-       else if (dwReason == DLL_PROCESS_DETACH)\r
-       {\r
-               FreeImage_DeInitialise();\r
-       }\r
-       return FALSE;\r
-}\r
diff --git a/src/WinIMergeLib.def b/src/WinIMergeLib.def
deleted file mode 100644 (file)
index 637429d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-EXPORTS\r
-       WinIMerge_CreateWindow\r
-       WinIMerge_DestroyWindow\r
-       WinIMerge_CreateToolWindow\r
-       WinIMerge_DestroyToolWindow\r
diff --git a/src/WinIMergeLib.h b/src/WinIMergeLib.h
deleted file mode 100644 (file)
index cb7dcb0..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////\r
-//    License (GPLv2+):\r
-//    This program is free software; you can redistribute it and/or modify\r
-//    it under the terms of the GNU General Public License as published by\r
-//    the Free Software Foundation; either version 2 of the License, or\r
-//    (at your option) any later version.\r
-//\r
-//    This program is distributed in the hope that it will be useful, but\r
-//    WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//    General Public License for more details.\r
-//\r
-//    You should have received a copy of the GNU General Public License\r
-//    along with this program; if not, write to the Free Software\r
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#pragma once\r
-\r
-#include <Windows.h>\r
-\r
-struct IImgMergeWindow\r
-{\r
-       enum OVERLAY_MODE {\r
-               OVERLAY_NONE = 0, OVERLAY_XOR, OVERLAY_ALPHABLEND, OVERLAY_ALPHABLEND_ANIM\r
-       };\r
-       enum EVENT_TYPE {\r
-               LBUTTONDOWN = 0, LBUTTONUP, LBUTTONDBLCLK, \r
-               RBUTTONDOWN,     RBUTTONUP, RBUTTONDBLCLK,\r
-               MOUSEMOVE, MOUSEWHEEL, CONTEXTMENU,\r
-               KEYDOWN, KEYUP,\r
-               SIZE, HSCROLL, VSCROLL, SETFOCUS, KILLFOCUS,\r
-               REFRESH, SCROLLTODIFF, OPEN\r
-       };\r
-       struct Event\r
-       {\r
-               void *userdata;\r
-               int pane;\r
-               EVENT_TYPE eventType;\r
-               int x;\r
-               int y;\r
-               unsigned flags;\r
-               int delta;\r
-               int width;\r
-               int height;\r
-               int keycode;\r
-               int diffIndex;\r
-       };\r
-       typedef void (*EventListenerFunc)(const Event& evt);\r
-       virtual bool OpenImages(const wchar_t *filename1, const wchar_t *filename2) = 0;\r
-       virtual bool OpenImages(const wchar_t *filename1, const wchar_t *filename2, const wchar_t *filename3) = 0;\r
-       virtual bool ReloadImages() = 0;\r
-       virtual bool SaveImages() = 0;\r
-       virtual bool SaveImage(int pane) = 0;\r
-       virtual bool SaveImageAs(int pane, const wchar_t *filename) = 0;\r
-       virtual bool SaveDiffImageAs(int pane, const wchar_t *filename) = 0;\r
-       virtual const wchar_t *GetFileName(int pane) = 0;\r
-       virtual int  GetPaneCount() const = 0;\r
-       virtual RECT GetPaneWindowRect(int pane) const = 0;\r
-       virtual RECT GetWindowRect() const = 0;\r
-       virtual bool SetWindowRect(const RECT& rc) = 0;\r
-       virtual POINT GetCursorPos(int pane) const = 0;\r
-       virtual RGBQUAD GetPixelColor(int pane, int x, int y) const = 0;\r
-       virtual double GetColorDistance(int pane1, int pane2, int x, int y) const = 0;\r
-       virtual int  GetActivePane() const = 0;\r
-       virtual void SetActivePane(int pane) = 0;\r
-       virtual bool GetReadOnly(int pane) const = 0;\r
-       virtual void SetReadOnly(int pane, bool readOnly) = 0;\r
-       virtual bool GetHorizontalSplit() const = 0;\r
-       virtual void SetHorizontalSplit(bool horizontalSplit) = 0;\r
-       virtual int  GetCurrentPage(int pane) const = 0;\r
-       virtual void SetCurrentPage(int pane, int page) = 0;\r
-       virtual int  GetCurrentMaxPage() const = 0;\r
-       virtual void SetCurrentPageAll(int page) = 0;\r
-       virtual int  GetPageCount(int pane) const = 0;\r
-       virtual int  GetMaxPageCount() const = 0;\r
-       virtual COLORREF GetDiffColor() const = 0;\r
-       virtual void SetDiffColor(COLORREF clrDiffColor) = 0;\r
-       virtual COLORREF GetSelDiffColor() const = 0;\r
-       virtual void SetSelDiffColor(COLORREF clrSelDiffColor) = 0;\r
-       virtual double GetDiffColorAlpha() const = 0;\r
-       virtual void SetDiffColorAlpha(double diffColorAlpha) = 0;\r
-       virtual RGBQUAD GetBackColor() const = 0;\r
-       virtual void SetBackColor(RGBQUAD backColor) = 0;\r
-       virtual bool GetUseBackColor() const = 0;\r
-       virtual void SetUseBackColor(bool useBackColor) = 0;\r
-       virtual double GetZoom() const = 0;\r
-       virtual void SetZoom(double zoom) = 0;\r
-       virtual double GetColorDistanceThreshold() const = 0;\r
-       virtual void SetColorDistanceThreshold(double threshold) = 0;\r
-       virtual int  GetDiffBlockSize() const = 0;\r
-       virtual void SetDiffBlockSize(int blockSize) = 0;\r
-       virtual OVERLAY_MODE GetOverlayMode() const = 0;\r
-       virtual void SetOverlayMode(OVERLAY_MODE overlayMode) = 0;\r
-       virtual double GetOverlayAlpha() const = 0;\r
-       virtual void SetOverlayAlpha(double alpha) = 0;\r
-       virtual bool GetShowDifferences() const = 0;\r
-       virtual void SetShowDifferences(bool visible) = 0;\r
-       virtual bool GetBlinkDifferences() const = 0;\r
-       virtual void SetBlinkDifferences(bool visible) = 0;\r
-       virtual int  GetDiffCount() const = 0;\r
-       virtual int  GetConflictCount() const = 0;\r
-       virtual int  GetCurrentDiffIndex() const = 0;\r
-       virtual bool FirstDiff() = 0;\r
-       virtual bool LastDiff() = 0;\r
-       virtual bool NextDiff() = 0;\r
-       virtual bool PrevDiff() = 0;\r
-       virtual bool FirstConflict() = 0;\r
-       virtual bool LastConflict() = 0;\r
-       virtual bool NextConflict() = 0;\r
-       virtual bool PrevConflict() = 0; \r
-       virtual bool SelectDiff(int diffIndex) = 0;\r
-       virtual int  GetNextDiffIndex() const = 0;\r
-       virtual int  GetPrevDiffIndex() const = 0;\r
-       virtual int  GetNextConflictIndex() const = 0;\r
-       virtual int  GetPrevConflictIndex() const = 0;\r
-       virtual void CopyDiff(int diffIndex, int srcPane, int dstPane) = 0;\r
-       virtual void CopyDiffAll(int srcPane, int dstPane) = 0;\r
-       virtual int  CopyDiff3Way(int dstPane) = 0;\r
-       virtual bool IsUndoable() const = 0;\r
-       virtual bool IsRedoable() const = 0;\r
-       virtual bool Undo() = 0;\r
-       virtual bool Redo() = 0;\r
-       virtual bool IsModified(int pane) const = 0;\r
-       virtual HWND GetHWND() const = 0;\r
-       virtual HWND GetPaneHWND(int pane) const = 0;\r
-       virtual int  GetImageWidth(int pane) const = 0;\r
-       virtual int  GetImageHeight(int pane) const = 0;\r
-       virtual int  GetImageBitsPerPixel(int pane) const = 0;\r
-       virtual void AddImageOffset(int pane, int dx, int dy) = 0;\r
-       virtual POINT GetImageOffset(int pane) const = 0;\r
-       virtual void AddEventListener(EventListenerFunc func, void *userdata) = 0;\r
-};\r
-\r
-struct IImgToolWindow\r
-{\r
-       virtual HWND GetHWND() const = 0;\r
-       virtual void Sync() = 0;\r
-};\r
-\r
-extern "C"\r
-{\r
-       IImgMergeWindow * WinIMerge_CreateWindow(HINSTANCE hInstance, HWND hWndParent, int nID = 0);\r
-       bool WinIMerge_DestroyWindow(IImgMergeWindow *pImgMergeWindow);\r
-       IImgToolWindow * WinIMerge_CreateToolWindow(HINSTANCE hInstance, HWND hWndParent, IImgMergeWindow *pImgMergeWindow);\r
-       bool WinIMerge_DestroyToolWindow(IImgToolWindow *pImgToolWindow);\r
-};\r
diff --git a/src/WinIMergeLib.rc b/src/WinIMergeLib.rc
deleted file mode 100644 (file)
index 08fd04d..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-// Microsoft Visual C++ generated resource script.\r
-//\r
-#include "resource.h"\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#define APSTUDIO_HIDDEN_SYMBOLS\r
-#include "windows.h"\r
-#undef APSTUDIO_HIDDEN_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// Japanese resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)\r
-LANGUAGE LANG_JAPANESE, SUBLANG_NEUTRAL\r
-#pragma code_page(932)\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_DIALOGBAR DIALOGEX 0, 0, 85, 263\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x0\r
-BEGIN\r
-    GROUPBOX        "\8d·\88Ù",IDC_DIFF_GROUP,2,0,80,95\r
-    CONTROL         "\8d·\88Ù\95\\8e¦",IDC_DIFF_HIGHLIGHT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,8,46,9\r
-    CONTROL         "\93_\96Ã…",IDC_DIFF_BLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,8,29,9\r
-    LTEXT           "\83u\83\8d\83b\83N\83T\83C\83Y",IDC_STATIC,5,19,42,8\r
-    CONTROL         "",IDC_DIFF_BLOCKSIZE_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,5,27,72,15\r
-    RTEXT           "",IDC_DIFF_BLOCKSIZE_STATIC,50,19,18,8\r
-    LTEXT           "\83u\83\8d\83b\83N\93§\96¾\93x",IDC_STATIC,5,43,48,8\r
-    CONTROL         "",IDC_DIFF_BLOCKALPHA_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,5,51,70,15\r
-    RTEXT           "",IDC_DIFF_BLOCKALPHA_STATIC,50,43,18,8\r
-    LTEXT           "\90F\8b\97\97£è\87\92l",IDC_STATIC,5,67,43,8\r
-    CONTROL         "",IDC_DIFF_CDTHRESHOLD_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,5,75,70,15\r
-    RTEXT           "",IDC_DIFF_CDTHRESHOLD_STATIC,50,67,18,8\r
-    GROUPBOX        "\8fd\82Ë\8d\87\82í\82¹",IDC_OVERLAY_GROUP,2,95,80,56\r
-    COMBOBOX        IDC_OVERLAY_MODE,5,106,62,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "\93§\96¾\93x",IDC_STATIC,5,121,26,8\r
-    CONTROL         "",IDC_OVERLAY_ALPHA_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,5,129,70,15\r
-    RTEXT           "",IDC_OVERLAY_ALPHA_STATIC,50,120,18,8\r
-    GROUPBOX        "",IDC_VIEW_GROUP,2,152,80,58\r
-    CONTROL         "",IDC_ZOOM_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,5,168,69,15\r
-    RTEXT           "",IDC_ZOOM_STATIC,42,159,26,8\r
-    EDITTEXT        IDC_PAGE_EDIT,36,186,33,15,ES_AUTOHSCROLL\r
-    CONTROL         "",IDC_PAGE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,57,186,12,15\r
-    LTEXT           "\8ag\91Ã¥",IDC_STATIC,5,159,26,8\r
-    LTEXT           "\83y\81[\83W:",IDC_STATIC,5,186,24,8\r
-    CONTROL         "",IDC_DIFFMAP,"Static",SS_OWNERDRAW | SS_NOTIFY,2,213,80,45\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// DESIGNINFO\r
-//\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-GUIDELINES DESIGNINFO\r
-BEGIN\r
-    IDD_DIALOGBAR, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 6\r
-        RIGHTMARGIN, 78\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 256\r
-    END\r
-END\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-#endif    // Japanese resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// Japanese (Japan) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)\r
-LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT\r
-#pragma code_page(932)\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-\r
-1 TEXTINCLUDE \r
-BEGIN\r
-    "resource.h\0"\r
-END\r
-\r
-2 TEXTINCLUDE \r
-BEGIN\r
-    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
-    "#include ""windows.h""\r\n"\r
-    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
-    "\0"\r
-END\r
-\r
-3 TEXTINCLUDE \r
-BEGIN\r
-    "\r\n"\r
-    "\0"\r
-END\r
-\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-#endif    // Japanese (Japan) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// English (United States) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
-#pragma code_page(1252)\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_DIALOGBAR DIALOGEX 0, 0, 85, 263\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x0\r
-BEGIN\r
-    GROUPBOX        "Diff",IDC_DIFF_GROUP,2,0,80,95\r
-    CONTROL         "Highlight",IDC_DIFF_HIGHLIGHT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,8,46,9\r
-    CONTROL         "Blink",IDC_DIFF_BLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,8,29,9\r
-    LTEXT           "Block Size",IDC_STATIC,5,19,42,8\r
-    CONTROL         "",IDC_DIFF_BLOCKSIZE_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,6,27,72,15\r
-    RTEXT           "",IDC_DIFF_BLOCKSIZE_STATIC,50,19,18,8\r
-    LTEXT           "Block Alpha",IDC_STATIC,5,43,48,8\r
-    CONTROL         "",IDC_DIFF_BLOCKALPHA_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,6,51,70,15\r
-    RTEXT           "",IDC_DIFF_BLOCKALPHA_STATIC,50,43,18,8\r
-    LTEXT           "CD Threshold",IDC_STATIC,5,67,43,8\r
-    CONTROL         "",IDC_DIFF_CDTHRESHOLD_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,6,75,70,15\r
-    RTEXT           "",IDC_DIFF_CDTHRESHOLD_STATIC,50,67,18,8\r
-    GROUPBOX        "Overlay",IDC_OVERLAY_GROUP,2,95,80,56\r
-    COMBOBOX        IDC_OVERLAY_MODE,5,106,62,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "Alpha",IDC_STATIC,5,121,26,8\r
-    CONTROL         "",IDC_OVERLAY_ALPHA_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,6,129,70,15\r
-    RTEXT           "",IDC_OVERLAY_ALPHA_STATIC,50,120,18,8\r
-    GROUPBOX        "",IDC_VIEW_GROUP,2,152,80,58\r
-    CONTROL         "",IDC_ZOOM_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,6,168,69,15\r
-    RTEXT           "",IDC_ZOOM_STATIC,42,159,26,8\r
-    EDITTEXT        IDC_PAGE_EDIT,36,186,33,15,ES_AUTOHSCROLL\r
-    CONTROL         "",IDC_PAGE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,57,186,12,15\r
-    LTEXT           "Zoom",IDC_STATIC,5,159,26,8\r
-    LTEXT           "Page:",IDC_STATIC,5,186,24,8\r
-    CONTROL         "",IDC_DIFFMAP,"Static",SS_OWNERDRAW | SS_NOTIFY,2,213,80,45\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// DESIGNINFO\r
-//\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-GUIDELINES DESIGNINFO\r
-BEGIN\r
-    IDD_DIALOGBAR, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 6\r
-        RIGHTMARGIN, 78\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 256\r
-    END\r
-END\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Version\r
-//\r
-\r
-#include "../Version.h"\r
-VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION FILEVER\r
- PRODUCTVERSION PRODUCTVER\r
- FILEFLAGSMASK 0x3fL\r
-#ifdef _DEBUG\r
- FILEFLAGS 0x1L\r
-#else\r
- FILEFLAGS 0x0L\r
-#endif\r
- FILEOS 0x40004L\r
- FILETYPE 0x1L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
-    BLOCK "StringFileInfo"\r
-    BEGIN\r
-        BLOCK "040904b0"\r
-        BEGIN\r
-            VALUE "CompanyName", "https://bitbucket.org/sdottaka/winimerge"\r
-            VALUE "FileDescription", "WInIMergeLib"\r
-            VALUE "FileVersion", STRFILEVER\r
-            VALUE "InternalName", "WinIMergeLib.dll"\r
-            VALUE "LegalCopyright", "Copyright (C) 2014-2015 sdottaka@users.sourceforge.net"\r
-            VALUE "OriginalFilename", "WinIMergeLib.dll"\r
-            VALUE "ProductName", "WinIMergeLib"\r
-            VALUE "ProductVersion", STRPRODUCTVER\r
-        END\r
-    END\r
-    BLOCK "VarFileInfo"\r
-    BEGIN\r
-        VALUE "Translation", 0x409, 1200\r
-    END\r
-END\r
-\r
-#endif    // English (United States) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif    // not APSTUDIO_INVOKED\r
-\r
diff --git a/src/WinIMergeLib.vcxproj b/src/WinIMergeLib.vcxproj
deleted file mode 100644 (file)
index b9908f5..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{C9101B3C-4CFE-4D3E-9708-5C0F55AC909A}</ProjectGuid>\r
-    <Keyword>Win32Proj</Keyword>\r
-    <ProjectName>WinIMergeLib</ProjectName>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\Build\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\Build\$(Platform)\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\BuildTmp\Lib$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\BuildTmp\$(Platform)\Lib$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\Build\$(Configuration)\</OutDir>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\Build\$(Platform)\$(Configuration)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\BuildTmp\Lib$(Configuration)\</IntDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\BuildTmp\$(Platform)\Lib$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.dll</TargetExt>\r
-    <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.dll</TargetExt>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;UNICODE;FREEIMAGE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>FreeImageLibd.lib;FreeImagePlusd.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)$(TargetFileName)</OutputFile>\r
-      <AdditionalLibraryDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>\r
-      <SubSystem>Windows</SubSystem>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <ModuleDefinitionFile>WinIMergeLib.def</ModuleDefinitionFile>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x64;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;UNICODE;FREEIMAGE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\r
-      <ObjectFileName>$(IntDir)</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>FreeImageLibd.lib;FreeImagePlusd.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)$(TargetFileName)</OutputFile>\r
-      <AdditionalLibraryDirectories>..\..\FreeImage\Dist\$(Platform);..\..\FreeImage\Wrapper\FreeImagePlus\dist\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>\r
-      <SubSystem>Windows</SubSystem>\r
-      <ModuleDefinitionFile>WinIMergeLib.def</ModuleDefinitionFile>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <ClCompile>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;UNICODE;FREEIMAGE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>FreeImageLib.lib;FreeImagePlus.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)$(TargetFileName)</OutputFile>\r
-      <AdditionalLibraryDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <ModuleDefinitionFile>WinIMergeLib.def</ModuleDefinitionFile>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <ClCompile>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x64;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;UNICODE;FREEIMAGE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>\r
-      <ObjectFileName>$(IntDir)</ObjectFileName>\r
-      <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>FreeImageLib.lib;FreeImagePlus.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)$(TargetFileName)</OutputFile>\r
-      <AdditionalLibraryDirectories>..\..\FreeImage\Dist\$(Platform);..\..\FreeImage\Wrapper\FreeImagePlus\dist\$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <ModuleDefinitionFile>WinIMergeLib.def</ModuleDefinitionFile>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="ImgDiffBuffer.hpp" />\r
-    <ClInclude Include="ImgMergeBuffer.hpp" />\r
-    <ClInclude Include="ImgMergeWindow.hpp" />\r
-    <ClInclude Include="ImgToolWindow.hpp" />\r
-    <ClInclude Include="ImgWindow.hpp" />\r
-    <ClInclude Include="image.hpp" />\r
-    <ClInclude Include="Resource.h" />\r
-    <ClInclude Include="WinIMergeLib.h" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="WinIMergeLib.cpp" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <None Include="WinIMergeLib.def" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ResourceCompile Include="WinIMergeLib.rc" />\r
-  </ItemGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
-  <ImportGroup Label="ExtensionTargets">\r
-  </ImportGroup>\r
-</Project>
\ No newline at end of file
diff --git a/src/WinIMergeLib.vcxproj.filters b/src/WinIMergeLib.vcxproj.filters
deleted file mode 100644 (file)
index 7e84381..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup>\r
-    <Filter Include="Source Files">\r
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
-      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
-    </Filter>\r
-    <Filter Include="Header Files">\r
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
-    </Filter>\r
-    <Filter Include="Resource Files">\r
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>\r
-    </Filter>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="Resource.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="WinIMergeLib.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="image.hpp">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="ImgMergeWindow.hpp">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="ImgWindow.hpp">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="ImgDiffBuffer.hpp">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="ImgMergeBuffer.hpp">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="ImgToolWindow.hpp">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="WinIMergeLib.cpp">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <None Include="WinIMergeLib.def">\r
-      <Filter>Source Files</Filter>\r
-    </None>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ResourceCompile Include="WinIMergeLib.rc">\r
-      <Filter>Resource Files</Filter>\r
-    </ResourceCompile>\r
-  </ItemGroup>\r
-</Project>
\ No newline at end of file
diff --git a/src/cidiff.cpp b/src/cidiff.cpp
deleted file mode 100644 (file)
index 5bb691c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "ImgDiffBuffer.hpp"
-#include <iostream>
-#include <clocale>
-
-int main(int argc, char* argv[])
-{
-       CImgDiffBuffer buffer;
-       wchar_t filenameW[2][260];
-       const wchar_t *filenames[2] = { filenameW[0], filenameW[1] };
-
-       if (argc < 3)
-       {
-               std::wcerr << L"usage: cmdidiff image_file1 image_file2" << std::endl;
-               exit(1);
-       }
-
-       FreeImage_Initialise();
-       setlocale(LC_ALL, "");
-
-       mbstowcs(filenameW[0], argv[1], strlen(argv[1]) + 1);
-       mbstowcs(filenameW[1], argv[2], strlen(argv[2]) + 1);
-
-       if (!buffer.OpenImages(2, filenames))
-       {
-               std::wcerr << L"cmdidiff: could not open files. (" << filenameW[0] << ", " << filenameW[1] << L")" << std::endl;
-               exit(1);
-       }
-
-       buffer.CompareImages();
-       buffer.SaveDiffImageAs(1, L"diff.png");
-       buffer.CloseImages();
-
-       return 0;
-}
-
-
diff --git a/src/cidiff.vcxproj b/src/cidiff.vcxproj
deleted file mode 100644 (file)
index 47c9381..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{49A7104F-08CD-48B1-99E6-6A7C3FFB0EEC}</ProjectGuid>\r
-    <Keyword>Win32Proj</Keyword>\r
-    <RootNamespace>cidiff</RootNamespace>\r
-    <ProjectName>cidiff</ProjectName>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <UseDebugLibraries>true</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <UseDebugLibraries>true</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <UseDebugLibraries>false</UseDebugLibraries>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <UseDebugLibraries>false</UseDebugLibraries>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-    <PlatformToolset>v140_xp</PlatformToolset>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\r
-  </ImportGroup>\r
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <LinkIncremental>true</LinkIncremental>\r
-    <OutDir>..\Build\$(Configuration)\</OutDir>\r
-    <IntDir>..\BuildTmp\cidiff\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <LinkIncremental>true</LinkIncremental>\r
-    <OutDir>..\Build\$(Platform)\$(Configuration)\</OutDir>\r
-    <IntDir>..\BuildTmp\cidiff\$(Platform)\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <LinkIncremental>false</LinkIncremental>\r
-    <OutDir>..\Build\$(Configuration)\</OutDir>\r
-    <IntDir>..\BuildTmp\cidiff\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <LinkIncremental>false</LinkIncremental>\r
-    <OutDir>..\Build\$(Platform)\$(Configuration)\</OutDir>\r
-    <IntDir>..\BuildTmp\cidiff\$(Platform)\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <ClCompile>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;FREEIMAGE_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Console</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;FreeImageLibd.lib;FreeImagePlusd.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32;</AdditionalLibraryDirectories>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <ClCompile>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;FREEIMAGE_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x64;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x64</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Console</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;FreeImageLibd.lib;FreeImagePlusd.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>..\..\FreeImage\Dist\$(Platform);..\..\FreeImage\Wrapper\FreeImagePlus\dist\$(Platform)</AdditionalLibraryDirectories>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <ClCompile>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;FREEIMAGE_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Console</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;FreeImageLib.lib;FreeImagePlus.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>..\..\FreeImage\Dist\x32;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x32;</AdditionalLibraryDirectories>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <ClCompile>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;FREEIMAGE_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>..\..\FreeImage\Dist\x64;..\..\FreeImage\Wrapper\FreeImagePlus\dist\x64</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Console</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;FreeImageLib.lib;FreeImagePlus.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <AdditionalLibraryDirectories>..\..\FreeImage\Dist\$(Platform);..\..\FreeImage\Wrapper\FreeImagePlus\dist\$(Platform)</AdditionalLibraryDirectories>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="cidiff.cpp" />\r
-  </ItemGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
-  <ImportGroup Label="ExtensionTargets">\r
-  </ImportGroup>\r
-</Project>
\ No newline at end of file
diff --git a/src/image.hpp b/src/image.hpp
deleted file mode 100644 (file)
index 21f6ada..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////\r
-//    License (GPLv2+):\r
-//    This program is free software; you can redistribute it and/or modify\r
-//    it under the terms of the GNU General Public License as published by\r
-//    the Free Software Foundation; either version 2 of the License, or\r
-//    (at your option) any later version.\r
-//\r
-//    This program is distributed in the hope that it will be useful, but\r
-//    WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//    General Public License for more details.\r
-//\r
-//    You should have received a copy of the GNU General Public License\r
-//    along with this program; if not, write to the Free Software\r
-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#pragma once\r
-#pragma warning(disable: 4819)\r
-\r
-#include "FreeImagePlus.h"\r
-#include <algorithm>\r
-#include <string>\r
-\r
-#ifndef _WIN32\r
-typedef fipImage fipWinImage;\r
-#endif\r
-\r
-class fipImageEx : public fipWinImage\r
-{\r
-public:\r
-       fipImageEx(FREE_IMAGE_TYPE image_type = FIT_BITMAP, unsigned width = 0, unsigned height = 0, unsigned bpp = 0) :\r
-       fipWinImage(image_type, width, height, bpp) {}\r
-       fipImageEx(const fipImageEx& Image) : fipWinImage(Image) {}\r
-       explicit fipImageEx(FIBITMAP *bitmap) { *this = bitmap; }\r
-       virtual ~fipImageEx() {}\r
-\r
-       fipImageEx& operator=(const fipImageEx& Image)\r
-       {\r
-               if (this != &Image)\r
-               {\r
-                       FIBITMAP *clone = FreeImage_Clone(static_cast<FIBITMAP*>(Image._dib));\r
-                       if (clone)\r
-                       {\r
-                               replace(clone);\r
-                       }\r
-                       else\r
-                       {\r
-                               FreeImage_Unload(_dib);\r
-                               _dib = NULL;\r
-                               _bHasChanged = TRUE;\r
-                       }\r
-               }\r
-               return *this;\r
-       }\r
-\r
-       fipImageEx& operator=(FIBITMAP *dib)\r
-       {\r
-               if (_dib != dib)\r
-                       replace(dib);\r
-               return *this;\r
-       }\r
-\r
-       void swap(fipImageEx& other)\r
-       {\r
-               std::swap(_dib, other._dib);\r
-               std::swap(this->_fif, other._fif);\r
-               std::swap(this->_bHasChanged, other._bHasChanged);\r
-       }\r
-\r
-       FIBITMAP *detach()\r
-       {\r
-               FIBITMAP *dib = _dib;\r
-               _dib = NULL;\r
-               clear();\r
-               return dib;\r
-       }\r
-\r
-       BOOL colorQuantizeEx(FREE_IMAGE_QUANTIZE quantize = FIQ_WUQUANT, int PaletteSize = 256, int ReserveSize = 0, RGBQUAD *ReservePalette = NULL)\r
-       {\r
-               if(_dib) {\r
-                       FIBITMAP *dib8 = FreeImage_ColorQuantizeEx(_dib, quantize, PaletteSize, ReserveSize, ReservePalette);\r
-                       return !!replace(dib8);\r
-               }\r
-               return false;\r
-       }\r
-\r
-       bool convertColorDepth(unsigned bpp, RGBQUAD *pPalette = NULL)\r
-       {\r
-               switch (bpp)\r
-               {\r
-               case 1:\r
-                       return !!threshold(128);\r
-               case 4:\r
-               {\r
-                       fipImageEx tmp = *this;\r
-                       tmp.convertTo24Bits();\r
-                       if (pPalette)\r
-                               tmp.colorQuantizeEx(FIQ_NNQUANT, 16, 16, pPalette);\r
-                       else\r
-                               tmp.colorQuantizeEx(FIQ_WUQUANT, 16);\r
-                       setSize(tmp.getImageType(), tmp.getWidth(), tmp.getHeight(), 4);\r
-                       for (unsigned y = 0; y < tmp.getHeight(); ++y)\r
-                       {\r
-                               const BYTE *line_src = tmp.getScanLine(y);\r
-                               BYTE *line_dst = getScanLine(y);\r
-                               for (unsigned x = 0; x < tmp.getWidth(); ++x)\r
-                                       line_dst[x / 2] |= ((x % 2) == 0) ? (line_src[x] << 4) : line_src[x];\r
-                       }\r
-\r
-                       RGBQUAD *rgbq_dst = getPalette();\r
-                       RGBQUAD *rgbq_src = pPalette ? pPalette : tmp.getPalette();\r
-                       memcpy(rgbq_dst, rgbq_src, sizeof(RGBQUAD) * 16);\r
-                       return true;\r
-               }\r
-               case 8:\r
-                       convertTo24Bits();\r
-                       if (pPalette)\r
-                               return !!colorQuantizeEx(FIQ_NNQUANT, 256, 256, pPalette);\r
-                       else\r
-                               return !!colorQuantizeEx(FIQ_WUQUANT, 256);\r
-               case 15:\r
-                       return !!convertTo16Bits555();\r
-               case 16:\r
-                       return !!convertTo16Bits565();\r
-               case 24:\r
-                       return !!convertTo24Bits();\r
-               default:\r
-               case 32:\r
-                       return !!convertTo32Bits();\r
-               }\r
-       }\r
-\r
-       void copyAnimationMetadata(fipImage& src)\r
-       {\r
-               fipTag tag;\r
-               fipMetadataFind finder;\r
-               if (finder.findFirstMetadata(FIMD_ANIMATION, src, tag))\r
-               {\r
-                       do\r
-                       {\r
-                               setMetadata(FIMD_ANIMATION, tag.getKey(), tag);\r
-                       } while (finder.findNextMetadata(tag));\r
-               }\r
-       }\r
-};\r
-\r
-class fipMultiPageEx : public fipMultiPage\r
-{\r
-public:\r
-       explicit fipMultiPageEx(BOOL keep_cache_in_memory = FALSE) : fipMultiPage(keep_cache_in_memory) {}\r
-   \r
-       BOOL openU(const wchar_t* lpszPathName, BOOL create_new, BOOL read_only, int flags = 0)\r
-       {\r
-               char filename[260];\r
-#ifdef _WIN32\r
-               wchar_t shortname[260] = {0};\r
-               GetShortPathNameW(lpszPathName, shortname, sizeof(shortname)/sizeof(shortname[0]));\r
-               wsprintfA(filename, "%S", shortname);\r
-#else\r
-               snprintf(filename, sizeof(filename), "%ls", lpszPathName);\r
-               \r
-#endif\r
-               BOOL result = open(filename, create_new, read_only, flags);\r
-               return result;\r
-       }\r
-\r
-       bool saveU(const wchar_t* lpszPathName, int flag = 0) const\r
-       {\r
-               FILE *fp = NULL;\r
-#ifdef _WIN32\r
-               _wfopen_s(&fp, lpszPathName, L"r+b");\r
-#else\r
-               char filename[260];\r
-               snprintf(filename, sizeof(filename), "%ls", lpszPathName);\r
-               fp = fopen(filename, "r+b");\r
-#endif\r
-               if (!fp)\r
-                       return false;\r
-               FreeImageIO io;\r
-               io.read_proc  = myReadProc;\r
-               io.write_proc = myWriteProc;\r
-               io.seek_proc  = mySeekProc;\r
-               io.tell_proc  = myTellProc;\r
-               FREE_IMAGE_FORMAT fif = fipImage::identifyFIFU(lpszPathName);\r
-               bool result = !!saveToHandle(fif, &io, (fi_handle)fp, flag);\r
-               fclose(fp);\r
-               return result;\r
-       }\r
-\r
-private:\r
-       static unsigned DLL_CALLCONV myReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle) {\r
-               return (unsigned)fread(buffer, size, count, (FILE *)handle);\r
-       }\r
-\r
-       static unsigned DLL_CALLCONV myWriteProc(void *buffer, unsigned size, unsigned count, fi_handle handle) {\r
-               return (unsigned)fwrite(buffer, size, count, (FILE *)handle);\r
-       }\r
-\r
-       static int DLL_CALLCONV mySeekProc(fi_handle handle, long offset, int origin) {\r
-               return fseek((FILE *)handle, offset, origin);\r
-       }\r
-\r
-       static long DLL_CALLCONV myTellProc(fi_handle handle) {\r
-               return ftell((FILE *)handle);\r
-       }\r
-};\r
-\r
-class MultiPageImages;\r
-\r
-class Image\r
-{\r
-       friend MultiPageImages;\r
-public:\r
-       typedef RGBQUAD Color;\r
-       Image() {}\r
-       Image(int w, int h) : image_(FIT_BITMAP, w, h, 32) {}\r
-       Image(const Image& other) : image_(other.image_) {}\r
-       explicit Image(FIBITMAP *bitmap) : image_(bitmap) {}\r
-       BYTE *scanLine(int y) { return image_.getScanLine(image_.getHeight() - y - 1); }\r
-       const BYTE *scanLine(int y) const { return image_.getScanLine(image_.getHeight() - y - 1); }\r
-       bool convertTo32Bits() { return !!image_.convertTo32Bits(); }\r
-       bool load(const std::wstring& filename) { return !!image_.loadU(filename.c_str()); }\r
-       bool save(const std::wstring& filename)\r
-       {\r
-#ifdef _WIN32\r
-               return !!image_.saveU(filename.c_str());\r
-#else\r
-               char filenameA[260];\r
-               snprintf(filenameA, sizeof(filenameA), "%ls", filename.c_str());\r
-               return !!image_.save(filenameA);\r
-#endif\r
-       }\r
-       int depth() const { return image_.getBitsPerPixel(); }\r
-       unsigned width() const  { return image_.getWidth(); }\r
-       unsigned height() const { return image_.getHeight(); }\r
-       void clear() { image_.clear(); }\r
-       void setSize(int w, int h) { image_.setSize(FIT_BITMAP, w, h, 32); }\r
-       const fipImageEx *getImage() const { return &image_; }\r
-       fipImageEx *getFipImage() { return &image_; }\r
-       Color pixel(int x, int y) const\r
-       {\r
-               RGBQUAD color = {0};\r
-               color.rgbReserved = 0xFF;\r
-               image_.getPixelColor(x, image_.getHeight() - y - 1, &color);\r
-               return color;\r
-       }\r
-       bool pasteSubImage(Image& image, int x, int y)\r
-       {\r
-               return !!image_.pasteSubImage(image.image_, x, y);\r
-       }\r
-       bool pullImageKeepingBPP(const Image& other)\r
-       {\r
-               unsigned bpp =  image_.getBitsPerPixel();\r
-               RGBQUAD palette[256];\r
-               if (image_.getPaletteSize() > 0)\r
-                       memcpy(palette, image_.getPalette(), image_.getPaletteSize());\r
-               image_ = other.image_;\r
-               return image_.convertColorDepth(bpp, palette);\r
-       }\r
-\r
-       static int valueR(Color color) { return color.rgbRed; }\r
-       static int valueG(Color color) { return color.rgbGreen; }\r
-       static int valueB(Color color) { return color.rgbBlue; }\r
-       static int valueA(Color color) { return color.rgbReserved; }\r
-       static Color Rgb(int r, int g, int b)\r
-       {\r
-               Color color;\r
-               color.rgbRed = r;\r
-               color.rgbGreen = g;\r
-               color.rgbBlue = b;\r
-               return color;\r
-       }\r
-private:\r
-       fipImageEx image_;\r
-};\r
-\r
-class MultiPageImages\r
-{\r
-public:\r
-       MultiPageImages() {}\r
-       ~MultiPageImages() { multi_.close(); }\r
-       bool close() { return !!multi_.close(); }\r
-       bool isValid() const { return !!multi_.isValid(); }\r
-       int getPageCount() const { return multi_.getPageCount(); }\r
-       bool load(const std::wstring& filename) { return !!multi_.openU(filename.c_str(), FALSE, FALSE); }\r
-       bool save(const std::wstring& filename) { return !!multi_.saveU(filename.c_str()); }\r
-       Image getImage(int page)\r
-       {\r
-               FIBITMAP *bitmaptmp, *bitmap;\r
-               bitmaptmp = FreeImage_LockPage(multi_, page);\r
-               bitmap = FreeImage_Clone(bitmaptmp);\r
-               FreeImage_UnlockPage(multi_, bitmaptmp, false);\r
-               return Image(bitmap);\r
-       }\r
-       void replacePage(int page, const Image& image)\r
-       {\r
-               fipImageEx imgOrg, imgAdd;\r
-               imgAdd = image.image_;\r
-               imgOrg = multi_.lockPage(page);\r
-               imgAdd.copyAnimationMetadata(imgOrg);\r
-               multi_.unlockPage(imgOrg, false);\r
-               multi_.insertPage(page, imgAdd);\r
-               imgAdd.detach();\r
-               multi_.deletePage(page + 1);\r
-       }\r
-\r
-       fipMultiPageEx multi_;\r
-};\r
diff --git a/src/resource.h b/src/resource.h
deleted file mode 100644 (file)
index c6c0111..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-//{{NO_DEPENDENCIES}}\r
-// Microsoft Visual C++ generated include file.\r
-// Used by WinIMergeLib.rc\r
-//\r
-#define IDD_WINIMERGE_DIALOG            102\r
-#define IDD_DIALOGBAR                   103\r
-#define ID_FILE_OPEN                    105\r
-#define ID_FILE_OPEN3                   106\r
-#define ID_FILE_GENERATE_REPORT         107\r
-#define ID_FILE_EXIT                    108\r
-#define IDI_WINIMERGE                   109\r
-#define IDC_WINIMERGE                   110\r
-#define IDC_DIFFMAP                     110\r
-#define IDR_MAINFRAME                   128\r
-#define IDR_POPUPMENU                   130\r
-#define IDC_DIFF_HIGHLIGHT              1000\r
-#define IDC_DIFF_BLOCKSIZE_SLIDER       1001\r
-#define IDC_DIFF_BLOCKALPHA_SLIDER      1002\r
-#define IDC_DIFF_CDTHRESHOLD_SLIDER     1003\r
-#define IDC_DIFF_BLOCKSIZE_STATIC       1004\r
-#define IDC_DIFF_BLOCKALPHA_STATIC      1005\r
-#define IDC_DIFF_CDTHRESHOLD_STATIC     1006\r
-#define IDC_OVERLAY_MODE                1007\r
-#define IDC_OVERLAY_ALPHA_SLIDER        1008\r
-#define IDC_OVERLAY_ALPHA_STATIC        1009\r
-#define IDC_ZOOM_SLIDER                 1010\r
-#define IDC_ZOOM_STATIC                 1011\r
-#define IDC_PAGE_SPIN                   1012\r
-#define IDC_PAGE_EDIT                   1013\r
-#define IDC_DIFF_GROUP                  1014\r
-#define IDC_OVERLAY_GROUP               1015\r
-#define IDC_VIEW_GROUP                  1016\r
-#define IDC_DIFF_BLINK                  1017\r
-#define ID_VIEW_ZOOM_25                 32780\r
-#define ID_VIEW_ZOOM_50                 32781\r
-#define ID_VIEW_ZOOM_100                32782\r
-#define ID_VIEW_ZOOM_200                32783\r
-#define ID_VIEW_ZOOM_400                32784\r
-#define ID_VIEW_OVERLAY_NONE            32785\r
-#define ID_VIEW_OVERLAY_XOR             32786\r
-#define ID_VIEW_OVERLAY_ALPHABLEND      32787\r
-#define ID_VIEW_OVERLAY_ALPHABLEND_ANIM 32788\r
-#define ID_VIEW_VIEWDIFFERENCES         32789\r
-#define ID_VIEW_THRESHOLD_0             32790\r
-#define ID_VIEW_THRESHOLD_2             32791\r
-#define ID_VIEW_THRESHOLD_4             32792\r
-#define ID_VIEW_THRESHOLD_8             32793\r
-#define ID_VIEW_THRESHOLD_16            32794\r
-#define ID_VIEW_THRESHOLD_32            32795\r
-#define ID_VIEW_THRESHOLD_64            32796\r
-#define ID_MERGE_NEXTDIFFERENCE         32797\r
-#define ID_MERGE_PREVIOUSDIFFERENCE     32798\r
-#define ID_MERGE_FIRSTDIFFERENCE        32799\r
-#define ID_MERGE_LASTDIFFERENCE         32800\r
-#define ID_MERGE_NEXTCONFLICT           32801\r
-#define ID_MERGE_PREVIOUSCONFLICT       32802\r
-#define ID_EDIT_COPY                    32803\r
-#define ID_EDIT_CUT                     32804\r
-#define ID_EDIT_PASTE                   32805\r
-#define ID_EDIT_SELECTALL               32806\r
-#define ID_HELP_ABOUT                   32809\r
-#define ID_VIEW_DIFFBLOCKSIZE_1         32811\r
-#define ID_VIEW_DIFFBLOCKSIZE_2         32812\r
-#define ID_VIEW_DIFFBLOCKSIZE_4         32813\r
-#define ID_VIEW_DIFFBLOCKSIZE_8         32814\r
-#define ID_VIEW_DIFFBLOCKSIZE_16        32815\r
-#define ID_VIEW_DIFFBLOCKSIZE_32        32816\r
-#define ID_VIEW_SPLITHORIZONTALLY       32817\r
-#define ID_VIEW_PAGE                    32818\r
-#define ID_PAGE_NEXTPAGE                32819\r
-#define ID_PAGE_PREVPAGE                32820\r
-#define ID_VIEW_PAGE_NEXTPAGE           32821\r
-#define ID_VIEW_PAGE_PREVPAGE           32822\r
-#define ID_VIEW_USEBACKCOLOR            32823\r
-#define ID_POPUP_CURPANE_NEXTPAGE       32824\r
-#define ID_POPUP_CURPANE_PREVIOUSPAGE   32825\r
-#define ID_MERGE_COPYTORIGHT            32828\r
-#define ID_MERGE_COPYTOLEFT             32829\r
-#define ID_EDIT_UNDO                    32832\r
-#define ID_EDIT_REDO                    32833\r
-#define ID_FILE_SAVE                    32835\r
-#define ID_FILE_RELOAD                  32837\r
-#define ID_MERGE_COPYFROMLEFT           32840\r
-#define ID_MERGE_COPYFROMRIGHT          32841\r
-#define ID_MERGE_COPYALLTORIGHT         32842\r
-#define ID_MERGE_COPYALLTOLEFT          32843\r
-#define ID_MERGE_AUTOMERGE              32844\r
-#define IDC_STATIC                      -1\r
-\r
-// Next default values for new objects\r
-// \r
-#ifdef APSTUDIO_INVOKED\r
-#ifndef APSTUDIO_READONLY_SYMBOLS\r
-#define _APS_NO_MFC                     1\r
-#define _APS_NEXT_RESOURCE_VALUE        131\r
-#define _APS_NEXT_COMMAND_VALUE         32847\r
-#define _APS_NEXT_CONTROL_VALUE         1017\r
-#define _APS_NEXT_SYMED_VALUE           111\r
-#endif\r
-#endif\r