You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(30) |
Aug
(6) |
Sep
(3) |
Oct
(1) |
Nov
(13) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(17) |
Mar
(7) |
Apr
(10) |
May
(34) |
Jun
(17) |
Jul
(150) |
Aug
(59) |
Sep
(186) |
Oct
(57) |
Nov
(45) |
Dec
(22) |
2005 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(24) |
May
(10) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(35) |
Nov
(12) |
Dec
(1) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(1) |
Dec
|
From: <td...@us...> - 2003-10-01 06:55:26
|
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1:/tmp/cvs-serv2421 Modified Files: ChangeLog.txt Log Message: Beta 2 testers release .... Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/ChangeLog.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog.txt 30 Sep 2003 10:41:33 -0000 1.1 --- ChangeLog.txt 1 Oct 2003 06:55:21 -0000 1.2 *************** *** 2,6 **** ============ ! Beta 2.0 -------- 1) Fixed setting focus problem on ctrl+tab [#765240] --- 2,6 ---- ============ ! Beta 2.0 [TESTERS RELEASE] -------- 1) Fixed setting focus problem on ctrl+tab [#765240] |
From: <td...@us...> - 2003-09-30 10:41:39
|
Update of /cvsroot/anyedit/AnyEditBin/StartPage In directory sc8-pr-cvs1:/tmp/cvs-serv23780/StartPage Modified Files: right.htm Log Message: Beta 2 testers release .... Index: right.htm =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/StartPage/right.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** right.htm 22 Jul 2003 04:44:53 -0000 1.2 --- right.htm 30 Sep 2003 10:41:33 -0000 1.3 *************** *** 1 **** ! <HTML><HEAD><TITLE>Start Page</TITLE><LINK REL="STYLESHEET" TYPE="text/css" HREF="css.css"><BODY> <div id="FileDetails" style="LEFT: 42px; POSITION: absolute; TOP: 42px;"><table id=tabs style="display:block;width:100%" border=0 cellpadding=0 cellspacing=0> <tr><td onclick="ShowTab(0)" id=tab width=45% style="text-align:center;" class='button' style="position:absloute;text-align:center;left:100px;top:100px;height:18px;" > Recent Files</td><td onclick="ShowTab(1)" id=tab width=45% style="text-align:center;" class='selected' style="position:absloute;text-align:center;left:100px;top:100px;height:18px;" > Recent Workspaces</td></tr><tr><td colspan=6 width=5px height=4px bgcolor="#222244"></td></tr></table></div><div id="Pages" style="LEFT: 42px; POSITION: absolute; TOP: 75px;display:block;"> <TABLE width=100%><TR><TD class=control><table style="display:block;width:100%" border=0 cellpadding=1 cellspacing=1 background="#000000"><TBODY><TR class=item> <TH class=item noWrap align=left width="10%">Sl.No</TH><TH class=item noWrap align=left>File Names</TH></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>1</center></TD><TD><a href="aep://FileOpen|C:\OS\AnyEditv2\bin\StartPage\home.htm">C:\OS\AnyEditv2\bin\StartPage\home.htm</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>2</center></TD><TD><a href="aep://FileOpen|C:\Program Files\NSIS\makensis.htm">C:\Program Files\NSIS\makensis.htm</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>3</center></TD><TD><a href="aep://FileOpen|C:\work\ssl-vpn\lib\portal\c_src\iewiper-1.0.0.11\HistConfDlg.cpp">C:\work\ssl-vpn\lib\portal\c_src\iewiper-1.0.0.11\HistConfDlg.cpp</a></td></TR></TBODY></table></TD></TR></TABLE></div><div id="Pages" style="LEFT: 42px; POSITION: absolute; TOP: 75px;display:none;"> <TABLE width=100%><TR><TD class=control><table style="display:block;width:100%" border=0 cellpadding=1 cellspacing=1 background="#000000"> <TBODY><TR class=item><TH class=item noWrap align=left width="10%">Sl.No</TH><TH class=item noWrap align=left>File Names</TH></TR></TBODY></table></TD></TR></TABLE></div><div id="Buttons" style="LEFT: 42px; POSITION: absolute; TOP: 250px;display:block;"> <table width=100% align><tr><td width=10%><form method=GET action="aep://FileOpenExisting|dummy"><input type=submit class=button value='Open Existing File'></form></td> <td><form method=GET action="aep://FileNew|dummy"><input type=submit class=button value='Create New File'></form></td></tr></table></div></BODY> </HTML><script> function ShowTab(TabIndex) { for(i=0;i<Pages.length;i++) { tab(i).className="selected"; Pages(i).style.display="none"; } tab(parseInt(TabIndex)).className="button"; Pages(parseInt(TabIndex)).style.display="block"; } </script> \ No newline at end of file --- 1 ---- ! <HTML><HEAD><TITLE>Start Page</TITLE><LINK REL="STYLESHEET" TYPE="text/css" HREF="css.css"><BODY> <div id="FileDetails" style="LEFT: 42px; POSITION: absolute; TOP: 42px;"><table id=tabs style="display:block;width:100%" border=0 cellpadding=0 cellspacing=0> <tr><td onclick="ShowTab(0)" id=tab width=45% style="text-align:center;" class='button' style="position:absloute;text-align:center;left:100px;top:100px;height:18px;" > Recent Files</td><td onclick="ShowTab(1)" id=tab width=45% style="text-align:center;" class='selected' style="position:absloute;text-align:center;left:100px;top:100px;height:18px;" > Recent Workspaces</td></tr><tr><td colspan=6 width=5px height=4px bgcolor="#222244"></td></tr></table></div><div id="Pages" style="LEFT: 42px; POSITION: absolute; TOP: 75px;display:block;"> <TABLE width=100%><TR><TD class=control><table style="display:block;width:100%" border=0 cellpadding=1 cellspacing=1 background="#000000"><TBODY><TR class=item> <TH class=item noWrap align=left width="10%">Sl.No</TH><TH class=item noWrap align=left>File Names</TH></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>1</center></TD><TD><a href="aep://FileOpen|C:\OS\AnyEditBin\test.java">C:\OS\AnyEditBin\test.java</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>2</center></TD><TD><a href="aep://FileOpen|C:\Documents and Settings\Administrator\Desktop\kevlar\src\gpp\host\isd\common\isdweb\zend_wrapper.h">C:\Documents and Settings\Administrator\Desktop\kevlar\src\gpp\host\isd\common\isdweb\zend_wrapper.h</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>3</center></TD><TD><a href="aep://FileOpen|C:\OS\AnyEditv2\AnyEdit.cpp">C:\OS\AnyEditv2\AnyEdit.cpp</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>4</center></TD><TD><a href="aep://FileOpen|C:\OS\AnyEditBin\StartPage\home.htm">C:\OS\AnyEditBin\StartPage\home.htm</a></td></TR></TBODY></table></TD></TR></TABLE></div><div id="Pages" style="LEFT: 42px; POSITION: absolute; TOP: 75px;display:none;"> <TABLE width=100%><TR><TD class=control><table style="display:block;width:100%" border=0 cellpadding=1 cellspacing=1 background="#000000"> <TBODY><TR class=item><TH class=item noWrap align=left width="10%">Sl.No</TH><TH class=item noWrap align=left>File Names</TH></TR></TBODY></table></TD></TR></TABLE></div><div id="Buttons" style="LEFT: 42px; POSITION: absolute; TOP: 250px;display:block;"> <table width=100% align><tr><td width=10%><form method=GET action="aep://FileOpenExisting|dummy"><input type=submit class=button value='Open Existing File'></form></td> <td><form method=GET action="aep://FileNew|dummy"><input type=submit class=button value='Create New File'></form></td></tr></table></div></BODY> </HTML><script> function ShowTab(TabIndex) { for(i=0;i<Pages.length;i++) { tab(i).className="selected"; Pages(i).style.display="none"; } tab(parseInt(TabIndex)).className="button"; Pages(parseInt(TabIndex)).style.display="block"; } </script> \ No newline at end of file |
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1:/tmp/cvs-serv23780 Modified Files: AnyEdit.exe BCGCB473.dll License.txt SciLexer.dll Added Files: AnyEdit.nsi ChangeLog.txt ToDo.txt ZipDLL.nsh download.ini download.nsh Log Message: Beta 2 testers release .... --- NEW FILE: AnyEdit.nsi --- ;AnyEdit Installer ;Copied heavily from Filezilla installer :) !define VERSION "v2.0 Beta 2" Name "AnyEdit ${VERSION}" ;Define your own software name here !include "MUI.nsh" !include "download.nsh" !define SOURCE_MIRROR_LOCATION "http://anyedit.sourceforge.net/install_data/2beta2/mirrors.txt" !define SOURCE_PACKAGE_FILE "AnyEdit2_Beta2_src.zip" ;Download dialog LangString DownloadDialogNext ${CURLANG} "&Install" LangString DownloadDialog1 ${CURLANG} "The following components are not included in the installer to reduce its size:" LangString DownloadDialog3 ${CURLANG} "To install these components, the installer can download the required files. If you do not want to download the files now, you can run the installer again later, or you can download the files manually from http://filezilla.sourceforge.net" LangString DownloadDialog4 ${CURLANG} "Download and Install from the internet" LangString DownloadDialog5 ${CURLANG} "Skip these components" LangString DownloadDialog6 ${CURLANG} "Use local package directory (enter below):" LangString DownloadDialog8 ${CURLANG} "When using the package directory, the installer will save all downloaded files in this directory. It will also only download the files which aren't already present in the package directory." ;Download strings LangString DownloadDownloading ${CURLANG} "Downloading $0" LangString DownloadRetrievingMirrorList ${CURLANG} " Retrieving mirror list from $1" ;Do not remove the leading two whitespaces LangString DownloadDownloadFailed ${CURLANG} " Download failed: $0" ;Do not remove the leading two whitespaces LangString DownloadMirrorDownloadFailedBox ${CURLANG} "Failed to download mirror list for $0. Reason: $R1$\nThis component will not be installed.$\nRun the installer again later to retry downloading this component.$\nIf this error stays, the installer may not able to access the internet. In any case you can download the components manually from http://www.anyedit.org" LangString DownloadDownloadCancelled ${CURLANG} " Download cancelled" ;Do not remove the leading two whitespaces LangString DownloadRetrievingMirrorListSuccessful ${CURLANG} " Mirror list download successful" ;Do not remove the leading two whitespaces LangString DownloadUsingMirror ${CURLANG} " Using mirror $R3" ;Do not remove the leading two whitespaces LangString DownloadDownloadFailedBox ${CURLANG} "Failed to download $0. Reason: $R1$\nThis component will not be installed.$\nRun the installer again later to retry downloading this component.$\nIf this error stays, the installer may not able to access the internet. In any case you can download the components manually from http://filezilla.sourceforge.net" LangString DownloadDownloadSuccessful ${CURLANG} " Download successful" ;Do not remove the leading two whitespaces LangString DownloadExtractFailedBox ${CURLANG} "Failed to extract contents of $0. Reason: $R1$\nThis component will not be installed." ;-------------------------------- ;Configuration ;General OutFile "AESetupB20.exe" ;Folder selection page InstallDir "$PROGRAMFILES\AnyEdit" ;Remember install folder InstallDirRegKey HKCU "Software\AnyEdit" "" ;-------------------------------- ;Modern UI Configuration !insertmacro MUI_PAGE_LICENSE "license.txt" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY ; !insertmacro MUI_PAGE_STARTMENU Page custom DownloadOptions !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ;Languages !insertmacro MUI_LANGUAGE "English" ;-------------------------------- ;Language Strings ;Description LangString DESC_SecMain ${LANG_ENGLISH} "Install AnyEdit" LangString DESC_StartMenu ${LANG_ENGLISH} "Install Startup Menu shortcuts" LangString DESC_SecDesktop ${LANG_ENGLISH} "Create desktop shortcut for launching AnyEdit" LangString DESC_SecQuick ${LANG_ENGLISH} "Create Quick Launch shortcut for launching AnyEdit" LangString DESC_SecCode ${LANG_ENGLISH} "Downloads source code from AnyEdit website." ;-------------------------------- ;Data LicenseData ".\License.txt" ;-------------------------------- ;Reserve Files ;Things that need to be extracted on first (keep these lines before any File command!) ;Only useful for BZIP2 compression !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE BrandingText "NSIS" ;-------------------------------- ;Reserve Files ;Things that need to be extracted on first (keep these lines before any File command!) ;Only useful for BZIP2 compression !insertmacro MUI_RESERVEFILE_LANGDLL ReserveFile "download.ini" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ReserveFile "${NSISDIR}\Plugins\NSISdl.dll" ;-------------------------------- ;Installer Sections InstType "Standard" InstType "Full" Section "!AnyEdit" SecMain SectionIn 1 2 RO ###This must remain only for the alphas DeleteRegKey HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit" ####------Remember SetOutPath $INSTDIR SetOverwrite on File 'AnyEdit.exe' File 'BCGCB473.dll' File 'SciLexer.dll' File 'AnyEdit.chm' File 'grep.exe' File 'Readme.txt' File 'Changelog.txt' File 'License.txt' File 'Todo.txt' File 'UserImages.bmp' File 'gnu_regex.dll' CreateDirectory '$INSTDIR\Plugins' SetOutPath $INSTDIR\Plugins File './Plugins\*.dll' CreateDirectory '$INSTDIR\Favourites' CreateDirectory '$INSTDIR\Clips' SetOutPath $INSTDIR\Clips File './Clips\*' CreateDirectory '$INSTDIR\Syntax' SetOutPath $INSTDIR\Syntax File './Syntax\*' CreateDirectory '$INSTDIR\StartPage' SetOutPath $INSTDIR\StartPage File './StartPage\*' CreateDirectory '$INSTDIR\temp' SetOutPath $INSTDIR\temp File './License.txt' #####---- Creating workspace information -----####### CreateDirectory '$INSTDIR\Templates' CreateDirectory '$INSTDIR\Templates\File' CreateDirectory '$INSTDIR\Templates\File\Html' SetOutPath $INSTDIR\Templates\File\Html File './Templates/File/Html\*' CreateDirectory '$INSTDIR\Templates\File\Java' SetOutPath $INSTDIR\Templates\File\Java File './Templates/File/Java\*' CreateDirectory '$INSTDIR\Templates\Project' CreateDirectory '$INSTDIR\Templates\Project\Blank Project' SetOutPath '$INSTDIR\Templates\Project\Blank Project' File '.\Templates\Project\Blank Project\*' CreateDirectory '$INSTDIR\Templates\Project\Java Applet' SetOutPath '$INSTDIR\Templates\Project\Java Applet' File '.\Templates\Project\Java Applet\*' CreateDirectory '$INSTDIR\Templates\Project\Java Applet\Files' SetOutPath '$INSTDIR\Templates\Project\Java Applet\Files' File '.\Templates\Project\Java Applet\Files\*' WriteUninstaller "$INSTDIR\Uninstall.exe" WriteRegStr HKCU "Software\AnyEdit" "" $INSTDIR SectionEnd Section "Download Source Code" SecSourceCode SectionIn 2 AddSize 1488 Push $1 Push $2 SetOutPath $INSTDIR StrCpy $0 ${SOURCE_PACKAGE_FILE} StrCpy $1 ${SOURCE_MIRROR_LOCATION} StrCpy $2 $INSTDIR call DownloadAndExtract Pop $0 StrCmp $0 success "" source_failure StrCpy $0 "source" goto source_end source_failure: StrCpy $0 "" source_end: Pop $2 Pop $1 SectionEnd Section "Start menu shortcuts" SecStartMenu SectionIn 1 2 SetOutPath $SMPROGRAMS\AnyEditPro CreateShortCut '$SMPROGRAMS\AnyEditPro\AnyEdit.lnk' '$INSTDIR\AnyEdit.exe' SectionEnd Section "Desktop Shortcut" SecDesktop SectionIn 1 2 SetOutPath $INSTDIR CreateShortCut '$DESKTOP\AnyEdit Professional.lnk' '$INSTDIR\AnyEdit.exe' '/CD /PAUSE' SectionEnd Section "Quick Launch Shortcut" SecQuickLaunch SectionIn 2 SetOutPath $INSTDIR CreateShortCut '$QUICKLAUNCH\AnyEdit Professional.lnk' '$INSTDIR\AnyEdit.exe' '/CD /PAUSE' SectionEnd Section -post WriteRegStr HKEY_LOCAL_MACHINE SOFTWARE\AnyEditPro "" $INSTDIR WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" "DisplayName" "AnyEdit ${VERSION}" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" "UninstallString" "$INSTDIR\Uninstall.exe" SectionEnd ;-------------------------------- ;Descriptions !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecMain} $(DESC_SecMain) !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(DESC_StartMenu) !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(DESC_SecDesktop) !insertmacro MUI_DESCRIPTION_TEXT ${SecQuickLaunch} $(DESC_SecQuick) !insertmacro MUI_DESCRIPTION_TEXT ${SecSourceCode} $(DESC_SecCode) !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- ;Uninstaller Section Section "Uninstall" DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\AnyEditPro" DeleteRegKey HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit" DeleteRegKey HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor" DeleteRegKey HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit" DeleteRegKey HKEY_CURRENT_USER "Software\DeepSoft" Delete $SMPROGRAMS\AnyEdit\*.lnk Delete $WINDIR\SendTo\AnyEdit.lnk RMDir $SMPROGRAMS\AnyEdit RMDir /r $INSTDIR !insertmacro MUI_UNFINISHHEADER SectionEnd Function DownloadOptions StrCpy $R1 "" SectionGetFlags 6 $R0 Intop $R0 $R0 & "0x1" StrCmp $R0 0 +5 StrCmp $R1 "" +2 StrCpy $R1 "$R1, " StrCpy $R0 "Download Source code" StrCpy $R1 "$R1$R0" StrCmp $R1 "" "" +2 Return !insertmacro MUI_HEADER_TEXT "Download Options" "Some components have to be downloaded" !insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 1" text $(DownloadDialog1) !insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 3" text $(DownloadDialog3) !insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 4" text $(DownloadDialog4) !insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 5" text $(DownloadDialog5) !insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 6" text $(DownloadDialog6) !insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 8" text $(DownloadDialog8) !insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 2" text $R1 !insertmacro MUI_INSTALLOPTIONS_DISPLAY "download.ini" FunctionEnd --- NEW FILE: ChangeLog.txt --- Change Log : ============ Beta 2.0 -------- 1) Fixed setting focus problem on ctrl+tab [#765240] 2) Word wrap is now saved between sessions and applies to all files Word wrap option added on to preferences -> Editor Options 3) Unwanted options in Prefs -> Editor Options hidden 4) Highlight current line in menu works 5) Rewrote font handling. It must work as expected now :) 6) AnyEdit identifies modified files ! Warns you about it :) 7) Sorting of function names in class view is now available 8) When find fails.. it notifies user with a dialog 9) Goto and class view jump to line becomes first line of document always. 10) Find dialog vanishes after first successful find... further find carries on with F3 Find options are carried on between different files. 11) Changed all 'bool''s to BOOL which removes many performance warnings [Source change] 12) Output window automatically is shown when a tool is run with the output window hidden 13) Fixed input entry length restriction bug. 14) Fixed accelerators for Bookmarking and changed behaviour 15) Fixed input entry length restriction bug. [#745642] 16) AnyEdit now works properly for all users. Even if the admin setsup the program. 17) AnyEdit saves file only if it has to... 18) Added MiniToolbar feature. 19) Fixed bug which caused wrong Autocomplete file to be displayed in Language preferences [#769366] 20) Find & replace allows null replacement [#745169] 21) Tabs to spaces works correctly [#722975] 22) Bug replace whole word fixed.[#741234] 23) User tool can run with no window open [#750948] 24) Added Initial Plugin support 25) Added Diff Plugin 26) Fixed regular expression not working with find and find replace [#787886] 27) Added folding support to html files 28) Fixed regular expression in replace patterns [#798478] 29) Added option in replace to remove transform backslash expressions. Beta 1.0 -------- 1) Fixed Single Application Instance problems 2) Fixed problems with Tab document selection. Made default as tabs at top 3) Fixed problem with displaying menu... with XP luna theme the menu was having extra space ... not anymore :) 4) Fixed focus issues after finding for a text Beta 1.0 - I am HERE !!! [TESTERS RELEASE] ------------------------------ 1) Very high speed up and less memory usage 2) Hopefully fixed the nasty bug which made AnyEdit close with resource unavailability... 3) Proper highlighting on file type change 4) Proper document modification show with help of * on window. 5) Hour glass when converting docs to different eol modes 6) Two new functions SetLineStyle and ResetLineStyle - useful for displaying errors and warnings These functions can be made use in the error handling system to underline lines with errors and warnings with different color lines and different style lines 7) Added status bar update of line and col number 8) Added VI like comment helping feature where comments automatically appear, be it // or /* followed by *'s automatic addition of // and * on the next line is done by AE now. 9) Added AutoCompletion support :) 10) Added AutoCompletion List 11) Added Box Comment Feature 12) Added Stream Comment and uncomment feature 13) Changed about box contents 14) Added FunctionComboList with support for single file alone 15) Fixed class view positional bugs ... all functions are shown in the order they are in the file 16) Fixed Tabwidth and indendation bug 17) Added Right margin support 18) Entire doc path is shown on top of window but only filename in tabs 19) Added quick jump support 20) Changed to Scintilla 1.51 21) Added find next option and made changes to find methodology and usage 22) Added goto feature 23) Wrote plenty of lang syntax files... more to come soon..! 25) Fixed quick jump crash bug... Made critical section to be commonly used for using shared tag list from classview, quick jump and autocompletion list filling Quick jump was crashing because of this... Alpha 9.0 - Give Me Beta ! -------------------------- 1) Added Initial CTags Support 2) Fixed up flicker in ClassView 3) Fixed up tool execution bug wherein tools dont work when paths have spaces 4) AE now adds on document words in autocompletion list ;) 5) Multiline Clip Text insertion works now 6) Startup page starting is configurable - I know some of you hate it :) 7) Added many new options Remaining --------- 1) Code completion 2) Workspace loading bug - Will be finished only when rewriting the entire workspace handling ! Remaining later --- --------------- Rewrite entire workspace handling .... --- NEW FILE: ToDo.txt --- Todo ==== 1) Fix up code completion 3) Add other language files 4) Add features that Scintilla supports 5) Make comment chars as configurable... HTML, XML, Cpp No registry entries need to be present in the registry for starting ! Todo In the near future ======================= 1) Rewrite entire workspace handling with support for project compilation and build 2) A Very good plugin architecture... possibly with events and configurable menu items 3) Error handling facilities.. Marking errors, warnings and taking to a line on clicking error 4) Save find replace options and contents in registry. Feature Additions ============= *) Show the tools name in the hint box. The VB version does this. *) Make a beep (maybe optional) when tool execution finishes. *) In Configure->Preferences->Tools->Command, make it possible to use the . and .. operators. Example: ./make.bat Where . would be the directory stated under Initial Dir. *) The output window is allways text. That means it doesn't need the smooth scrolling. (slow on my computer) *) The error parser uses the 'current directory' from the latest opened file. It should/ought to use the Initial Dir. (my compiler doesn't ouput the full path) *) Save ALL open files before executing the tool. *) Don't save a file (write it to disk) when it don't need to be saved. *) Make it possible to add an extension to the macros Example $FILEBASE.r21 in the arguments box *) Assign a keystroke to more than the first User Tool. *) Make it possible to select a smaller font in the output window. colors, function Why I can't set background colour to black?? There is option to do so, but when i do that I can't see normal text because it is black too. And other than editor window are uncolorable !?! Good idea would be a window whitch contains all names of functions defined in editor window (double click on name scroll editor window to this function) and functions in files included to current file. -- Have to add option to load and save color configurations :) like vim >>>> Pop up function definitions would detect a previously defined function from the file ( or external if possible ) and pop up a tool tip with the function definition in it with the current location of the cursor in the definitions i.e. void FooBar(int i, bool b); //the functions definition FooBar(//at this point ( the '(' ) a tool tip pops up with //"void FooBar(<b>int i</b>, bool b)" in it FooBar(10, //at this point (after the ',' ), the tooltip now reads //"void FooBar(int i, <b>bool b</b>)" Basically what MS VC++ does. The b tags, of course, denoting bold. The auto complete suggestions would work on the same basic level, but when used with a member operator: for instance '.' or '->'. When a member operator is used, the editor looks through its list of defined classes/structs/whatever to see if the object is there. If it is, it pops up a list of members to select from to auto complete. The list would move as chars are typed after the member operator. ie: class Foo { int i; bool b; } Foo myFoo; myFoo.//at this point, the editor pops up a list with b and i as items ( nothing highlighted yet ) myFoo.b//at this point, the b is highlighted in the list Again, basically like MS VC++. These are to features necessary to any great ide, which AE is almost the best I've ever used. >>>>>> It would be nice to have a place in the .syn file to set an autoindent for block chars. For instance, in cpp, after a { the next line could be set to tab (previous line indent + 1), and after the closing }, the tab should be set back. >>>>> A nice feature would be to convert tabs to spaces when saving files. Bug Fixes ========= - There is a problem with the "Auto Indentation Style" and "Class View" radio buttons group: indeed, they form only one group (meaning one can select one and only one radio button for both boxes) where one would expect to be able to independently select the indentation style and class view scope (single file or project -- not implemented yet, unfortunately ;)) - I created a tool bar for use with perl after leaving the editor and returning the perl toolbar loaded before the standard TB I tried moving the custom tool bar below the standard tool bar without any perminant success. each time i exit the editor and return the custom bar is back on top. - Regular expressions in Search and Replace don't work - Missing "revert to saved" option - Tools arguments FILEDIR and FILEPATH are not converted to their expected value (not converted at all !) - Auto indentation doesn't work - Long file names are displayed is their unreadable short form (e.g., "Document and Settings" -> "DOCUM~1" in title bar, recent files and Window menu - [MAJOR] The latter is probably responsible of this one: Can't open files with long file name in path when it's on a Samba mounted disk /////////////////////////////////////////////////////////////////////////////////// AnyEdit Version : Professional v 2.0 AnyEdit Build : Beta 1.0 OS Version : Microsoft Windows 98 Version 4.90. .4.3000 (a.k.a Win ME ) /////////////////////////////////////////////////////////////////////////////////// 1 - Project file list in workspace: -Adding a large number of files (59) to project doesn't work -Files aren't sorted alphabetically, just as they were added. -Add directory contents doesn't work ? -Add files path isn't remembered 3 - Autocompletion - When the code list has one only word the completed word adds the "?0" characters. e.g: abcdefg and now: abcd-> is autocompleted to abcdefg?0 - Starting the completion list (Ctrl+space) with just one character don't works well e.g: aeiou abcdeeeee abcdefghi now: a -> Ctrl+Space and continue typing "bcd..." don't scrolls properly in the list - Auto Complete is by default assigned to "Ctrl+C", just like Copy. It just don't seems to work... 4 - Most changes in Preferences don't take effect until AnyEdit is restarted 5 - Horizontal and Vertical splitting don't work. Enabling them in preferences has no effect. 6 - Keystroke recording doesn't work - in a project, classes are usually shown twice in the tags pane, one for the header and another for the implementation file. 8 - Keyboard customization doesn't show the default assigned keys. For instance, by default Ctrl+A is assigned to "Select all", but in Customize->Keyboard->Edit->Select All there's no current key assigned shown and when "Ctrl+A" is assigned to any other command, it is not shown as already assigned. Then, assigning Ctrl+A to a command like keystroke 1 or any other has no effect, because Ctrl+A continues acting as "select all". So it is *very* hard make assignments which make sense. 10 - After being editing for some time, just opening a menu from main menu causes AnyEdit to crash. It also crashes at exit from time to time... --- NEW FILE: ZipDLL.nsh --- ;ZipDLL include file for NSIS ;Written by Tim Kosse (mailto:tim...@gm...) ;Compatible with Modern UI 1.63 ;German translation by Tim Kosse ;Spanish translation by "dark_boy" ;French translation by "veekee" ;Brazilian Portuguese translation by "deguix" ;Traditional Chinese traslation by "matini" !ifndef MUI_INCLUDED !error "Please include modern UI first!!" !endif !ifndef MUI_ZIPDLL_USED !define MUI_ZIPDLL_USED !macro MUI_ZIPDLL_EXTRACTFILE SOURCE DESTINATION FILE Push "${FILE}" Push "${DESTINATION}" Push "${SOURCE}" ;The strings that will be translated are: ;" Error: %s" ;"Could not get file attributes." ;"Error: Could not get file attributes." ;"Could not extract %s" ;" Error: Could not extract %s" ;"Specified file does not exist in archive." ;"Error: Specified file does not exist in archive." ;"Extracting the file %s from %s to %s" !ifdef "MUI_LANGUAGEFILE_FRENCH_USED" strcmp $LANGUAGE ${LANG_FRENCH} 0 +10 Push " Erreur : %s" Push "Impossible de récupérer les informations sur le fichier." Push "Erreur : Impossible de récupérer les informations sur le fichier." Push "Impossible de décompresser %s." Push " Erreur : Impossible de décompresser %s." Push "Le fichier spécifié n'existe pas dans l'archive" Push "Erreur : Le fichier spécifié n'existe pas dans l'archive" Push "Décompression du fichier %s depuis %s vers %s" Push "/TRANSLATE" !endif !ifdef "MUI_LANGUAGEFILE_GERMAN_USED" strcmp $LANGUAGE ${LANG_GERMAN} 0 +10 Push " Fehler: %s" Push "Dateiattribute konnten nicht ermittelt werden." Push "Fehler: Dateiattribute konnten nicht ermittelt werden." Push "%s konnte nicht dekomprimiert werden." Push " Fehler: %s konnte nicht dekomprimiert werden." Push "Die angegebene Datei existiert nicht im Archiv" Push "Fehler: Die angegebene Datei existiert nicht im Archiv" Push "Dekomprimiere Datei %s von %s nach %s" Push "/TRANSLATE" !endif !ifdef "MUI_LANGUAGEFILE_SPANISH_USED" strcmp $LANGUAGE ${LANG_SPANISH} 0 +10 Push "Error: %s" Push "No se obtuvieron atributos del archivo" Push "Error: No se obtuvieron atributos del archivo" Push "No se pudo extraer %s" Push " Error: No se pudo extraer %s" Push "Archivo especificado no existe en el ZIP" Push "Error: El archivo especificado no existe en el ZIP" Push "Extrayendo el archivo %s de %s a %s" Push "/TRANSLATE" !endif !ifdef "MUI_LANGUAGEFILE_PORTUGUESEBR_USED" strcmp $LANGUAGE ${LANG_PORTUGUESEBR} 0 +10 Push "Erro: %s" Push "Não se pode ler os atributos do arquivo" Push "Error: Não se pode ler os atributos do arquivo" Push "Não se pode extrair %s" Push " Erro: Não se pode extrair %s" Push "O arquivo especificado não existe no ZIP" Push "Erro: O arquivo especificado não existe no ZIP" Push "Extraindo o arquivo %s de %s a %s" Push "/TRANSLATE" !endif !ifdef "MUI_LANGUAGEFILE_TRADCHINESE_USED" StrCmp $LANGUAGE ${LANG_TRADCHINESE} 0 +10 Push " ¿ù»~¡G%s" Push "µLªk¨ú±oÀÉ®×ÄݩʡC" Push "¿ù»~¡GµLªk¨ú±oÀÉ®×ÄݩʡC" Push "µLªk¸ÑÀ£ÁY %s" Push " ¿ù»~¡GµLªk¸ÑÀ£ÁY %s" Push "«ü©wªºÀɮפ£¦s¦b©óÀ£ÁYÀɤ¤¡C" Push "¿ù»~¡G«ü©wªºÀɮפ£¦s¦b©óÀ£ÁYÀɤ¤¡C" Push "¥¿¦b¸ÑÀ£ÁYÀÉ®× %s¡A±q %s ¨ì %s" Push "/TRANSLATE" !endif ZipDLL::extractfile !macroend !macro MUI_ZIPDLL_EXTRACTALL SOURCE DESTINATION Push "${DESTINATION}" Push "${SOURCE}" ;The strings that will be translated are: ;" Error: %s" ;"Could not get file attributes." ;"Error: Could not get file attributes." ;"Could not extract %s" ;" Error: Could not extract %s" ;" Extract : %s" ;" Extracting %d files and directories" ;"Extracting contents of %s to %s" !ifdef "MUI_LANGUAGEFILE_FRENCH_USED" strcmp $LANGUAGE ${LANG_FRENCH} 0 +10 Push " Erreur : %s" Push "Impossible de récupérer les informations sur le fichier." Push "Erreur : Impossible de récupérer les informations sur le fichier." Push "Impossible de décompresser %s." Push " Erreur : Impossible de décompresser %s." Push " Décompression : %s" Push " Décompression de %d fichiers et répertoires" Push "Décompression des données de %s vers %s" Push "/TRANSLATE" !endif !ifdef "MUI_LANGUAGEFILE_GERMAN_USED" strcmp $LANGUAGE ${LANG_GERMAN} 0 +10 Push " Fehler: %s" Push "Dateiattribute konnten nicht ermittelt werden." Push "Fehler: Dateiattribute konnten nicht ermittelt werden." Push "%s konnte nicht dekomprimiert werden." Push " Fehler: %s konnte nicht dekomprimiert werden." Push " Dekomprimiere: %s" Push " Dekomprimiere %d Dateien und Verzeichnisse" Push "Dekomprimiere Inhalt von %s nach %s" Push "/TRANSLATE" !endif !ifdef "MUI_LANGUAGEFILE_SPANISH_USED" strcmp $LANGUAGE ${LANG_SPANISH} 0 +10 Push "Error: %s" Push "No se obtuvieron atributos del archivo" Push "Error: No se obtuvieron atributos del archivo" Push "No se pudo extraer %s" Push " Error: No se pudo extraer %s" Push " Extraer: %s" Push " Extrayendo %d archivos y directorios" Push "Extraer archivos de %s a %s" Push "/TRANSLATE" !endif !ifdef "MUI_LANGUAGEFILE_PORTUGUESEBR_USED" strcmp $LANGUAGE ${LANG_PORTUGUESEBR} 0 +10 Push "Erro: %s" Push "Não se pode ler os atributos do arquivo" Push "Error: Não se pode ler os atributos do arquivo" Push "Não se pode extrair %s" Push " Erro: Não se pode extrair %s" Push " Extraindo: %s" Push " Extraindo %d arquivos e diretórios" Push "Extraindo arquivos de %s a %s" Push "/TRANSLATE" !endif !ifdef "MUI_LANGUAGEFILE_TRADCHINESE_USED" StrCmp $LANGUAGE ${LANG_TRADCHINESE} 0 +10 Push " ¿ù»~¡G%s" Push "µLªk¨ú±oÀÉ®×ÄݩʡC" Push "¿ù»~¡GµLªk¨ú±oÀÉ®×ÄݩʡC" Push "µLªk¸ÑÀ£ÁY %s" Push " ¿ù»~¡GµLªk¸ÑÀ£ÁY %s" Push " ¸ÑÀ£ÁY¡G%s" Push " ¥¿¦b¸ÑÀ£ÁY %d ÀɮשM¸ê®Æ§¨" Push "¥¿¦b¸ÑÀ£ÁY %s ªº¤º®e¨ì %s" Push "/TRANSLATE" !endif ZipDLL::extractall !macroend !endif --- NEW FILE: download.ini --- [Settings] NumFields=8 ; comment this out to hide the back button BackEnabled=1 [Field 1] Type=label left=0 right=300 top=0 bottom=10 [Field 2] Type=label left=0 right=300 top=10 bottom=30 [Field 3] Type=label left=0 right=300 top=30 bottom=60 [Field 4] Type=RadioButton State=1 left=0 right=300 top=60 bottom=70 [Field 5] Type=RadioButton State=0 left=0 right=300 top=70 bottom=80 [Field 6] Type=CheckBox State=0 left=0 right=300 top=85 bottom=95 [Field 7] Type=DirRequest left=11 right=300 top=97 bottom=110 [Field 8] Type=label left=11 right=300 top=113 bottom=145 --- NEW FILE: download.nsh --- !include ZipDLL.nsh !macro Print PARAM SetDetailsPrint both DetailPrint "${PARAM}" SetDetailsPrint textonly !macroend Function MirrorCleanup Pop $R5 ;Get number of mirrors on the stack mirror_cleanupstart: IntCmp $R5 0 mirror_cleanupcomplete Pop $R3 IntOp $R5 $R5 - "1" goto mirror_cleanupstart mirror_cleanupcomplete: FunctionEnd ;------------------------------------------------------------------------------ ; TrimNewlines ; input, top of stack (i.e. whatever$\r$\n) ; output, top of stack (replaces, with i.e. whatever) ; modifies no other variables. ; Function TrimNewlines Exch $0 Push $1 Push $2 StrCpy $1 0 loop: IntOp $1 $1 - 1 StrCpy $2 $0 1 $1 StrCmp $2 "$\r" loop StrCmp $2 "$\n" loop IntOp $1 $1 + 1 StrLen $2 $0 IntOp $2 $2 + $1 StrCpy $0 $0 $2 Pop $2 Pop $1 Exch $0 FunctionEnd ;------------------------------------------------------------------------------ ; TrimBackslashes ; input, top of stack (i.e. whatever\) ; output, top of stack (replaces, with i.e. whatever) ; modifies no other variables. ; Function TrimBackslashes Exch $0 Push $1 Push $2 StrCpy $1 0 loop: IntOp $1 $1 - 1 StrCpy $2 $0 1 $1 StrCmp $2 "\" loop IntOp $1 $1 + 1 StrLen $2 $0 IntOp $2 $2 + $1 StrCpy $0 $0 $2 Pop $2 Pop $1 Exch $0 FunctionEnd Function DownloadAndExtract SetDetailsPrint textonly StrCpy $R9 success ; Check if user has selected "Skip" StrCpy $R0 "" ReadIniStr $R0 "$PLUGINSDIR\download.ini" "Field 5" state StrCmp $R0 "1" function_end ; Check if installer should use local package directory and if the target file already exists StrCpy $R0 "" ReadIniStr $R0 "$PLUGINSDIR\download.ini" "Field 6" state StrCmp $R0 "1" try_use_local goto dl_mirror try_use_local: StrCpy $R0 "" ReadIniStr $R0 "$PLUGINSDIR\download.ini" "Field 7" state StrCmp $R0 "" use_temp ClearErrors CreateDirectory $R0 IfFileExists "$R0\*.*" "" dl_mirror IfErrors dl_mirror Push $R0 Call TrimBackslashes Pop $R0 StrCpy $R0 "$R0\$0" StrCpy $R2 1 IfFileExists $R0 startextract dl_mirror: !insertmacro Print $(DownloadDownloading) !insertmacro Print $(DownloadRetrievingMirrorList) ; Safe variables Push $0 StrCpy $0 "" ; make the call to download GetTempFileName $R0 nsisdl::download_quiet $1 $R0 ; for a quiet install, use download_quiet ; check if download succeeded Pop $0 StrCmp $0 "success" mirrorsuccessful StrCmp $0 "cancel" mirrorcancelled ; we failed !insertmacro Print $(DownloadDownloadFailed) Delete $R0 StrCpy $R1 $0 Pop $0 MessageBox MB_OK|MB_ICONEXCLAMATION $(DownloadMirrorDownloadFailedBox) StrCpy $R9 failure goto function_end mirrorcancelled: !insertmacro Print $(DownloadDownloadCancelled) Delete $R0 Pop $0 Quit mirrorsuccessful: !insertmacro Print $(DownloadRetrievingMirrorListSuccessful) Pop $0 ;Now parse the mirror list FileOpen $R1 $R0 a ;Read number of mirrors into $R5 FileRead $R1 $R5 ;Chose one random mirror ;Calculate a random number based on the filetime of the downloaded mirror list GetFileTime $R0 $R7 $R6 IntOp $R6 $R6 & "16777215" ;Just keep the last few bits, also ensure that $R6 is positive IntOp $R6 $R6 / "100" ;Skip last 2 digits, they aren't really random due to low timer resolution IntOp $R6 $R6 % $R5 IntOp $R6 $R6 + "1" ; $R6 now contains the index of the mirror to use first StrCpy $R7 $R5 readmirror: FileRead $R1 $R4 IntOp $R6 $R6 - "1" IntOp $R7 $R7 - "1" Push $R4 Call TrimNewlines IntCmp $R6 0 readmirror_random IntCmp $R7 0 readmirror_done goto readmirror readmirror_random: Pop $R3 IntCmp $R7 0 readmirror_done goto readmirror readmirror_done: IntOp $R5 $R5 - "1" Push $R5 ;$R3 now contains the mirror to use ;The other mirrors are on top of the stack !insertmacro Print $(DownloadUsingMirror) FileClose $R1 ;Done parsing Delete $R0 ;Now download the file ; Safe variables Push $0 ; make the call to download ; Check if installer should use local package directory StrCpy $R0 "" ReadIniStr $R0 "$PLUGINSDIR\download.ini" "Field 6" state StrCmp $R0 "1" use_local use_temp: StrCpy $R2 0 GetTempFileName $R0 goto dl_start use_local: StrCpy $R0 "" ReadIniStr $R0 "$PLUGINSDIR\download.ini" "Field 7" state StrCmp $R0 "" use_temp ClearErrors CreateDirectory $R0 IfFileExists "$R0\*.*" use_local2 use_temp use_local2: IfErrors use_temp Push $R0 Call TrimBackslashes Pop $R0 StrCpy $R0 "$R0\$0" StrCpy $R2 1 dl_start: nsisdl::download $R3 $R0 ; for a quiet install, use download_quiet ; check if download succeeded Pop $0 StrCmp $0 "success" dlsuccessful StrCmp $0 "cancel" dlcancelled ; we failed !insertmacro Print $(DownloadDownloadFailed) Delete $R0 StrCpy $R1 $0 Pop $0 MessageBox MB_OK|MB_ICONEXCLAMATION $(DownloadDownloadFailedBox) StrCpy $R9 failure call MirrorCleanup goto function_end dlcancelled: !insertmacro Print $(DownloadDownloadCancelled) Delete $R0 Pop $0 call MirrorCleanup Quit dlsuccessful: !insertmacro Print $(DownloadDownloadSuccessful) Pop $0 call MirrorCleanup startextract: ;Now extract the file ; make the call to ExtractAll !insertmacro MUI_ZIPDLL_EXTRACTALL $R0 $2 ; check if extract succeeded Pop $R1 StrCmp $R1 "success" extract_end MessageBox MB_OK|MB_ICONEXCLAMATION $(DownloadExtractFailedBox) StrCpy $R9 failure extract_end: StrCmp $R2 1 no_delete Delete $R0 no_delete: function_end: Push $R9 SetDetailsPrint both FunctionEnd Index: AnyEdit.exe =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/AnyEdit.exe,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvshEDb9Q and /tmp/cvs6Gl72B differ Index: BCGCB473.dll =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/BCGCB473.dll,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsCyijCY and /tmp/cvsW4g05S differ Index: License.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/License.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** License.txt 8 May 2003 12:21:02 -0000 1.1 --- License.txt 30 Sep 2003 10:41:33 -0000 1.2 *************** *** 1,3 **** ! Copyright (C) 2002 DeepSoft - M.Deepak This software is provided 'as-is', without any express or implied --- 1,3 ---- ! Copyright (C) 2003 DeepSoft - M.Deepak This software is provided 'as-is', without any express or implied Index: SciLexer.dll =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/SciLexer.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs9BKFm9 and /tmp/cvsk4nKpb differ |
From: <td...@us...> - 2003-09-01 11:27:37
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv26191 Modified Files: FindReplace.cpp Log Message: Fixed replaceall regular expression bug Index: FindReplace.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FindReplace.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FindReplace.cpp 27 Aug 2003 06:32:42 -0000 1.5 --- FindReplace.cpp 1 Sep 2003 11:27:34 -0000 1.6 *************** *** 156,160 **** if(m_check2.GetCheck()) flags = flags | SCFIND_MATCHCASE; ! if(m_check2.GetCheck()) flags = flags | SCFIND_REGEXP; --- 156,160 ---- if(m_check2.GetCheck()) flags = flags | SCFIND_MATCHCASE; ! if(m_check3.GetCheck()) flags = flags | SCFIND_REGEXP; |
From: <td...@us...> - 2003-08-29 07:35:51
|
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1:/tmp/cvs-serv16389 Added Files: BCGCB473D.dll Log Message: Initial version --- NEW FILE: BCGCB473D.dll --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv6649 Modified Files: AnyEditView.cpp AnyEditView.h BugReport.cpp ChangeLog.txt FindDialog.cpp FindReplace.cpp Language.cpp Log Message: 26) Fixed regular expression not working with find and find replace [#787886] 27) Added folding support to html files Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** AnyEditView.cpp 11 Aug 2003 04:03:19 -0000 1.31 --- AnyEditView.cpp 27 Aug 2003 06:32:42 -0000 1.32 *************** *** 108,117 **** ON_UPDATE_COMMAND_UI(ID_CONFIGURE_CURRENTDOCUMENT_FOLDMARGIN, OnUpdateConfigureCurrentdocumentFoldmargin) ON_WM_DESTROY() //}}AFX_MSG_MAP ON_WM_CONTEXTMENU() // Standard printing commands ! ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) ! ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) ! ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) ON_COMMAND(ID_EDIT_FIND_COMBO, OnEditFind) ON_COMMAND(ID_EDIT_NEXT_TAG, OnComboFunction) --- 108,118 ---- ON_UPDATE_COMMAND_UI(ID_CONFIGURE_CURRENTDOCUMENT_FOLDMARGIN, OnUpdateConfigureCurrentdocumentFoldmargin) ON_WM_DESTROY() + ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview) //}}AFX_MSG_MAP ON_WM_CONTEXTMENU() // Standard printing commands ! //ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) ! //ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) ! //ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) ON_COMMAND(ID_EDIT_FIND_COMBO, OnEditFind) ON_COMMAND(ID_EDIT_NEXT_TAG, OnComboFunction) *************** *** 2008,2010 **** --- 2009,2028 ---- }; + } + + void CAnyEditView::OnPrint(CDC* pDC, CPrintInfo* pInfo) + { + // TODO: Add your specialized code here and/or call the base class + //m_Scintilla.PrintClient(pDC,PRF_OWNED); + //CView::OnPrint(pDC, pInfo); + /*RangeToFormat frPrint; + frPrint.hdc = pDC; + frPrint.hdcTarget=pDC; + m_Scintilla.FormatRange(true,(long)&frPrint);*/ + } + + void CAnyEditView::OnFilePrintPreview() + { + // TODO: Add your command handler code here + BCGPrintPreview(this); } Index: AnyEditView.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AnyEditView.h 11 Aug 2003 04:03:19 -0000 1.17 --- AnyEditView.h 27 Aug 2003 06:32:42 -0000 1.18 *************** *** 50,59 **** // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAnyEditView) ! public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); virtual void OnInitialUpdate(); ! protected: virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); --- 50,59 ---- // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAnyEditView) ! public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); virtual void OnInitialUpdate(); ! protected: virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); *************** *** 61,65 **** virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); ! //}}AFX_VIRTUAL // Implementation --- 61,66 ---- virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); ! virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo); ! //}}AFX_VIRTUAL // Implementation *************** *** 171,174 **** --- 172,176 ---- afx_msg void OnUpdateConfigureCurrentdocumentFoldmargin(CCmdUI* pCmdUI); afx_msg void OnDestroy(); + afx_msg void OnFilePrintPreview(); //}}AFX_MSG afx_msg void OnEditFind(); Index: BugReport.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/BugReport.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BugReport.cpp 8 May 2003 12:00:56 -0000 1.3 --- BugReport.cpp 27 Aug 2003 06:32:42 -0000 1.4 *************** *** 130,135 **** retStr += _T( "Microsoft Windows NT "); ! if ( osvi.dwMajorVersion == 5 ) retStr += _T("Microsoft Windows 2000 "); // Test for workstation versus server. --- 130,138 ---- retStr += _T( "Microsoft Windows NT "); ! if ( (osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion==0)) retStr += _T("Microsoft Windows 2000 "); + + if ( (osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion>=1)) + retStr += _T("Microsoft Windows XP "); // Test for workstation versus server. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ChangeLog.txt,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ChangeLog.txt 18 Jul 2003 19:05:36 -0000 1.27 --- ChangeLog.txt 27 Aug 2003 06:32:42 -0000 1.28 *************** *** 31,34 **** --- 31,36 ---- 24) Added Initial Plugin support 25) Added Diff Plugin + 26) Fixed regular expression not working with find and find replace [#787886] + 27) Added folding support to html files Beta 1.0 Index: FindDialog.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FindDialog.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FindDialog.cpp 7 Aug 2003 06:48:09 -0000 1.9 --- FindDialog.cpp 27 Aug 2003 06:32:42 -0000 1.10 *************** *** 80,84 **** if(m_check2.GetCheck()) flags = flags | SCFIND_MATCHCASE; ! if(m_check2.GetCheck()) flags = flags | SCFIND_REGEXP; --- 80,84 ---- if(m_check2.GetCheck()) flags = flags | SCFIND_MATCHCASE; ! if(m_check3.GetCheck()) flags = flags | SCFIND_REGEXP; Index: FindReplace.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FindReplace.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FindReplace.cpp 17 Jul 2003 11:32:15 -0000 1.4 --- FindReplace.cpp 27 Aug 2003 06:32:42 -0000 1.5 *************** *** 79,83 **** if(m_check2.GetCheck()) flags = flags | SCFIND_MATCHCASE; ! if(m_check2.GetCheck()) flags = flags | SCFIND_REGEXP; --- 79,83 ---- if(m_check2.GetCheck()) flags = flags | SCFIND_MATCHCASE; ! if(m_check3.GetCheck()) flags = flags | SCFIND_REGEXP; Index: Language.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Language.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Language.cpp 8 May 2003 12:00:56 -0000 1.8 --- Language.cpp 27 Aug 2003 06:32:42 -0000 1.9 *************** *** 197,201 **** --- 197,204 ---- if((lexer == SCLEX_HTML) || (lexer == SCLEX_XML) || (lexer == SCLEX_ASP) || (lexer == SCLEX_PHP) ) + { m_scintilla->SetStyleBits(7); + m_scintilla->SetProperty("fold.html","1"); + } else m_scintilla->SetStyleBits(5); *************** *** 205,209 **** void CLanguage::SetListWords(CString str) { - //msc.ReturnDelimitedArray(str," ",listwords); listwords = str; } --- 208,211 ---- *************** *** 212,218 **** void CLanguage::GetListWords(CString &lwords) { - //AfxMessageBox(listwords); - //CString tstr = listwords; - //msc.ReturnDelimitedArray(tstr," ",lwords); lwords = listwords; } --- 214,217 ---- |
From: <td...@us...> - 2003-08-12 14:34:46
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv2344 Modified Files: AnyEdit.dsp ClassView.cpp ClassView.h TagList.cpp TagList.h TagParser.cpp Log Message: Intelligent tag parser... Index: AnyEdit.dsp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.dsp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** AnyEdit.dsp 11 Aug 2003 17:21:50 -0000 1.21 --- AnyEdit.dsp 12 Aug 2003 13:26:35 -0000 1.22 *************** *** 246,249 **** --- 246,257 ---- # Begin Source File + SOURCE=.\LBSpinButtonCtrl.cpp + # End Source File + # Begin Source File + + SOURCE=.\LBSpinButtonCtrl.h + # End Source File + # Begin Source File + SOURCE=.\MainFrm.cpp # End Source File Index: ClassView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ClassView.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ClassView.cpp 11 Aug 2003 17:21:50 -0000 1.18 --- ClassView.cpp 12 Aug 2003 13:26:35 -0000 1.19 *************** *** 334,338 **** ttempItem=TVI_FIRST; ! int imnum = GetImageForAccess(ent->access); HTREEITEM newItem = InsertItem(ent->tagname,imnum,imnum,parItem,ttempItem); --- 334,338 ---- ttempItem=TVI_FIRST; ! int imnum = GetImageForAccess(ent); HTREEITEM newItem = InsertItem(ent->tagname,imnum,imnum,parItem,ttempItem); *************** *** 395,399 **** ttempItem=TVI_FIRST; ! int imnum = GetImageForAccess(ent->access); HTREEITEM newItem = InsertItem(ent->tagname,imnum,imnum,parItem,ttempItem); --- 395,399 ---- ttempItem=TVI_FIRST; ! int imnum = GetImageForAccess(ent); HTREEITEM newItem = InsertItem(ent->tagname,imnum,imnum,parItem,ttempItem); *************** *** 583,587 **** }; //SetItemData(hItem,ent->lineno); ! int imnum = GetImageForAccess(ent->access); int oldnum=0; int oldselnum=0; --- 583,587 ---- }; //SetItemData(hItem,ent->lineno); ! int imnum = GetImageForAccess(ent); int oldnum=0; int oldselnum=0; *************** *** 612,628 **** } ! int CClassView::GetImageForAccess(int acc) { ! switch(acc) { ! case 1: ! return 1; ! break; ! case 2: ! return 4; ! break; ! case 3: ! return 3; ! break; } --- 612,734 ---- } ! int CClassView::GetImageFTC(CTagEntry * acc) { ! switch(acc->type) ! { ! case 'f': // If it is a function ! { ! switch(acc->access) ! { ! case 1: ! return 1; ! break; ! case 2: ! return 4; ! break; ! case 3: ! return 3; ! break; ! default: ! return 8; ! } ! ! } ! break; ! ! case 'v': ! case 'm': ! { ! switch(acc->access) ! { ! case 1: ! return 2; ! break; ! case 2: ! return 11; ! break; ! case 3: ! return 10; ! break; ! default: ! return 9; ! } ! } ! break; ! } ! ! return 8; ! } ! ! int CClassView::GetImageFTJAVA(CTagEntry * acc) ! { ! switch(acc->type) ! { ! case 'm': // If it is a function ! { ! switch(acc->access) ! { ! case 1: ! return 1; ! break; ! case 2: ! return 4; ! break; ! case 3: ! return 3; ! break; ! default: ! return 8; ! } ! ! } ! break; ! ! case 'f': ! { ! switch(acc->access) ! { ! case 1: ! return 2; ! break; ! case 2: ! return 11; ! break; ! case 3: ! return 10; ! break; ! default: ! return 9; ! } ! } ! break; ! } ! return 8; ! } ! ! int CClassView::GetImageFTCSHARP(CTagEntry * acc) ! { ! return 8; ! } ! ! int CClassView::GetImageFTPYTHON(CTagEntry * acc) ! { ! return 8; ! } ! ! int CClassView::GetImageFTPHP(CTagEntry * acc) ! { ! return 8; ! } ! ! int CClassView::GetImageForAccess(CTagEntry * acc) ! { ! switch(acc->filetype) { ! case FT_C: //In case of C,CPP files ! return GetImageFTC(acc); ! break; ! case FT_JAVA: ! return GetImageFTJAVA(acc); ! break; } Index: ClassView.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ClassView.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ClassView.h 8 May 2003 12:00:56 -0000 1.14 --- ClassView.h 12 Aug 2003 13:26:35 -0000 1.15 *************** *** 58,74 **** BOOL IsItemClass(HTREEITEM hitem); void WalkThroughAllItemsDataAndDeleteIt(HTREEITEM startFrom); ! int GetImageForAccess(int acc); void CheckMember(HTREEITEM hItem, CTagList * taglist); void CheckClass(HTREEITEM hItem, CTagList * tagList); void CheckThisItem(HTREEITEM hItem, CTagList * taglist); void CheckTagList(HTREEITEM hItem,CTagList * taglist); ! void InsertFunction(CTagEntry ! * ent); ! CTagEntry ! * InsertFunctionByLine(CTagEntry ! * ent); ! CTagEntry ! * InsertFunctionByAlphabet(CTagEntry ! * ent); HTREEITEM GetItemFromClassName(LPCSTR clName, HTREEITEM hItem); --- 58,74 ---- BOOL IsItemClass(HTREEITEM hitem); void WalkThroughAllItemsDataAndDeleteIt(HTREEITEM startFrom); ! int GetImageForAccess(CTagEntry * acc); void CheckMember(HTREEITEM hItem, CTagList * taglist); void CheckClass(HTREEITEM hItem, CTagList * tagList); void CheckThisItem(HTREEITEM hItem, CTagList * taglist); void CheckTagList(HTREEITEM hItem,CTagList * taglist); ! void InsertFunction(CTagEntry * ent); ! CTagEntry* InsertFunctionByLine(CTagEntry * ent); ! CTagEntry* InsertFunctionByAlphabet(CTagEntry* ent); ! int GetImageFTC(CTagEntry * ent); ! int GetImageFTJAVA(CTagEntry * ent); ! int GetImageFTCSHARP(CTagEntry * ent); ! int GetImageFTPYTHON(CTagEntry * ent); ! int GetImageFTPHP(CTagEntry * ent); HTREEITEM GetItemFromClassName(LPCSTR clName, HTREEITEM hItem); Index: TagList.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/TagList.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TagList.cpp 8 May 2003 12:00:56 -0000 1.7 --- TagList.cpp 12 Aug 2003 13:26:35 -0000 1.8 *************** *** 69,76 **** break; case 'f': functionlist.AddTail(ent); break; default: ! otherlist.AddTail(ent); } } --- 69,78 ---- break; case 'f': + case 'v': + case 'm': functionlist.AddTail(ent); break; default: ! otherlist.AddTail(ent); } } Index: TagList.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/TagList.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TagList.h 8 May 2003 12:00:56 -0000 1.6 --- TagList.h 12 Aug 2003 13:26:35 -0000 1.7 *************** *** 10,23 **** #endif // _MSC_VER > 1000 class CTagEntry : public CObject { public: ! CTagEntry ! () { lineno=0; access=0; deleted = FALSE; }; CTagEntry --- 10,31 ---- #endif // _MSC_VER > 1000 + #define FT_COMMON 0 + #define FT_JAVA 1 + #define FT_C 2 + #define FT_CSHARP 3 + #define FT_PYTHON 4 + #define FT_PHP 5 + #define FT_JS 6 + class CTagEntry : public CObject { public: ! CTagEntry() { lineno=0; access=0; deleted = FALSE; + filetype=FT_COMMON; }; CTagEntry *************** *** 34,37 **** --- 42,47 ---- filename=original->filename; tagDefinition=original->tagDefinition; + filetype=original->filetype; + deleted=original->deleted; }; }; *************** *** 45,48 **** --- 55,59 ---- CString tagDefinition; BOOL deleted; + int filetype; }; Index: TagParser.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/TagParser.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TagParser.cpp 8 May 2003 12:00:56 -0000 1.8 --- TagParser.cpp 12 Aug 2003 13:26:35 -0000 1.9 *************** *** 45,48 **** --- 45,90 ---- } + int GetFileType(LPCSTR extension) + { + if(strcmp(extension,"C")==0) + { + return FT_C; + }else if(strcmp(extension,"CPP")==0) + { + return FT_C; + }else if(strcmp(extension,"H")==0) + { + return FT_C; + }else if(strcmp(extension,"HPP")==0) + { + return FT_C; + }else if(strcmp(extension,"CXX")==0) + { + return FT_C; + }else if(strcmp(extension,"HXX")==0) + { + return FT_C; + }else if(strcmp(extension,"JAVA")==0) + { + return FT_JAVA; + }else if(strcmp(extension,"JAV")==0) + { + return FT_JAVA; + }else if(strcmp(extension,"PHP")==0) + { + return FT_PHP; + }else if(strcmp(extension,"PHP3")==0) + { + return FT_PHP; + }else if(strcmp(extension,"CS")==0) + { + return FT_CSHARP; + }else if(strcmp(extension,"PY")==0) + { + return FT_PYTHON; + } + + return FT_COMMON; + } void CTagParser::ParseLineDetails(CTagList *list,LPCSTR linecontent) *************** *** 87,90 **** --- 129,133 ---- ent->tagname = arr.GetAt(0); ent->filename = arr.GetAt(1); + ent->filetype = GetFileType(msc.GetFileExtension(ent->filename)); CString tagDef=arr.GetAt(2); tagDef.Replace("/^",""); |
From: <td...@us...> - 2003-08-11 18:00:33
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv8042 Modified Files: AnyEdit.cpp AnyEdit.dsp ClassView.cpp ctagslib.lib Log Message: New version of CTags library Index: AnyEdit.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** AnyEdit.cpp 11 Aug 2003 04:03:19 -0000 1.29 --- AnyEdit.cpp 11 Aug 2003 17:21:49 -0000 1.30 *************** *** 224,228 **** //check for leaks ! _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); --- 224,228 ---- //check for leaks ! //_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); *************** *** 241,246 **** return TRUE; - _CrtDumpMemoryLeaks(); - return TRUE; } --- 241,244 ---- Index: AnyEdit.dsp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.dsp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AnyEdit.dsp 31 Jul 2003 08:57:48 -0000 1.20 --- AnyEdit.dsp 11 Aug 2003 17:21:50 -0000 1.21 *************** *** 396,415 **** # Begin Source File - SOURCE=.\LBSpinButtonCtrl.cpp - # End Source File - # Begin Source File - - SOURCE=.\LBSpinButtonCtrl.h - # End Source File - # Begin Source File - - SOURCE=.\LBTabCtrl.cpp - # End Source File - # Begin Source File - - SOURCE=.\LBTabCtrl.h - # End Source File - # Begin Source File - SOURCE=.\Plugin.cpp # End Source File --- 396,399 ---- Index: ClassView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ClassView.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ClassView.cpp 31 Jul 2003 08:57:48 -0000 1.17 --- ClassView.cpp 11 Aug 2003 17:21:50 -0000 1.18 *************** *** 50,53 **** --- 50,55 ---- CClassView::~CClassView() { + if(m_SingleLock) + delete m_SingleLock; // to avoid memory leaks when closing the AnyEdit app, CTagEntry classes (that are pointed to by GetItemData // are deleted on WM_DESTROY (OnDestoy function); Index: ctagslib.lib =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ctagslib.lib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsqO0XJD and /tmp/cvsG6Hkza differ |
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv6422 Modified Files: AnyEdit.cpp AnyEdit.h AnyEdit.rc AnyEditView.cpp AnyEditView.h MainFrm.cpp MainFrm.h WorkspaceBar.cpp WorkspaceBar.h Log Message: Merged bug fixes sent by Mario Index: AnyEdit.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** AnyEdit.cpp 23 Jul 2003 09:41:34 -0000 1.28 --- AnyEdit.cpp 11 Aug 2003 04:03:19 -0000 1.29 *************** *** 111,116 **** --- 111,118 ---- //Dump handler deepwashere uncomment later! + #ifndef DEBUG if(!CDumpHandleApp::InitInstance()) return FALSE; + #endif AfxEnableControlContainer(); *************** *** 558,563 **** } ! CAnyEditView *pView = (CAnyEditView *) pChild->GetActiveView(); ! pView->SetSelectedLine(i); //deepwashere } --- 560,570 ---- } ! CView * view = pChild->GetActiveView(); ! ! if(view->IsKindOf(RUNTIME_CLASS(CAnyEditView))) ! { ! CAnyEditView *pView = (CAnyEditView *) view; ! pView->SetSelectedLine(i); //deepwashere ! } } *************** *** 1464,1465 **** --- 1471,1477 ---- } + + void CAnyEditApp::ClearClassView() + { + ((CMainFrame*)m_pMainWnd)->ClearClassView(); + } Index: AnyEdit.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** AnyEdit.h 23 Jul 2003 09:41:34 -0000 1.24 --- AnyEdit.h 11 Aug 2003 04:03:19 -0000 1.25 *************** *** 141,144 **** --- 141,145 ---- public: + void ClearClassView(); CComboBox * findbox; CComboBox * funcbox; Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** AnyEdit.rc 31 Jul 2003 08:57:48 -0000 1.25 --- AnyEdit.rc 11 Aug 2003 04:03:19 -0000 1.26 *************** *** 1661,1666 **** COMBOBOX IDC_COMBO3,66,23,114,46,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_COMBO2,66,39,114,46,CBS_DROPDOWN | CBS_SORT | ! WS_VSCROLL | WS_TABSTOP PUSHBUTTON "",IDC_BUTTON1,181,7,12,12 CONTROL "&Match whole word only",IDC_CHECK1,"Button", --- 1661,1666 ---- COMBOBOX IDC_COMBO3,66,23,114,46,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_COMBO2,66,39,114,46,CBS_DROPDOWN | CBS_AUTOHSCROLL | ! CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "",IDC_BUTTON1,181,7,12,12 CONTROL "&Match whole word only",IDC_CHECK1,"Button", Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** AnyEditView.cpp 17 Jul 2003 11:32:15 -0000 1.30 --- AnyEditView.cpp 11 Aug 2003 04:03:19 -0000 1.31 *************** *** 107,110 **** --- 107,111 ---- ON_COMMAND(ID_CONFIGURE_CURRENTDOCUMENT_FOLDMARGIN, OnConfigureCurrentdocumentFoldmargin) ON_UPDATE_COMMAND_UI(ID_CONFIGURE_CURRENTDOCUMENT_FOLDMARGIN, OnUpdateConfigureCurrentdocumentFoldmargin) + ON_WM_DESTROY() //}}AFX_MSG_MAP ON_WM_CONTEXTMENU() *************** *** 1986,1987 **** --- 1987,2010 ---- } + + void CAnyEditView::OnDestroy() + { + CView::OnDestroy(); + CDocument* pDoc=GetDocument(); + if ( (pDoc!=NULL) && (pDoc->IsKindOf(RUNTIME_CLASS(CAnyEditDoc))) ) + { + int rev = CurDocPath.ReverseFind('\\'); + if(rev==-1) + return; + CString docpath = theApp.GetAppPath();//CurDocPath.Left(rev); + docpath += "temp\\"; + CString filnam ;//= "temp\\"; + filnam+= CurDocPath.Right(CurDocPath.GetLength()-rev-1); + BOOL parseForProject=true; + if (!theApp.IsFileInCurrentProject(CurDocPath)) + { + theApp.ClearClassView(); + } + + }; + } Index: AnyEditView.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** AnyEditView.h 9 Jul 2003 07:17:55 -0000 1.16 --- AnyEditView.h 11 Aug 2003 04:03:19 -0000 1.17 *************** *** 170,173 **** --- 170,174 ---- afx_msg void OnConfigureCurrentdocumentFoldmargin(); afx_msg void OnUpdateConfigureCurrentdocumentFoldmargin(CCmdUI* pCmdUI); + afx_msg void OnDestroy(); //}}AFX_MSG afx_msg void OnEditFind(); Index: MainFrm.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MainFrm.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** MainFrm.cpp 31 Jul 2003 08:57:48 -0000 1.26 --- MainFrm.cpp 11 Aug 2003 04:03:19 -0000 1.27 *************** *** 1534,1535 **** --- 1534,1540 ---- } + + void CMainFrame::ClearClassView() + { + m_wndWorkSpace.ClearClassView(); + } Index: MainFrm.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MainFrm.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** MainFrm.h 23 Jul 2003 09:41:34 -0000 1.19 --- MainFrm.h 11 Aug 2003 04:03:19 -0000 1.20 *************** *** 61,64 **** --- 61,65 ---- // Implementation public: + void ClearClassView(); CTagList * GetCurrentTagList(); void GetTagsNearest(LPCSTR word, CStringArray &arr); Index: WorkspaceBar.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/WorkspaceBar.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** WorkspaceBar.cpp 8 May 2003 12:00:56 -0000 1.20 --- WorkspaceBar.cpp 11 Aug 2003 04:03:19 -0000 1.21 *************** *** 509,510 **** --- 509,523 ---- m_wndClassView.UnlockTagList(); } + + void CWorkspaceBar::ClearClassView() + { + if(LockTagList()) + { + m_sharedTagList.ClearAllContents(); + m_wndClassView.FillTagList(&m_sharedTagList); + UnlockTagList(); + } + //clean up of temporary files + for(int i=0;i<m_ParserTemporaryFile.GetSize();i++) + remove(m_ParserTemporaryFile.GetAt(i)); + } Index: WorkspaceBar.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/WorkspaceBar.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** WorkspaceBar.h 8 May 2003 12:00:56 -0000 1.16 --- WorkspaceBar.h 11 Aug 2003 04:03:19 -0000 1.17 *************** *** 81,84 **** --- 81,85 ---- // Implementation public: + void ClearClassView(); CTagList * GetCurrentTagList(); void GetTagsNearest(LPCSTR word,CStringArray &arr); |
From: <td...@us...> - 2003-08-07 06:48:12
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv8047 Modified Files: FindDialog.cpp Log Message: Find automatically selects the text to find when dialog initialiizes Index: FindDialog.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FindDialog.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FindDialog.cpp 3 Jul 2003 12:58:39 -0000 1.8 --- FindDialog.cpp 7 Aug 2003 06:48:09 -0000 1.9 *************** *** 145,150 **** comboStr = m_reg.GetProfileString(SEC_GREP,_T("LastFind"),tempStr,""); m_findcombo.SetWindowText(comboStr); ! m_findcombo.SetFocus(); ! m_check1.SetCheck(m_reg.GetProfileInt(SEC_GREP,_T("FCheck1"),0 )); m_check2.SetCheck(m_reg.GetProfileInt(SEC_GREP,_T("FCheck2"),0 )); --- 145,149 ---- comboStr = m_reg.GetProfileString(SEC_GREP,_T("LastFind"),tempStr,""); m_findcombo.SetWindowText(comboStr); ! m_check1.SetCheck(m_reg.GetProfileInt(SEC_GREP,_T("FCheck1"),0 )); m_check2.SetCheck(m_reg.GetProfileInt(SEC_GREP,_T("FCheck2"),0 )); *************** *** 157,160 **** --- 156,169 ---- m_findcombo.SetWindowText(inifind); } + + DWORD dwSel; + + // Set the selection to be all characters after the current selection. + if ((dwSel=m_findcombo.GetEditSel()) != CB_ERR) + { + m_findcombo.SetEditSel(HIWORD(dwSel), -1); + } + m_findcombo.SetFocus(); + return FALSE; // return TRUE unless you set the focus to a control |
From: <td...@us...> - 2003-07-31 12:25:35
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv3537 Modified Files: MDITabs.cpp MDITabs.h OutputBar.cpp OutputBar.h Log Message: Fixed Office XP look issues.. Index: MDITabs.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MDITabs.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MDITabs.cpp 29 Jul 2003 08:06:33 -0000 1.9 --- MDITabs.cpp 31 Jul 2003 12:25:32 -0000 1.10 *************** *** 1,27 **** - /********************************************************************* - Copyright (C) 2002 DeepSoft - M.Deepak - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. - - http://www.anyedit.org - M.Deepak - de...@an... - **********************************************************************/ - /****************************************************************************\ Datei : MDITabs.h --- 1,2 ---- *************** *** 62,65 **** --- 37,65 ---- m_MenuTab = 0; m_bPreview = FALSE; + + COLORREF clrBtnFace = ::GetSysColor(COLOR_BTNFACE); + BYTE nRed = 0, nGreen = 0, nBlue = 0, nMax = 0; + + nRed = GetRValue(clrBtnFace); + nGreen = GetGValue(clrBtnFace); + nBlue = GetBValue(clrBtnFace); + + nMax = (nRed > nGreen) ? ((nRed > nBlue) ? nRed : nBlue) : ((nGreen > nBlue) ? nGreen : nBlue); + const BYTE nMagicBackgroundOffset = (nMax > (0xFF - 35)) ? (BYTE)(0xFF - nMax) : (BYTE)35; + if(nMax == 0) + { + nRed = (BYTE)(nRed + nMagicBackgroundOffset); + nGreen = (BYTE)(nGreen + nMagicBackgroundOffset); + nBlue = (BYTE)(nBlue + nMagicBackgroundOffset); + } + else + { + nRed = (BYTE)(nRed + (nMagicBackgroundOffset*(nRed/(double)nMax) + 0.5)); + nGreen = (BYTE)(nGreen + (nMagicBackgroundOffset*(nGreen/(double)nMax) + 0.5)); + nBlue = (BYTE)(nBlue + (nMagicBackgroundOffset*(nBlue/(double)nMax) + 0.5)); + } + + m_clrBackground = RGB(nRed, nGreen, nBlue); + m_hbrBackground.CreateSolidBrush(m_clrBackground); } *************** *** 71,75 **** ON_WM_CONTEXTMENU() ON_WM_LBUTTONDBLCLK() ! //}}AFX_MSG_MAP ON_MESSAGE(WM_SIZEPARENT, OnSizeParent) END_MESSAGE_MAP() --- 71,75 ---- ON_WM_CONTEXTMENU() ON_WM_LBUTTONDBLCLK() ! //}}AFX_MSG_MAP ON_MESSAGE(WM_SIZEPARENT, OnSizeParent) END_MESSAGE_MAP() *************** *** 98,103 **** if (m_bTop) { ! pParams->rect.top += height; ! MoveWindow(pParams->rect.left, pParams->rect.top - height, m_width, m_height, true); } else --- 98,103 ---- if (m_bTop) { ! pParams->rect.top += height+1; ! MoveWindow(pParams->rect.left, pParams->rect.top - height-1, m_width, m_height, true); } else *************** *** 122,125 **** --- 122,126 ---- void CMDITabs::Update() { + SetRedraw(false); *************** *** 162,170 **** str.ReleaseBuffer(); //Stan - 2003-01-20 - otherwise a memory leak will happen // IAN : Add overlays as in WndTabs ! ! if (m_bImages) { if (i<9) { HIMAGELIST hilmTemp = ImageList_Merge(m_images, i, m_NumberOverlays, i, 0, 0); --- 163,171 ---- str.ReleaseBuffer(); //Stan - 2003-01-20 - otherwise a memory leak will happen // IAN : Add overlays as in WndTabs ! /*if (m_bImages) { if (i<9) { + HICON hIconOverlay = m_NumberOverlays.ExtractIcon(i); HIMAGELIST hilmTemp = ImageList_Merge(m_images, i, m_NumberOverlays, i, 0, 0); *************** *** 176,180 **** else m_images.Replace(i, (HICON)::GetClassLong(*it, GCL_HICONSM)); ! } SetItem(i, &item); if (*it == active) --- 177,181 ---- else m_images.Replace(i, (HICON)::GetClassLong(*it, GCL_HICONSM)); ! }*/ SetItem(i, &item); if (*it == active) *************** *** 191,196 **** item.mask = TCIF_TEXT|TCIF_PARAM|TCIF_IMAGE; ::GetWindowText(*it, text, 256); ! if (m_bImages) ! m_images.Add((HICON)::GetClassLong(*it, GCL_HICONSM)); item.iImage = i; item.lParam = LPARAM(*it); --- 192,197 ---- item.mask = TCIF_TEXT|TCIF_PARAM|TCIF_IMAGE; ::GetWindowText(*it, text, 256); ! //if (m_bImages) ! // m_images.Add((HICON)::GetClassLong(*it, GCL_HICONSM)); item.iImage = i; item.lParam = LPARAM(*it); *************** *** 225,310 **** DWORD light = ::GetSysColor(COLOR_3DLIGHT); ! // Special preparations for spin-buttons (in case there are more tabs than fit into the window) ! // extend borders and prevent system from overdrawing our new pixels ! /*if (m_bTop) { ! ::SetPixel(dc, m_width - 5, m_height - 8, hilight); ! ::SetPixel(dc, m_width - 5, m_height - 7, light); ! ::SetPixel(dc, m_width - 6, m_height - 8, hilight); ! ::SetPixel(dc, m_width - 6, m_height - 7, light); ! ::ExcludeClipRect(dc, 0, m_height - 6, m_width, m_height - 2); ! ::ExcludeClipRect(dc, m_width - 6, m_height - 8, m_width - 2, m_height - 6); ! } else { ! ::SetPixel(dc, m_width - 5, 2, shadow); ! ::SetPixel(dc, m_width - 5, 3, dark); ! ::SetPixel(dc, m_width - 6, 2, shadow); ! ::SetPixel(dc, m_width - 6, 3, dark); ! ::ExcludeClipRect(dc, 0, 0, m_width, 2); ! ::ExcludeClipRect(dc, m_width - 6, 2, m_width - 2, 4); ! }*/ ! // windows should draw the control as usual ! _AFX_THREAD_STATE* pThreadState = AfxGetThreadState(); ! pThreadState->m_lastSentMsg.wParam = WPARAM(HDC(dc)); ! Default(); ! // extend the horizontal border to the left margin ! if (m_bTop) ! { ! ::SetPixel(dc, 0, m_height - 8, hilight); ! ::SetPixel(dc, 0, m_height - 7, light); ! } ! else ! { ! ::SetPixel(dc, 0, 2, shadow); ! } ! //special decos for bottom tabs ! if(!m_bTop) ! { ! HDC hdc = ::GetWindowDC(m_hWnd); ! CRect rectt; ! rectt.left = 1; ! rectt.top = m_bTop ? 2 : -2; ! rectt.right = m_width; ! rectt.bottom = rectt.top+4; ! DrawEdge(hdc, rectt, EDGE_ETCHED,BF_BOTTOM); ! rectt.bottom = rectt.top+5; ! DrawEdge(hdc, rectt, EDGE_SUNKEN ,BF_BOTTOM); ! } ! // special drawing if the leftmost tab is selected ! CRect rect; ! GetItemRect(GetCurSel(), rect); ! if (rect.left == 2) // is at the leftmost position a tab selected? ! { ! // if yes, remove the leftmost white line and extend the bottom border of the tab ! int j = m_bImages ? 1 : 0; ! HPEN pen = ::CreatePen(PS_SOLID, 1, ::GetSysColor(COLOR_3DFACE)); ! HGDIOBJ old = ::SelectObject(dc, pen); ! ::MoveToEx(dc, 0, 2, NULL); ! ::LineTo(dc, 0, 22 + j); ! ::MoveToEx(dc, 1, 2, NULL); ! ::LineTo(dc, 1, 22 + j); ! ::SelectObject(dc, old); ! ::DeleteObject(pen); ! if (m_bTop) ! { ! ::SetPixel(dc, 0, 0, hilight); ! ::SetPixel(dc, 1, 0, hilight); ! ::SetPixel(dc, 0, 1, light); ! ::SetPixel(dc, 1, 1, light); ! } ! else ! { ! ::SetPixel(dc, 0, 22 + j, shadow); ! ::SetPixel(dc, 1, 22 + j, shadow); ! ::SetPixel(dc, 0, 23 + j, dark); ! ::SetPixel(dc, 1, 23 + j, dark); ! } ! } - dc.DeleteDC(); } --- 226,297 ---- DWORD light = ::GetSysColor(COLOR_3DLIGHT); ! ! ! CRect rectCli; ! GetClientRect(&rectCli); ! CBrush btnbrush(::GetSysColor(COLOR_BTNFACE)); ! dc.FillRect(rectCli,&m_hbrBackground); ! CRect rect; ! GetItemRect(GetCurSel(), rect); ! rect.bottom+=2; ! dc.FillRect(rect,&btnbrush); ! rectCli.top = rectCli.bottom - 3; ! dc.FillRect(rectCli,&btnbrush); ! ! CPen penLight (PS_SOLID, 1, ::GetSysColor (COLOR_3DHILIGHT)); ! CPen penDkGray (PS_SOLID, 1, ::GetSysColor (COLOR_3DDKSHADOW)); ! CPen penGray (PS_SOLID, 1, ::GetSysColor (COLOR_3DSHADOW)); ! ! CPen* pOldPen = NULL; ! pOldPen = (CPen*) dc.SelectObject (&penLight); ! dc.MoveTo(rect.left,rect.bottom-1); ! dc.LineTo(rect.left,rect.top); ! dc.LineTo(rect.right,rect.top); ! ! dc.MoveTo(rectCli.left,rectCli.top); ! dc.LineTo(rect.left,rect.bottom-1); ! dc.MoveTo(rect.right,rect.bottom-1); ! dc.LineTo(rectCli.right,rectCli.top); ! dc.SelectObject (&penDkGray); ! dc.MoveTo(rect.right,rect.top); ! dc.LineTo(rect.right,rect.bottom); ! dc.SelectObject (&penGray); ! TCITEM tcItem; ! tcItem.mask = TCIF_TEXT; ! ! DRAWITEMSTRUCT drawItemStruct; ! ! for(int i=0;i<GetItemCount();i++) ! { ! ! ! drawItemStruct.hDC=dc.GetSafeHdc(); ! drawItemStruct.itemID=i; ! ! GetItemRect(i,rect); ! drawItemStruct.rcItem=rect; ! dc.SetBkColor(::GetSysColor(COLOR_BTNFACE)); ! ! if(i!=GetCurSel()) ! { ! if(i!=(GetCurSel()-1)) ! { ! dc.MoveTo(rect.right,rect.top+3); ! dc.LineTo(rect.right,rect.bottom-1); ! } ! dc.SetBkColor(m_clrBackground); ! } ! ! DrawItem(&drawItemStruct); ! } ! dc.SetBkColor(::GetSysColor(COLOR_BTNFACE)); ! dc.SelectObject (pOldPen); } *************** *** 427,430 **** --- 414,473 ---- ::ShowWindow(hWnd, SW_MAXIMIZE); } + } + + void CMDITabs::DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct ) + { + + CDC dc; + dc.Attach(lpDrawItemStruct->hDC); + + char buf[255]; + int nCurItem = lpDrawItemStruct->itemID; + + CFont * oldFont; + + if(nCurItem==GetCurSel()) + { + oldFont=(CFont *)dc.SelectObject(m_fontbold); + } + else + { + oldFont=(CFont *)dc.SelectObject(m_font); + } + + TCITEM tcitem; + //Get text of item. + tcitem.mask=TCIF_TEXT; + tcitem.pszText =buf; + tcitem.cchTextMax=sizeof(buf); + GetItem(nCurItem,&tcitem); + + CRect rect=lpDrawItemStruct->rcItem; + rect.OffsetRect(1,4); + + ::DrawText(lpDrawItemStruct->hDC,buf,-1,&rect,DT_CENTER); + dc.Detach(); + } + + + void CMDITabs::PreSubclassWindow() + { + CTabCtrl::PreSubclassWindow(); + + NONCLIENTMETRICS nclim; + nclim.cbSize=sizeof(NONCLIENTMETRICS); + ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, + sizeof(NONCLIENTMETRICS), + &nclim,0); + m_hMenuFont= ::CreateFontIndirect(&nclim.lfMenuFont); + + NONCLIENTMETRICS metrics; + metrics.cbSize = sizeof(metrics); + ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, 0); + + m_font.CreateFontIndirect(&metrics.lfStatusFont); + metrics.lfStatusFont.lfWeight = FW_BOLD; + m_fontbold.CreateFontIndirect(&metrics.lfStatusFont); + } Index: MDITabs.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MDITabs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MDITabs.h 8 May 2003 12:00:56 -0000 1.3 --- MDITabs.h 31 Jul 2003 12:25:32 -0000 1.4 *************** *** 34,37 **** --- 34,38 ---- }; + /****************************************************************************\ CMdiTabs: Deklaration *************** *** 58,62 **** BOOL m_bImages; BOOL m_bTop; ! BOOL m_bPreview; CImageList m_NumberOverlays; --- 59,67 ---- BOOL m_bImages; BOOL m_bTop; ! BOOL m_bPreview; ! CFont m_font,m_fontbold; ! HFONT m_hMenuFont; ! CBrush m_hbrBackground; ! COLORREF m_clrBackground; CImageList m_NumberOverlays; *************** *** 72,80 **** m_bPreview = bPreview; }; // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMDITabs) ! //}}AFX_VIRTUAL // Implementation --- 77,89 ---- m_bPreview = bPreview; }; + protected: + virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMDITabs) ! protected: ! virtual void PreSubclassWindow(); ! //}}AFX_VIRTUAL // Implementation *************** *** 89,93 **** afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); ! //}}AFX_MSG afx_msg LRESULT OnSizeParent(WPARAM, LPARAM lParam); --- 98,102 ---- afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); ! //}}AFX_MSG afx_msg LRESULT OnSizeParent(WPARAM, LPARAM lParam); Index: OutputBar.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/OutputBar.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** OutputBar.cpp 31 Jul 2003 08:57:48 -0000 1.10 --- OutputBar.cpp 31 Jul 2003 12:25:32 -0000 1.11 *************** *** 89,93 **** // Create tabs window: if (!m_wndTabs.Create (CBCGTabWnd::STYLE_3D, ! rectClient, this, 101)) { TRACE0("Failed to create output tab window\n"); --- 89,93 ---- // Create tabs window: if (!m_wndTabs.Create (CBCGTabWnd::STYLE_3D, ! rectClient, this, 102)) { TRACE0("Failed to create output tab window\n"); *************** *** 99,103 **** // Create output panes: ! const DWORD dwStyle = LBS_USETABSTOPS|LBS_HASSTRINGS|LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; m_wndOutputBuild.Create (dwStyle, rectClient, &m_wndTabs, 1); --- 99,103 ---- // Create output panes: ! const DWORD dwStyle = WS_HSCROLL|LBS_USETABSTOPS|LBS_HASSTRINGS|LBS_NOINTEGRALHEIGHT|WS_CHILD|WS_VISIBLE|WS_VSCROLL; m_wndOutputBuild.Create (dwStyle, rectClient, &m_wndTabs, 1); *************** *** 121,124 **** --- 121,129 ---- m_wndOutputFind2.SetOwner (this); + m_wndEdit.Create (WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_AUTOHSCROLL|ES_AUTOVSCROLL|WS_VSCROLL|WS_HSCROLL|ES_WANTRETURN, rectClient, &m_wndTabs, 5); + m_wndEdit.SetFont (&m_Font); + m_wndEdit.SetTabStops(4); + m_wndEdit.SetOwner (this); + // Fill view context (dummy code, don't seek here something magic :-)): FillBuildWindow (); *************** *** 130,133 **** --- 135,139 ---- m_wndTabs.AddTab (&m_wndOutputFind1, _T("Find in Files 1"), 2); m_wndTabs.AddTab (&m_wndOutputFind2, _T("Find in Files 2"), 3); + m_wndTabs.AddTab (&m_wndEdit, _T("Edit"), 3); return 0; *************** *** 215,222 **** { CListBox::OnWindowPosChanging(lpwndpos); - - // Hide horizontal scrollbar: - ShowScrollBar (SB_HORZ, FALSE); - ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME); } --- 221,224 ---- Index: OutputBar.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/OutputBar.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** OutputBar.h 8 May 2003 12:00:56 -0000 1.5 --- OutputBar.h 31 Jul 2003 12:25:32 -0000 1.6 *************** *** 130,133 **** --- 130,134 ---- COutputList m_wndOutputFind1; COutputList m_wndOutputFind2; + CEdit m_wndEdit; |
From: <td...@us...> - 2003-07-31 09:52:21
|
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1:/tmp/cvs-serv9866 Modified Files: AnyEdit.exe BCGCB473.dll Log Message: Fixed Office XP look issues.. Index: AnyEdit.exe =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/AnyEdit.exe,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsYwpd1o and /tmp/cvs0GIXUJ differ Index: BCGCB473.dll =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/BCGCB473.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs2NPdFy and /tmp/cvsKWFdQ0 differ |
From: <td...@us...> - 2003-07-31 09:52:21
|
Update of /cvsroot/anyedit/AnyEditBin/Plugins In directory sc8-pr-cvs1:/tmp/cvs-serv9866/Plugins Added Files: Diff.dll Log Message: Fixed Office XP look issues.. --- NEW FILE: Diff.dll --- (This appears to be a binary file; contents omitted.) |
From: <td...@us...> - 2003-07-31 08:57:57
|
Update of /cvsroot/anyedit/AnyEditv2/res In directory sc8-pr-cvs1:/tmp/cvs-serv1327/res Added Files: bmp00022.bmp Log Message: Fixed Office XP look issues.. --- NEW FILE: bmp00022.bmp --- (This appears to be a binary file; contents omitted.) |
From: <td...@us...> - 2003-07-31 08:57:57
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv1327 Modified Files: AnyEdit.dsp AnyEdit.rc ClassView.cpp MainFrm.cpp OutputBar.cpp resource.h Log Message: Fixed Office XP look issues.. Index: AnyEdit.dsp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.dsp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** AnyEdit.dsp 23 Jul 2003 09:41:34 -0000 1.19 --- AnyEdit.dsp 31 Jul 2003 08:57:48 -0000 1.20 *************** *** 396,399 **** --- 396,415 ---- # Begin Source File + SOURCE=.\LBSpinButtonCtrl.cpp + # End Source File + # Begin Source File + + SOURCE=.\LBSpinButtonCtrl.h + # End Source File + # Begin Source File + + SOURCE=.\LBTabCtrl.cpp + # End Source File + # Begin Source File + + SOURCE=.\LBTabCtrl.h + # End Source File + # Begin Source File + SOURCE=.\Plugin.cpp # End Source File *************** *** 1257,1260 **** --- 1273,1280 ---- SOURCE=.\res\bmp00021.bmp + # End Source File + # Begin Source File + + SOURCE=.\res\bmp00022.bmp # End Source File # Begin Source File Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** AnyEdit.rc 23 Jul 2003 09:41:34 -0000 1.24 --- AnyEdit.rc 31 Jul 2003 08:57:48 -0000 1.25 *************** *** 913,916 **** --- 913,932 ---- END + IDR_MENU1 MENU DISCARDABLE + BEGIN + POPUP "File" + BEGIN + MENUITEM "Ohohohoh", ID_FILE_OHOHOHOH + END + POPUP "Tools" + BEGIN + MENUITEM "dingdong", ID_TOOLS_DINGDONG + END + POPUP "newguy" + BEGIN + MENUITEM "wlkjljlj", ID_NEWGUY_WLKJLJLJ + END + END + #ifdef APSTUDIO_INVOKED *************** *** 1000,1003 **** --- 1016,1020 ---- IDR_FULLSCREEN BITMAP DISCARDABLE "res\\bmp00020.bmp" IDR_VIEW BITMAP DISCARDABLE "res\\bmp00021.bmp" + IDB_OUTBAR BITMAP DISCARDABLE "res\\bmp00022.bmp" ///////////////////////////////////////////////////////////////////////////// Index: ClassView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ClassView.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ClassView.cpp 8 May 2003 12:00:56 -0000 1.16 --- ClassView.cpp 31 Jul 2003 08:57:48 -0000 1.17 *************** *** 52,55 **** --- 52,56 ---- // to avoid memory leaks when closing the AnyEdit app, CTagEntry classes (that are pointed to by GetItemData // are deleted on WM_DESTROY (OnDestoy function); + if(m_SingleLock) delete m_SingleLock; } Index: MainFrm.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MainFrm.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** MainFrm.cpp 23 Jul 2003 09:41:34 -0000 1.25 --- MainFrm.cpp 31 Jul 2003 08:57:48 -0000 1.26 *************** *** 213,217 **** ! if (!m_wndFullScreen.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndFullScreen.LoadToolBar(IDR_FULLSCREEN)) --- 213,217 ---- ! if (!m_wndFullScreen.CreateEx(this, TBSTYLE_TRANSPARENT|TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndFullScreen.LoadToolBar(IDR_FULLSCREEN)) *************** *** 221,225 **** } ! if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) --- 221,225 ---- } ! if (!m_wndToolBar.CreateEx(this, TBSTYLE_TRANSPARENT|TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) *************** *** 229,233 **** } ! if (!m_wndToolbarFormat.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolbarFormat.LoadToolBar(IDR_FORMAT)) --- 229,233 ---- } ! if (!m_wndToolbarFormat.CreateEx(this, TBSTYLE_TRANSPARENT|TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolbarFormat.LoadToolBar(IDR_FORMAT)) Index: OutputBar.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/OutputBar.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OutputBar.cpp 17 Jul 2003 11:32:15 -0000 1.9 --- OutputBar.cpp 31 Jul 2003 08:57:48 -0000 1.10 *************** *** 88,92 **** // Create tabs window: ! if (!m_wndTabs.Create (CBCGTabWnd::STYLE_FLAT_SHARED_HORZ_SCROLL, rectClient, this, 101)) { --- 88,92 ---- // Create tabs window: ! if (!m_wndTabs.Create (CBCGTabWnd::STYLE_3D, rectClient, this, 101)) { *************** *** 95,98 **** --- 95,100 ---- } + m_wndTabs.SetImageList (IDB_OUTBAR, 16, RGB (255, 0, 0)); + // Create output panes: *************** *** 124,131 **** // Attach views to tab: ! m_wndTabs.AddTab (&m_wndOutputBuild, _T("Build"), -1); ! m_wndTabs.AddTab (&m_wndOutputOutput, _T("Output"), -1); ! m_wndTabs.AddTab (&m_wndOutputFind1, _T("Find in Files 1"), -1); ! m_wndTabs.AddTab (&m_wndOutputFind2, _T("Find in Files 2"), -1); return 0; --- 126,133 ---- // Attach views to tab: ! m_wndTabs.AddTab (&m_wndOutputBuild, _T("Build"), 0); ! m_wndTabs.AddTab (&m_wndOutputOutput, _T("Output"), 1); ! m_wndTabs.AddTab (&m_wndOutputFind1, _T("Find in Files 1"), 2); ! m_wndTabs.AddTab (&m_wndOutputFind2, _T("Find in Files 2"), 3); return 0; Index: resource.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/resource.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** resource.h 23 Jul 2003 09:41:34 -0000 1.16 --- resource.h 31 Jul 2003 08:57:48 -0000 1.17 *************** *** 103,107 **** --- 103,109 ---- #define IDR_POPUP_PLUGINS 249 #define IDI_ICON1 250 + #define IDR_MENU1 250 #define IDD_DIALOG2 251 + #define IDB_OUTBAR 251 #define IDR_VIEW 252 #define IDD_WIN2K_FILEDIALOG 446 *************** *** 423,426 **** --- 425,456 ---- #define ID_CONFIGURE_CURRENTDOCUMENT_BOOKMARKMARGIN 33041 #define ID_CONFIGURE_CURRENTDOCUMENT_FOLDMARGIN 33044 + #define ID_PLUGINS_PLUGIN1 33045 + #define ID_PLUGINS_PLUGIN2 33046 + #define ID_PLUGINS_PLUGIN3 33047 + #define ID_PLUGINS_PLUGIN4 33048 + #define ID_PLUGINS_PLUGIN5 33049 + #define ID_PLUGINS_PLUGIN6 33050 + #define ID_PLUGINS_PLUGIN7 33051 + #define ID_PLUGINS_PLUGIN8 33052 + #define ID_PLUGINS_PLUGIN9 33053 + #define ID_PLUGINS_PLUGIN10 33054 + #define ID_PLUGINS_PLUGIN11 33055 + #define ID_PLUGINS_PLUGIN12 33056 + #define ID_PLUGINS_PLUGIN13 33057 + #define ID_PLUGINS_PLUGIN14 33058 + #define ID_PLUGINS_PLUGIN15 33059 + #define ID_PLUGINS_PLUGIN16 33060 + #define ID_PLUGINS_PLUGIN17 33061 + #define ID_PLUGINS_PLUGIN18 33062 + #define ID_PLUGINS_PLUGIN19 33063 + #define ID_PLUGINS_PLUGIN20 33064 + #define ID_PLUGINS_PLUGIN21 33065 + #define ID_PLUGINS_PLUGIN22 33066 + #define ID_PLUGINS_PLUGIN23 33067 + #define ID_PLUGINS_PLUGIN24 33068 + #define ID_PLUGINS_PLUGIN25 33069 + #define ID_FILE_OHOHOHOH 33070 + #define ID_TOOLS_DINGDONG 33071 + #define ID_NEWGUY_WLKJLJLJ 33072 #define ID_OUTPUT_CLEAR 57632 #define ID_OUTPUT_COPY 57634 *************** *** 437,442 **** #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 ! #define _APS_NEXT_RESOURCE_VALUE 250 ! #define _APS_NEXT_COMMAND_VALUE 33070 #define _APS_NEXT_CONTROL_VALUE 1088 #define _APS_NEXT_SYMED_VALUE 105 --- 467,472 ---- #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 ! #define _APS_NEXT_RESOURCE_VALUE 252 ! #define _APS_NEXT_COMMAND_VALUE 33073 #define _APS_NEXT_CONTROL_VALUE 1088 #define _APS_NEXT_SYMED_VALUE 105 |
From: <td...@us...> - 2003-07-29 08:06:35
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv12266 Modified Files: MDITabs.cpp Log Message: Fixed GDI leak when drawing images Index: MDITabs.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MDITabs.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MDITabs.cpp 8 May 2003 12:00:56 -0000 1.8 --- MDITabs.cpp 29 Jul 2003 08:06:33 -0000 1.9 *************** *** 162,170 **** str.ReleaseBuffer(); //Stan - 2003-01-20 - otherwise a memory leak will happen // IAN : Add overlays as in WndTabs ! if (m_bImages) { if (i<9) { - HICON hIconOverlay = m_NumberOverlays.ExtractIcon(i); HIMAGELIST hilmTemp = ImageList_Merge(m_images, i, m_NumberOverlays, i, 0, 0); --- 162,170 ---- str.ReleaseBuffer(); //Stan - 2003-01-20 - otherwise a memory leak will happen // IAN : Add overlays as in WndTabs ! ! if (m_bImages) { if (i<9) { HIMAGELIST hilmTemp = ImageList_Merge(m_images, i, m_NumberOverlays, i, 0, 0); *************** *** 305,308 **** --- 305,310 ---- } } + + dc.DeleteDC(); } |
From: <td...@us...> - 2003-07-23 09:46:59
|
Update of /cvsroot/anyedit/AnyEditBin/Plugins In directory sc8-pr-cvs1:/tmp/cvs-serv28461/Plugins Log Message: Directory /cvsroot/anyedit/AnyEditBin/Plugins added to the repository |
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv27703 Modified Files: AnyEdit.cpp AnyEdit.dsp AnyEdit.h AnyEdit.rc MainFrm.cpp MainFrm.h Plugin.cpp Plugin.h resource.h Added Files: AEPlugin.cpp AEPlugin.h Log Message: Added plugin support. Plugins can expose there own menus and accelerators --- NEW FILE: AEPlugin.cpp --- #include "stdafx.h" #include "AnyEdit.h" #include "AEPlugin.h" typedef int (*PLUGIN_INIT)(CPlugin *); typedef int (*PLUGIN_MENU)(CPlugin *,UINT id); void AEPlugin::InitPlugin(CPlugin * plugin) { PLUGIN_INIT pluginit; if(hinst) { pluginit = (PLUGIN_INIT) GetProcAddress(hinst,"plugin_init"); if(pluginit) pluginit(plugin); } if(nextPlugin) { nextPlugin->InitPlugin(plugin); } } void AEPlugin::ProcessEvent(CPlugin * plugin,int event_id) { } void AEPlugin::ProcessMenuClick(CPlugin * plugin,UINT uid) { PLUGIN_MENU pluginit; if(hinst) { pluginit = (PLUGIN_MENU) GetProcAddress(hinst,"OnMenuClick"); if(pluginit) pluginit(plugin,uid); } if(nextPlugin) { nextPlugin->ProcessMenuClick(plugin,uid); } } void AEPlugin::ExitPlugin(CPlugin * plugin) { if(nextPlugin) { nextPlugin->ExitPlugin(plugin); delete nextPlugin; } PLUGIN_INIT pluginit; if(hinst) { pluginit = (PLUGIN_INIT) GetProcAddress(hinst,"plugin_exit"); if(pluginit) pluginit(plugin); } } --- NEW FILE: AEPlugin.h --- #ifndef AEPLUGIN_H #define AEPLUGIN_H #include "Plugin.h" class AEPlugin { public: HINSTANCE hinst; // The loaded instance from the library AEPlugin * nextPlugin; // The next plugin in the chain of plugins CString m_pluginName; // Get this name from the plugin itself public: AEPlugin() { nextPlugin=NULL; } void InitPlugin(CPlugin * plugin); void ProcessEvent(CPlugin * plugin,int event_id); void ProcessMenuClick(CPlugin * plugin,UINT uid); void ExitPlugin(CPlugin * plugin); }; #endif Index: AnyEdit.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** AnyEdit.cpp 17 Jul 2003 11:32:15 -0000 1.27 --- AnyEdit.cpp 23 Jul 2003 09:41:34 -0000 1.28 *************** *** 51,55 **** #endif - ///////////////////////////////////////////////////////////////////////////// // CAnyEditApp --- 51,54 ---- *************** *** 84,87 **** --- 83,87 ---- m_ClassViewParserThread=NULL; m_bLastParsedFileInCurrentProject=false; + pluginHead=NULL; } *************** *** 189,193 **** if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) return FALSE; ! EnableShellOpen(); m_pMainWnd = pMainFrame; --- 189,193 ---- if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) return FALSE; ! EnableShellOpen(); m_pMainWnd = pMainFrame; *************** *** 199,203 **** instanceChecker.TrackFirstInstanceRunning(); } ! // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; --- 199,203 ---- instanceChecker.TrackFirstInstanceRunning(); } ! LoadPlugins(); // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; *************** *** 217,221 **** LoadLanguageExtensions(); - // The main window has been initialized, so show and update it. pMainFrame->ShowWindow(m_nCmdShow); --- 217,220 ---- *************** *** 241,245 **** _CrtDumpMemoryLeaks(); ! return TRUE; } --- 240,244 ---- _CrtDumpMemoryLeaks(); ! return TRUE; } *************** *** 360,365 **** m_ContextMenuManager.AddMenu (_T("File View - File"),IDR_POPUP_FV_FILE); m_ContextMenuManager.AddMenu (_T("Clip View"),IDR_POPUP_CV); ! m_ContextMenuManager.LoadState (strMenuEntry ! ); } --- 359,363 ---- m_ContextMenuManager.AddMenu (_T("File View - File"),IDR_POPUP_FV_FILE); m_ContextMenuManager.AddMenu (_T("Clip View"),IDR_POPUP_CV); ! m_ContextMenuManager.LoadState (strMenuEntry); } *************** *** 376,381 **** += KEYBOARD_ENTRY; ! m_KeyboardManager.SaveState (strKbdEntry ! ); CString strMouseEntry --- 374,378 ---- += KEYBOARD_ENTRY; ! m_KeyboardManager.SaveState (strKbdEntry); CString strMouseEntry *************** *** 384,389 **** += MOUSE_ENTRY; ! m_MouseManager.SaveState (strMouseEntry ! ); CString strMenuEntry --- 381,385 ---- += MOUSE_ENTRY; ! m_MouseManager.SaveState (strMouseEntry); CString strMenuEntry *************** *** 392,397 **** += CONTEXT_MENU_ENTRY; ! m_ContextMenuManager.SaveState (strMenuEntry ! ); --- 388,392 ---- += CONTEXT_MENU_ENTRY; ! m_ContextMenuManager.SaveState (strMenuEntry); *************** *** 424,428 **** { // TODO: Add your specialized code here and/or call the base class ! //unreg codemax control HtmlHelp( NULL, --- 419,423 ---- { // TODO: Add your specialized code here and/or call the base class ! UnloadPlugins(); HtmlHelp( NULL, *************** *** 440,444 **** m_ClassViewParserThread=NULL; ! return CWinApp::ExitInstance(); } --- 435,439 ---- m_ClassViewParserThread=NULL; ! return CWinApp::ExitInstance(); } *************** *** 1428,1429 **** --- 1423,1465 ---- alphabetic = m_reg.GetProfileInt(_T("Preferences"),_T("EnableAlphabetic"),0); } + + void CAnyEditApp::LoadPlugins() + { + + CString app_path = theApp.GetAppPath(); + CStringArray plugins; + app_path+= _T("Plugins"); + msc.GetFilesInFolder(app_path,"*.dll",plugins); + CString plugin_path; + for(int i=0;i<plugins.GetSize();i++) + { + AEPlugin * temp_plug = new AEPlugin; + plugin_path = app_path + "\\"; + plugin_path += plugins.GetAt(i); + temp_plug->hinst = LoadLibrary(plugin_path); + temp_plug->m_pluginName = plugins.GetAt(i); + temp_plug->nextPlugin= pluginHead; + pluginHead = temp_plug; + } + + if(pluginHead) + { + pluginHead->InitPlugin(&plugin); + } + + } + + void CAnyEditApp::UnloadPlugins() + { + if(pluginHead) + { + pluginHead->ExitPlugin(&plugin); + delete pluginHead; + } + } + + void CAnyEditApp::PluginMenuClicked(UINT id) + { + pluginHead->ProcessMenuClick(&plugin,id); + } + Index: AnyEdit.dsp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.dsp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** AnyEdit.dsp 18 Jul 2003 19:05:36 -0000 1.18 --- AnyEdit.dsp 23 Jul 2003 09:41:34 -0000 1.19 *************** *** 344,347 **** --- 344,351 ---- # Begin Source File + SOURCE=.\AEPlugin.cpp + # End Source File + # Begin Source File + SOURCE=.\AutoComp.cpp # End Source File *************** *** 673,676 **** --- 677,684 ---- # PROP Default_Filter ".h" + # Begin Source File + + SOURCE=.\AEPlugin.h + # End Source File # Begin Source File Index: AnyEdit.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** AnyEdit.h 9 May 2003 08:53:56 -0000 1.23 --- AnyEdit.h 23 Jul 2003 09:41:34 -0000 1.24 *************** *** 32,35 **** --- 32,37 ---- #include "Misc.h" #include "TagList.h" + #include "AEPlugin.h" + #include "Plugin.h" class CAnyEditApp : public CDumpHandleApp *************** *** 97,102 **** BOOL LockTagList(); void UnlockTagList(); ! CComboBox * findbox; ! CComboBox * funcbox; BOOL CheckModification() { --- 99,105 ---- BOOL LockTagList(); void UnlockTagList(); ! void LoadPlugins(); ! void UnloadPlugins(); ! void PluginMenuClicked(UINT id); BOOL CheckModification() { *************** *** 137,140 **** --- 140,146 ---- } + public: + CComboBox * findbox; + CComboBox * funcbox; protected: *************** *** 155,158 **** --- 161,166 ---- int lastsearchflags; BOOL lastsearchdirection; + AEPlugin * pluginHead; + CPlugin plugin; protected: Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** AnyEdit.rc 18 Jul 2003 19:05:36 -0000 1.23 --- AnyEdit.rc 23 Jul 2003 09:41:34 -0000 1.24 *************** *** 153,160 **** MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE END - POPUP "Plugins" - BEGIN - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN1 - END POPUP "&Help" BEGIN --- 153,156 ---- *************** *** 465,472 **** MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE END - POPUP "Plugins" - BEGIN - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN1 - END POPUP "&Window" BEGIN --- 461,464 ---- *************** *** 910,917 **** MENUITEM "&Customize...", ID_VIEW_CUSTOMIZE END - POPUP "Plugins" - BEGIN - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN1 - END POPUP "&Help" BEGIN --- 902,905 ---- *************** *** 922,957 **** MENUITEM SEPARATOR MENUITEM "&About AnyEdit...", ID_APP_ABOUT - END - END - - IDR_POPUP_PLUGINS MENU DISCARDABLE - BEGIN - POPUP "<PLUGINS>" - BEGIN - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN1 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN2 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN3 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN4 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN5 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN6 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN7 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN8 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN9 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN10 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN11 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN12 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN13 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN14 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN15 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN16 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN17 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN18 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN19 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN20 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN21 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN22 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN23 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN24 - MENUITEM "<plugin1>", ID_PLUGINS_PLUGIN25 END END --- 910,913 ---- Index: MainFrm.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MainFrm.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** MainFrm.cpp 18 Jul 2003 19:05:36 -0000 1.24 --- MainFrm.cpp 23 Jul 2003 09:41:34 -0000 1.25 *************** *** 58,62 **** #endif - typedef int (*ENTRY_FUNCTION)(CPlugin *); IMPLEMENT_MSG(UPM_FINISHED) --- 58,61 ---- *************** *** 121,127 **** ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_USER_TOOLBAR1, ID_VIEW_USER_TOOLBAR1 + iMaxUserToolbars - 1, OnUpdateToolsViewUserToolbar) ON_COMMAND_EX_RANGE(ID_USER_TOOL1, ID_USER_TOOL10, OnSelectedUserTools) - ON_COMMAND_EX_RANGE(ID_PLUGINS_PLUGIN1, ID_PLUGINS_PLUGIN25, OnSelectedPlugin) ON_UPDATE_COMMAND_UI_RANGE(ID_USER_TOOL1, ID_USER_TOOL10, OnUpdateUserTools) ON_COMMAND_EX_RANGE(ID_CUR_TOOL1, ID_CUR_TOOL5, OnCurrentUserTools) ON_REGISTERED_MESSAGE(BCGM_CUSTOMIZEHELP, OnHelpCustomizeToolbars) END_MESSAGE_MAP() --- 120,126 ---- ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_USER_TOOLBAR1, ID_VIEW_USER_TOOLBAR1 + iMaxUserToolbars - 1, OnUpdateToolsViewUserToolbar) ON_COMMAND_EX_RANGE(ID_USER_TOOL1, ID_USER_TOOL10, OnSelectedUserTools) ON_UPDATE_COMMAND_UI_RANGE(ID_USER_TOOL1, ID_USER_TOOL10, OnUpdateUserTools) ON_COMMAND_EX_RANGE(ID_CUR_TOOL1, ID_CUR_TOOL5, OnCurrentUserTools) + ON_COMMAND_EX_RANGE(50000, 55000, OnSelectedPluginMenu) ON_REGISTERED_MESSAGE(BCGM_CUSTOMIZEHELP, OnHelpCustomizeToolbars) END_MESSAGE_MAP() *************** *** 203,217 **** CBCGToolBar::AddToolBarForImageCollection (IDR_USERMENUS2); ! if (!m_wndMenuBar.Create (this)) ! { TRACE0("Failed to create menubar\n"); return -1; // fail to create } ! m_wndMenuBar.SetBarStyle(m_wndMenuBar.GetBarStyle() | CBRS_SIZE_DYNAMIC); ! m_wndMenuBar.SetHotBorder(TRUE); m_wndMenuBar.SetHotTextColor(8388608); if (!m_wndFullScreen.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || --- 202,216 ---- CBCGToolBar::AddToolBarForImageCollection (IDR_USERMENUS2); ! if (!m_wndMenuBar.Create (this)) ! { TRACE0("Failed to create menubar\n"); return -1; // fail to create } ! m_wndMenuBar.SetBarStyle(m_wndMenuBar.GetBarStyle() | CBRS_SIZE_DYNAMIC); m_wndMenuBar.SetHotBorder(TRUE); m_wndMenuBar.SetHotTextColor(8388608); + if (!m_wndFullScreen.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || *************** *** 328,336 **** //deepwashere - have commented the next line ;( //m_wndToolBar.LoadState (strControlBarRegEntry); ! m_wndMenuBar.LoadState (strControlBarRegEntry ! ); ! // TODO: add LoadState for all your predefined toolbars here ! ////m_wndToolbarBookMark.LoadState (strControlBarRegEntry); //m_wndToolbarFormat.LoadState (strControlBarRegEntry); //---------------------------- --- 327,334 ---- //deepwashere - have commented the next line ;( //m_wndToolBar.LoadState (strControlBarRegEntry); ! //m_wndMenuBar.LoadState (strControlBarRegEntry); ! // TODO: add LoadState for all your predefined toolbars here ! //m_wndToolbarBookMark.LoadState (strControlBarRegEntry); //m_wndToolbarFormat.LoadState (strControlBarRegEntry); //---------------------------- *************** *** 343,348 **** //------------------------------------- CDockState dockState; ! dockState.LoadState (strControlBarRegEntry ! ); if (IsDockStateValid (dockState)) --- 341,345 ---- //------------------------------------- CDockState dockState; ! dockState.LoadState (strControlBarRegEntry); if (IsDockStateValid (dockState)) *************** *** 415,433 **** } - if (pMenuPopup->GetMenuBar ()->CommandToIndex (ID_PLUGINS_PLUGIN1) >= 0) - { - pMenuPopup->RemoveAllItems (); - - CMenu menu; - VERIFY(menu.LoadMenu (IDR_POPUP_PLUGINS)); - - CMenu* pPopup = menu.GetSubMenu(0); - ASSERT(pPopup != NULL); - - LoadPluginMenus (*pPopup); - pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE); - } - - if (pMenuPopup->GetMenuBar ()->CommandToIndex (ID_FILE_RECENTWORKSPACES_WS1) >= 0) { --- 412,415 ---- *************** *** 536,563 **** } - void CMainFrame::LoadPluginMenus(CMenu &popUp) - { - CString app_path = theApp.GetAppPath(); - CStringArray plugins; - app_path+= _T("Plugins"); - msc.GetFilesInFolder(app_path,"*.dll",plugins); - - int y=plugins.GetSize(); - int pluginPos = 0; - int ccnt = ID_PLUGINS_PLUGIN1; - for(int i=0;i<y;i++) - { - popUp.ModifyMenu(ccnt,MF_STRING,ccnt,plugins.GetAt(i).Left(plugins.GetAt(i).GetLength()-4)); - ccnt++; - pluginPos++; - } - - for(int xy=pluginPos;xy<26;xy++) - { - popUp.DeleteMenu(pluginPos,MF_BYPOSITION); - } - - } - void CMainFrame::LoadToolMenus(CMenu &popUp) { --- 518,521 ---- *************** *** 1146,1171 **** } - void CMainFrame::OnSelectedPlugin(UINT id) - { - CString app_path = theApp.GetAppPath(); - CStringArray plugins; - app_path+= _T("Plugins"); - msc.GetFilesInFolder(app_path,"*.dll",plugins); - int position = ID_PLUGINS_PLUGIN1 - id; - app_path+="\\"; - app_path+= plugins.GetAt(-position); - ENTRY_FUNCTION PluginFunction = NULL; - HINSTANCE hinst = LoadLibrary(app_path); - if(hinst) - { - PluginFunction = (ENTRY_FUNCTION)GetProcAddress(hinst,"EntryFunction"); - CPlugin plugin; - if(PluginFunction) - PluginFunction(&plugin); - FreeLibrary(hinst); - } - - } - void CMainFrame::OnSelectedUserTools(UINT id) { --- 1104,1107 ---- *************** *** 1591,1594 **** --- 1527,1535 ---- { CMDIFrameWnd::OnSetFocus(pOldWnd); + } + + void CMainFrame::OnSelectedPluginMenu(UINT id) + { + theApp.PluginMenuClicked(id); } Index: MainFrm.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MainFrm.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MainFrm.h 18 Jul 2003 19:05:36 -0000 1.18 --- MainFrm.h 23 Jul 2003 09:41:34 -0000 1.19 *************** *** 24,28 **** #define AEM_OPENFILE ( WM_USER + 6000) ! class CMainFrame : public CMDIFrameWnd { DECLARE_DYNAMIC(CMainFrame) --- 24,28 ---- #define AEM_OPENFILE ( WM_USER + 6000) ! class CMainFrame : public CBCGMDIFrameWnd { DECLARE_DYNAMIC(CMainFrame) *************** *** 34,39 **** void SaveSettingsToRegistry(); void LoadToolMenus(CMenu &popUp); ! void LoadPluginMenus(CMenu &popUp); ! void LoadRecentMenus(CMenu &popUp); void LoadCurrentToolMenu(CMenu &popUp,LPCSTR curLang); // Attributes --- 34,38 ---- void SaveSettingsToRegistry(); void LoadToolMenus(CMenu &popUp); ! void LoadRecentMenus(CMenu &popUp); void LoadCurrentToolMenu(CMenu &popUp,LPCSTR curLang); // Attributes *************** *** 90,96 **** BOOL LockTagList(); void UnlockTagList(); - - protected: // control bar embedded members CBCGMenuBar m_wndMenuBar; CStatusBar m_wndStatusBar; CBCGToolBar m_wndToolbarFormat; --- 89,95 ---- BOOL LockTagList(); void UnlockTagList(); CBCGMenuBar m_wndMenuBar; + protected: // control bar embedded members + CStatusBar m_wndStatusBar; CBCGToolBar m_wndToolbarFormat; *************** *** 159,165 **** afx_msg void OnUpdateToolsViewUserToolbar (CCmdUI* pCmdUI); afx_msg void OnUpdateUserTools (CCmdUI* pCmdUI); ! afx_msg void OnSelectedPlugin(UINT id); ! afx_msg void OnSelectedUserTools(UINT id); afx_msg void OnCurrentUserTools(UINT id); afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM); afx_msg LRESULT OnHelpCustomizeToolbars(WPARAM wp, LPARAM lp); --- 158,164 ---- afx_msg void OnUpdateToolsViewUserToolbar (CCmdUI* pCmdUI); afx_msg void OnUpdateUserTools (CCmdUI* pCmdUI); ! afx_msg void OnSelectedUserTools(UINT id); afx_msg void OnCurrentUserTools(UINT id); + afx_msg void OnSelectedPluginMenu(UINT id); afx_msg LRESULT OnToolbarContextMenu(WPARAM,LPARAM); afx_msg LRESULT OnHelpCustomizeToolbars(WPARAM wp, LPARAM lp); Index: Plugin.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Plugin.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Plugin.cpp 18 Jul 2003 19:05:36 -0000 1.1 --- Plugin.cpp 23 Jul 2003 09:41:34 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- #include "AnyEdit.h" #include "Plugin.h" + #include "MainFrm.h" void CPlugin::OpenUrl(LPCSTR url) *************** *** 11,13 **** --- 12,279 ---- { return theApp.GetAppPath(); + } + + BOOL CPlugin::MergeMenu(CMenu * pMenuDestination, const CMenu * pMenuAdd, bool bTopLevel /*=false*/) + { + // Abstract: + // Merges two menus. + // + // Parameters: + // pMenuDestination - [in, retval] destination menu handle + // pMenuAdd - [in] menu to merge + // bTopLevel - [in] indicator for special top level behavior + // + // Return value: + // <false> in case of error. + // + // Comments: + // This function calles itself recursivley. If bTopLevel is set to true, + // we append popups at top level or we insert before <Window> or <Help>. + + // get the number menu items in the menus + int iMenuAddItemCount = pMenuAdd->GetMenuItemCount(); + int iMenuDestItemCount = pMenuDestination->GetMenuItemCount(); + + // if there are no items return + if( iMenuAddItemCount == 0 ) + return true; + + // if we are not at top level and the destination menu is not empty + // -> we append a seperator + if( !bTopLevel && iMenuDestItemCount > 0 ) + pMenuDestination->AppendMenu(MF_SEPARATOR); + + // iterate through the top level of + for( int iLoop = 0; iLoop < iMenuAddItemCount; iLoop++ ) + { + // get the menu string from the add menu + CString sMenuAddString; + pMenuAdd->GetMenuString( iLoop, sMenuAddString, MF_BYPOSITION ); + + // try to get the submenu of the current menu item + CMenu* pSubMenu = pMenuAdd->GetSubMenu(iLoop); + + // check if we have a sub menu + if (!pSubMenu) + { + // normal menu item + // read the source and append at the destination + UINT nState = pMenuAdd->GetMenuState( iLoop, MF_BYPOSITION ); + UINT nItemID = pMenuAdd->GetMenuItemID( iLoop ); + + if( pMenuDestination->AppendMenu( nState, nItemID, sMenuAddString )) + { + // menu item added, don't forget to correct the item count + iMenuDestItemCount++; + } + else + { + TRACE( "MergeMenu: AppendMenu failed!\n" ); + return false; + } + } + else + { + // create or insert a new popup menu item + + // default insert pos is like ap + int iInsertPosDefault = -1; + + // if we are at top level merge into existing popups rather than + // creating new ones + if( bTopLevel ) + { + ASSERT( sMenuAddString != "&?" && sMenuAddString != "?" ); + CString sAdd( sMenuAddString ); + sAdd.Remove('&'); // for comparison of menu items supress '&' + bool bAdded = false; + + // try to find existing popup + for( int iLoop1 = 0; iLoop1 < iMenuDestItemCount; iLoop1++ ) + { + // get the menu string from the destination menu + CString sDest; + pMenuDestination->GetMenuString( iLoop1, sDest, MF_BYPOSITION ); + sDest.Remove( '&' ); // for a better compare (s.a.) + + if( sAdd == sDest ) + { + // we got a hit -> merge the two popups + // try to get the submenu of the desired destination menu item + CMenu* pSubMenuDest = pMenuDestination->GetSubMenu( iLoop1 ); + + if( pSubMenuDest ) + { + // merge the popup recursivly and continue with outer for loop + if( !MergeMenu( pSubMenuDest, pSubMenu )) + return false; + + bAdded = true; + break; + } + } + + // alternativ insert before <Window> or <Help> + if( iInsertPosDefault == -1 && ( sDest == "Window" || sDest == "?" || sDest == "Help" )) + iInsertPosDefault = iLoop1; + + } + + if( bAdded ) + { + // menu added, so go on with loop over pMenuAdd's top level + continue; + } + } + + // if the top level search did not find a position append the menu + if( iInsertPosDefault == -1 ) + iInsertPosDefault = pMenuDestination->GetMenuItemCount(); + + // create a new popup and insert before <Window> or <Help> + CMenu NewPopupMenu; + if( !NewPopupMenu.CreatePopupMenu() ) + { + TRACE( "MergeMenu: CreatePopupMenu failed!\n" ); + return false; + } + + // merge the new popup recursivly + if( !MergeMenu( &NewPopupMenu, pSubMenu )) + return false; + + // insert the new popup menu into the destination menu + HMENU hNewMenu = NewPopupMenu.GetSafeHmenu(); + + if( pMenuDestination->InsertMenu( iInsertPosDefault, + MF_BYPOSITION | MF_POPUP | MF_ENABLED, + (UINT)hNewMenu, sMenuAddString )) + { + // don't forget to correct the item count + iMenuDestItemCount++; + } + else + { + TRACE( "MergeMenu: InsertMenu failed!\n" ); + return false; + } + + // don't destroy the new menu + NewPopupMenu.Detach(); + } + } + + return true; + } + + + BOOL CPlugin::MergeAccelerator(HACCEL& hDestination, HACCEL hToMerge) + { + // this function merges the hToMerge accelerator table with that of hDestination + ASSERT(hToMerge) ; + + int original_count = 0 ; + int add_count ; + if (hDestination != NULL) + { + // we have an existing table + original_count = CopyAcceleratorTable(hDestination, NULL, 0) ; + } + add_count = CopyAcceleratorTable(hToMerge, NULL, 0) ; + if (add_count > 0) + { + ACCEL *pElements = new ACCEL[original_count + add_count] ; + // copy in the existing data if it exists + if (hDestination != NULL) + CopyAcceleratorTable(hDestination, pElements, original_count) ; + // now add in the merge accelerator + CopyAcceleratorTable(hToMerge, &pElements[original_count], add_count) ; + HACCEL hNew = CreateAcceleratorTable(pElements, original_count + add_count) ; + DestroyAcceleratorTable(hDestination) ; // because it gets replaced + hDestination = hNew ; + delete []pElements ; + return true ; + } + return false ; + } + + + BOOL CPlugin::AddAccelerator(HACCEL hToMerge,DWORD mergewith) + { + if((mergewith & ANYEDIT_MAIN)==ANYEDIT_MAIN) + { + CMultiDocTemplate dummy(1, NULL, NULL, NULL) ; + dummy.m_hAccelTable = ((CMDIFrameWnd*)theApp.m_pMainWnd)->m_hAccelTable ; + MergeAccelerator(((CMDIFrameWnd*)theApp.m_pMainWnd)->m_hAccelTable ,hToMerge) ; + dummy.m_hAccelTable = NULL ; // stop it being released + } + + POSITION pos = theApp.GetFirstDocTemplatePosition() ; + if(pos) + { + CMultiDocTemplate *pTemplate = (CMultiDocTemplate*)theApp.GetNextDocTemplate(pos); + if((mergewith & ANYEDIT_DOCUMENT)==ANYEDIT_DOCUMENT) + { + if(pTemplate) + MergeAccelerator(pTemplate->m_hAccelTable,hToMerge); + } + } + + if(pos) + { + CMultiDocTemplate *pTemplate = (CMultiDocTemplate*)theApp.GetNextDocTemplate(pos); + if((mergewith & ANYEDIT_BROWSER)==ANYEDIT_BROWSER ) + { + if(pTemplate) + MergeAccelerator(pTemplate->m_hAccelTable,hToMerge); + } + } + + return TRUE; + } + + + BOOL CPlugin::AddMenu(const CMenu * pMenuAdd, DWORD mergewith, bool bTopLevel /*= false*/) + { + + if((mergewith & ANYEDIT_MAIN)==ANYEDIT_MAIN) + { + CMultiDocTemplate dummy(1,NULL,NULL,NULL); + dummy.m_hMenuShared= ((CMainFrame *)theApp.m_pMainWnd)->m_hMenuDefault; + CMenu ddmenu; + ddmenu.Attach(dummy.m_hMenuShared); + MergeMenu(&ddmenu,pMenuAdd,bTopLevel); + ddmenu.Detach(); + dummy.m_hMenuShared = NULL; + ((CMainFrame *)theApp.m_pMainWnd)->m_wndMenuBar.CreateFromMenu(((CMainFrame *)theApp.m_pMainWnd)->m_hMenuDefault,TRUE,TRUE); + } + + + POSITION pos = theApp.GetFirstDocTemplatePosition(); + if(pos) + { + CMultiDocTemplate * temp = (CMultiDocTemplate *)theApp.GetNextDocTemplate(pos); + if((mergewith & ANYEDIT_DOCUMENT)==ANYEDIT_DOCUMENT) + { + CMenu docMenu ; + docMenu.Attach(temp->m_hMenuShared) ; + MergeMenu(&docMenu,pMenuAdd,bTopLevel); + docMenu.Detach(); + } + } + + if(pos) + { + CMultiDocTemplate * temp = (CMultiDocTemplate *)theApp.GetNextDocTemplate(pos); + if((mergewith & ANYEDIT_BROWSER)==ANYEDIT_BROWSER) + { + CMenu docMenu ; + docMenu.Attach(temp->m_hMenuShared) ; + MergeMenu(&docMenu,pMenuAdd,bTopLevel); + docMenu.Detach(); + } + } + + + return TRUE; } Index: Plugin.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Plugin.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Plugin.h 18 Jul 2003 19:05:36 -0000 1.1 --- Plugin.h 23 Jul 2003 09:41:34 -0000 1.2 *************** *** 2,11 **** #define PLUGIN_H class CPlugin { public: virtual void OpenUrl(LPCSTR url); - virtual LPCSTR GetAppPath(); }; --- 2,29 ---- #define PLUGIN_H + // Add menu or accelerator to the following windows + #define ANYEDIT_MAIN 1 + #define ANYEDIT_DOCUMENT 2 + #define ANYEDIT_BROWSER 4 + class CPlugin { + protected: + virtual BOOL MergeMenu(CMenu * pMenuDestination, const CMenu * pMenuAdd, bool bTopLevel =TRUE); + virtual BOOL MergeAccelerator(HACCEL& hDestination, HACCEL hToMerge); + public: + // Add menu for merging with Anyedit + virtual BOOL AddMenu(const CMenu * pMenuAdd,DWORD mergewith=ANYEDIT_MAIN|ANYEDIT_DOCUMENT|ANYEDIT_BROWSER,bool bTopLevel = TRUE); + + // Add accelerator for merging with AnyEdit + virtual BOOL AddAccelerator(HACCEL hToMerge,DWORD mergewith=ANYEDIT_MAIN|ANYEDIT_DOCUMENT|ANYEDIT_BROWSER); + + // Open the following URL in a new browser window virtual void OpenUrl(LPCSTR url); + // Get the application path + virtual LPCSTR GetAppPath(); + }; Index: resource.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/resource.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** resource.h 18 Jul 2003 19:05:36 -0000 1.15 --- resource.h 23 Jul 2003 09:41:34 -0000 1.16 *************** *** 423,451 **** #define ID_CONFIGURE_CURRENTDOCUMENT_BOOKMARKMARGIN 33041 #define ID_CONFIGURE_CURRENTDOCUMENT_FOLDMARGIN 33044 - #define ID_PLUGINS_PLUGIN1 33045 - #define ID_PLUGINS_PLUGIN2 33046 - #define ID_PLUGINS_PLUGIN3 33047 - #define ID_PLUGINS_PLUGIN4 33048 - #define ID_PLUGINS_PLUGIN5 33049 - #define ID_PLUGINS_PLUGIN6 33050 - #define ID_PLUGINS_PLUGIN7 33051 - #define ID_PLUGINS_PLUGIN8 33052 - #define ID_PLUGINS_PLUGIN9 33053 - #define ID_PLUGINS_PLUGIN10 33054 - #define ID_PLUGINS_PLUGIN11 33055 - #define ID_PLUGINS_PLUGIN12 33056 - #define ID_PLUGINS_PLUGIN13 33057 - #define ID_PLUGINS_PLUGIN14 33058 - #define ID_PLUGINS_PLUGIN15 33059 - #define ID_PLUGINS_PLUGIN16 33060 - #define ID_PLUGINS_PLUGIN17 33061 - #define ID_PLUGINS_PLUGIN18 33062 - #define ID_PLUGINS_PLUGIN19 33063 - #define ID_PLUGINS_PLUGIN20 33064 - #define ID_PLUGINS_PLUGIN21 33065 - #define ID_PLUGINS_PLUGIN22 33066 - #define ID_PLUGINS_PLUGIN23 33067 - #define ID_PLUGINS_PLUGIN24 33068 - #define ID_PLUGINS_PLUGIN25 33069 #define ID_OUTPUT_CLEAR 57632 #define ID_OUTPUT_COPY 57634 --- 423,426 ---- |
Update of /cvsroot/anyedit/AnyEditv2/Plugins/Diff In directory sc8-pr-cvs1:/tmp/cvs-serv27703/Plugins/Diff Modified Files: Diff.cpp Diff.def Diff.plg Diff.rc Resource.h Removed Files: Diff.aps Diff.clw Diff.ncb Diff.opt Log Message: Added plugin support. Plugins can expose there own menus and accelerators Index: Diff.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Plugins/Diff/Diff.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Diff.cpp 18 Jul 2003 19:05:36 -0000 1.1 --- Diff.cpp 23 Jul 2003 09:41:35 -0000 1.2 *************** *** 14,18 **** #endif ! static AFX_EXTENSION_MODULE DiffDLL = { NULL, NULL }; --- 14,18 ---- #endif ! HINSTANCE hDLLInstance = NULL ; static AFX_EXTENSION_MODULE DiffDLL = { NULL, NULL }; *************** *** 44,47 **** --- 44,48 ---- new CDynLinkLibrary(DiffDLL); + hDLLInstance = hInstance ; } else if (dwReason == DLL_PROCESS_DETACH) *************** *** 56,65 **** ! extern "C" int EntryFunction(CPlugin * plugin) { - CDiffDlg dlg; - dlg.SetPlugin(plugin); - dlg.DoModal(); - //plugin->OpenUrl("http://www.google.com"); return 0; } --- 57,83 ---- ! extern "C" int OnMenuClick(CPlugin * plugin,UINT menu_id) ! { ! if(menu_id==ID_TOOLS_DIFFTOOL) ! { ! CDiffDlg dlg; ! dlg.SetPlugin(plugin); ! dlg.DoModal(); ! } ! return 0; ! } ! ! extern "C" int plugin_init(CPlugin * plugin) ! { ! CMenu test; ! test.LoadMenu(IDR_MENU1); ! plugin->AddMenu(&test,ANYEDIT_MAIN|ANYEDIT_DOCUMENT|ANYEDIT_BROWSER ,TRUE); ! HACCEL hMerge = LoadAccelerators(hDLLInstance, MAKEINTRESOURCE(IDR_ACCELERATOR1)) ; ! plugin->AddAccelerator(hMerge,ANYEDIT_MAIN|ANYEDIT_DOCUMENT|ANYEDIT_BROWSER); ! return 0; ! } ! ! extern "C" int plugin_exit(CPlugin * plugin) { return 0; } Index: Diff.def =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Plugins/Diff/Diff.def,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Diff.def 18 Jul 2003 19:05:36 -0000 1.1 --- Diff.def 23 Jul 2003 09:41:35 -0000 1.2 *************** *** 6,8 **** EXPORTS ; Explicit exports can go here ! EntryFunction \ No newline at end of file --- 6,10 ---- EXPORTS ; Explicit exports can go here ! OnMenuClick ! plugin_init ! plugin_exit \ No newline at end of file Index: Diff.plg =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Plugins/Diff/Diff.plg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Diff.plg 18 Jul 2003 19:05:36 -0000 1.1 --- Diff.plg 23 Jul 2003 09:41:35 -0000 1.2 *************** *** 7,10 **** --- 7,49 ---- </h3> <h3>Command Lines</h3> + Creating command line "rc.exe /l 0x409 /fo"Release/Diff.res" /d "NDEBUG" /d "_AFXDLL" "C:\OS\AnyEditv2\Plugins\Diff\Diff.rc"" + Creating temporary file "C:\DOCUME~1\deep\LOCALS~1\Temp\RSP4EA.tmp" with contents + [ + /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_AFXEXT" /Fp"Release/Diff.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c + "C:\OS\AnyEditv2\Plugins\Diff\DiffEngine.cpp" + "C:\OS\AnyEditv2\Plugins\Diff\FilePartition.cpp" + "C:\OS\AnyEditv2\Plugins\Diff\Diff.cpp" + "C:\OS\AnyEditv2\Plugins\Diff\DiffDlg.cpp" + ] + Creating command line "cl.exe @C:\DOCUME~1\deep\LOCALS~1\Temp\RSP4EA.tmp" + Creating temporary file "C:\DOCUME~1\deep\LOCALS~1\Temp\RSP4EB.tmp" with contents + [ + /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_AFXEXT" /Fp"Release/Diff.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c + "C:\OS\AnyEditv2\Plugins\Diff\StdAfx.cpp" + ] + Creating command line "cl.exe @C:\DOCUME~1\deep\LOCALS~1\Temp\RSP4EB.tmp" + Creating temporary file "C:\DOCUME~1\deep\LOCALS~1\Temp\RSP4EC.tmp" with contents + [ + /nologo /subsystem:windows /dll /incremental:no /pdb:"Release/Diff.pdb" /machine:I386 /def:".\Diff.def" /out:"../../bin/Plugins/Diff.dll" /implib:"Release/Diff.lib" + .\Release\DiffEngine.obj + .\Release\FilePartition.obj + .\Release\Diff.obj + .\Release\DiffDlg.obj + .\Release\StdAfx.obj + .\Release\Diff.res + ] + Creating command line "link.exe @C:\DOCUME~1\deep\LOCALS~1\Temp\RSP4EC.tmp" + <h3>Output Window</h3> + Compiling resources... + Compiling... + StdAfx.cpp + Compiling... + DiffEngine.cpp + FilePartition.cpp + Diff.cpp + DiffDlg.cpp + Generating Code... + Linking... + Creating library Release/Diff.lib and object Release/Diff.exp Index: Diff.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Plugins/Diff/Diff.rc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Diff.rc 18 Jul 2003 19:05:36 -0000 1.1 --- Diff.rc 23 Jul 2003 09:41:35 -0000 1.2 *************** *** 108,116 **** // ! IDD_DIALOG1 DIALOGEX 0, 0, 283, 82 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "diff tool" ! FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "Diff",IDOK,171,61,50,14 --- 108,116 ---- // ! IDD_DIALOG1 DIALOGEX 0, 0, 283, 85 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "diff tool" ! FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN DEFPUSHBUTTON "Diff",IDOK,171,61,50,14 *************** *** 143,146 **** --- 143,183 ---- END #endif // APSTUDIO_INVOKED + + + ///////////////////////////////////////////////////////////////////////////// + // + // Menu + // + + IDR_MENU1 MENU DISCARDABLE + BEGIN + POPUP "Tools" + BEGIN + MENUITEM "Diff Tool", ID_TOOLS_DIFFTOOL + END + END + + + ///////////////////////////////////////////////////////////////////////////// + // + // Accelerator + // + + IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE + BEGIN + "D", ID_TOOLS_DIFFTOOL, VIRTKEY, SHIFT, CONTROL, + NOINVERT + END + + + ///////////////////////////////////////////////////////////////////////////// + // + // String Table + // + + STRINGTABLE DISCARDABLE + BEGIN + ID_TOOLS_DIFFTOOL "Find difference between two files" + END #endif // English (U.S.) resources Index: Resource.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Plugins/Diff/Resource.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Resource.h 18 Jul 2003 19:05:36 -0000 1.1 --- Resource.h 23 Jul 2003 09:41:35 -0000 1.2 *************** *** 6,13 **** --- 6,17 ---- #define ID_EDIT1 1000 #define ID_BUTTON1 1001 + #define IDR_MENU1 1001 #define ID_EDIT2 1002 + #define IDR_ACCELERATOR1 1002 #define ID_BUTTON2 1003 #define ID_CHECK1 1004 #define ID_CHECK2 1005 + #define ID_FILE_OHOHAOSDHF 32773 + #define ID_TOOLS_DIFFTOOL 50001 // Next default values for new objects *************** *** 15,20 **** #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 1001 ! #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 1000 --- 19,24 ---- #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 1003 ! #define _APS_NEXT_COMMAND_VALUE 32774 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 1000 --- Diff.aps DELETED --- --- Diff.clw DELETED --- --- Diff.ncb DELETED --- --- Diff.opt DELETED --- |
From: <td...@us...> - 2003-07-22 04:46:16
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv13635 Modified Files: AnyEdit.nsi ScintillaDefaults.cpp Log Message: Beta 2.0 Index: AnyEdit.nsi =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.nsi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AnyEdit.nsi 18 Jan 2003 13:51:50 -0000 1.4 --- AnyEdit.nsi 22 Jul 2003 04:46:13 -0000 1.5 *************** *** 1,51 **** ! ;NSIS Modern Style UI ! ! !define NAME "AnyEdit" ;Define your own software name here ! !define VERSION "v 2.0 Alpha 10.0" ;Define your own software version here ! ! !verbose 3 ! !include "${NSISDIR}\Examples\WinMessages.nsh" ! !include "${NSISDIR}\Examples\Modern UI\ModernUI.nsh" ! !verbose 4 ! !define CURRENTPAGE $9 ! !define TEMP1 $R0 ! !define TEMP2 $R1 ;-------------------------------- ;General ! Name "${NAME} ${VERSION}" ! OutFile "AESetupa10.exe" ! SetOverwrite on ! ;User interface ! !insertmacro MUI_INTERFACE "modern.exe" "setup.ico" "setup.ico" "checks2.bmp" "smooth" ! ;License dialog ! LicenseText "Scroll down to see the rest of the agreement." ! LicenseData "License.txt" ! ;Component-select dialog ! ComponentText "Check the components you want to install and uncheck the components you don't want to install. Click Next to continue." ! ;Folder-select dialog ! InstallDir "$PROGRAMFILES\${NAME}" ! DirText "Setup will install ${NAME} in the following folder.$\r$\n$\r$\nTo install in this folder, click Install. To install in a different folder, click Browse and select another folder." " " ! ;Install dialog ! InstallColors /windows ;Default Windows colors for details list ! InstProgressFlags smooth ! ;Uninstaller ! UninstallText "This will uninstall ${NAME} from your system." ! ShowInstDetails show ;-------------------------------- ;Installer Sections ! Section "AnyEdit main files" secmain ###This must remain only for the alphas --- 1,69 ---- ! ;AnyEdit Installer ! ;M.Deepak - 22/07/2003 ! !define MUI_PRODUCT "AnyEdit" ;Define your own software name here ! !define MUI_VERSION "v 2.0 Beta 2" ;Define your own software version here ! !include "MUI.nsh" ! ;-------------------------------- + ;Configuration ;General ! OutFile "AESetupB20.exe" ! ;Folder selection page ! InstallDir "$PROGRAMFILES\${MUI_PRODUCT}" ! ! ;Remember install folder ! InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" "" ! ;-------------------------------- ! ;Modern UI Configuration ! !define MUI_WELCOMEPAGE ! !define MUI_LICENSEPAGE ! !define MUI_COMPONENTSPAGE ! !define MUI_DIRECTORYPAGE ! !define MUI_FINISHPAGE ! !define MUI_FINISHPAGE_RUN "$INSTDIR\AnyEdit.exe" ! ! !define MUI_ABORTWARNING ! !define MUI_UNINSTALLER ! !define MUI_UNCONFIRMPAGE ! ; !define MUI_UI_HEADERBITMAP_RIGHT ".\nortel_logo_small.bmp" ! ;Languages ! ! !insertmacro MUI_LANGUAGE "English" ! ! ;-------------------------------- ! ;Language Strings ! ;Description ! LangString DESC_SecMain ${LANG_ENGLISH} "Install AnyEdit" ! LangString DESC_StartMenu ${LANG_ENGLISH} "Install Startup Menu shortcuts" ! LangString DESC_SecDesktop ${LANG_ENGLISH} "Create desktop shortcut for launching AnyEdit" ! LangString DESC_SecQuick ${LANG_ENGLISH} "Create Quick Launch shortcut for launching AnyEdit" ! ;-------------------------------- ! ;Data ! LicenseData ".\License.txt" ! ! ;-------------------------------- ! ;Reserve Files ! ! ;Things that need to be extracted on first (keep these lines before any File command!) ! ;Only useful for BZIP2 compression ! !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE ! ! BrandingText "NSIS" ;-------------------------------- ;Installer Sections ! Section "!AnyEdit" SecMain ###This must remain only for the alphas *************** *** 63,74 **** File 'AnyEdit.chm' File 'grep.exe' - File 'ctags.exe' File 'Readme.txt' - File 'InstallHelp.exe' File 'History.txt' File 'License.txt' File 'UserImages.bmp' - #ExecShell "" "$INSTDIR\InstallHelp.exe" "" SW_SHOWMINIMIZED CreateDirectory '$INSTDIR\Favourites' --- 81,89 ---- *************** *** 113,266 **** File '.\Templates\Project\Java Applet\Files\*' ! #### -------Initial Reg settings ----######### ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages" "1" "Java" ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages" "2" "HTML" ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages" "3" "Cpp" ! WriteRegDWORD HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages" "Count" 3 ! ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\Cpp" "ACPFile" "java.acmp" ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\Cpp" "Extension" "cpp,cxx,cc,c" ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\Cpp" "SyntaxFile" "cpp.syn" ! ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\HTML" "ACPFile" "html4.acmp" ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\HTML" "Extension" "html,htm,php,asp" ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\HTML" "SyntaxFile" "html4.syn" ! ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\Java" "ACPFile" "java.acmp" ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\Java" "Extension" "java,jav" ! WriteRegStr HKEY_CURRENT_USER "Software\DeepSoft\AnyEdit Editor\Preferences\Languages\Java" "SyntaxFile" "jav2.syn" ! ! ! Delete $INSTDIR\InstallHelp.exe SectionEnd ! section 'Start Menu Shortcut' secstshort SetOutPath $SMPROGRAMS\AnyEditPro CreateShortCut '$SMPROGRAMS\AnyEditPro\AnyEdit.lnk' '$INSTDIR\AnyEdit.exe' ! # End of script for Section All Important Files (Required) SectionEnd ! section 'Desktop Shortcut' secdtshort SetOutPath $INSTDIR CreateShortCut '$DESKTOP\AnyEdit Professional.lnk' '$INSTDIR\AnyEdit.exe' '/CD /PAUSE' ! sectionend ! section 'Quick Lauch Shortcut' secqlshort SetOutPath $INSTDIR CreateShortCut '$QUICKLAUNCH\AnyEdit Professional.lnk' '$INSTDIR\AnyEdit.exe' '/CD /PAUSE' ! sectionend ! ! Section "Create Uninstaller" SecCreateUninst ! ! ;Add your stuff here - WriteUninstaller "$INSTDIR\Uninstall.exe" SectionEnd Section -post WriteRegStr HKEY_LOCAL_MACHINE SOFTWARE\AnyEditPro "" $INSTDIR ! WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" "DisplayName" "${NAME} ${VERSION}" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" "UninstallString" "$INSTDIR\Uninstall.exe" SectionEnd - - Section "" - - ;Invisible section to display the Finish header - !insertmacro MUI_FINISHHEADER SetPage - - SectionEnd - - - ;-------------------------------- ! ;Installer Functions ! ! Function .onInitDialog ! ! !insertmacro MUI_INNERDIALOG_INIT ! ! !insertmacro MUI_INNERDIALOG_START 1 ! !insertmacro MUI_INNERDIALOG_TEXT 1033 1040 "If you accept all the terms of the agreement, choose I Agree to continue. If you choose Cancel, Setup will close. You must accept the agreement to install ${NAME}." ! !insertmacro MUI_INNERDIALOG_STOP 1 ! ! !insertmacro MUI_INNERDIALOG_START 2 ! !insertmacro MUI_INNERDIALOG_TEXT 1033 1042 "Description" ! !insertmacro MUI_INNERDIALOG_TEXT 1033 1043 "Hover your mouse over a component to see it's description." ! !insertmacro MUI_INNERDIALOG_STOP 2 ! ! !insertmacro MUI_INNERDIALOG_START 3 ! !insertmacro MUI_INNERDIALOG_TEXT 1033 1041 "Destination Folder" ! !insertmacro MUI_INNERDIALOG_STOP 3 ! ! !insertmacro MUI_INNERDIALOG_END ! ! FunctionEnd ! ! Function .onNextPage ! ! !insertmacro MUI_NEXTPAGE SetPage ! ! FunctionEnd ! ! Function .onPrevPage ! ! !insertmacro MUI_PREVPAGE SetPage ! ! FunctionEnd ! ! Function SetPage ! ! !insertmacro MUI_PAGE_INIT ! ! !insertmacro MUI_PAGE_START 1 ! !insertmacro MUI_HEADER_TEXT 1033 "License Agreement" "Please review the license terms before installing ${NAME}." ! !insertmacro MUI_PAGE_STOP 1 ! ! !insertmacro MUI_PAGE_START 2 ! !insertmacro MUI_HEADER_TEXT 1033 "Choose Components" "Choose the components you want to install." ! !insertmacro MUI_PAGE_STOP 2 ! ! !insertmacro MUI_PAGE_START 3 ! !insertmacro MUI_HEADER_TEXT 1033 "Choose Install Location" "Choose the folder in which to install ${NAME}." ! !insertmacro MUI_PAGE_STOP 3 ! ! !insertmacro MUI_PAGE_START 4 ! !insertmacro MUI_HEADER_TEXT 1033 "Installing" "Please wait while ${NAME} is being installed." ! !insertmacro MUI_PAGE_STOP 4 ! ! !insertmacro MUI_PAGE_START 5 ! !insertmacro MUI_HEADER_TEXT 1033 "Finished" "Setup was completed successfully." ! !insertmacro MUI_PAGE_STOP 5 ! ! !insertmacro MUI_PAGE_END ! ! FunctionEnd ! ! Function .onMouseOverSection ! ! !insertmacro MUI_DESCRIPTION_INIT ! ! !insertmacro MUI_DESCRIPTION_TEXT 1033 ${secmain} "Copy all necessary AnyEdit binaries to the application folder." ! !insertmacro MUI_DESCRIPTION_TEXT 1033 ${secstshort} "Create an shortcut start menu" ! !insertmacro MUI_DESCRIPTION_TEXT 1033 ${secdtshort} "Create an shortcut on the desktop" ! !insertmacro MUI_DESCRIPTION_TEXT 1033 ${secqlshort} "Create an shortcut in the quick launch folder" ! !insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecCreateUninst} "Create a uninstaller which can automatically delete ${NAME}." ! ! !insertmacro MUI_DESCRIPTION_END ! ! FunctionEnd ! ! Function .onUserAbort ! ! !insertmacro MUI_ABORTWARNING 1033 "Are you sure you want to quit ${NAME} Setup?" ! !insertmacro MUI_ABORTWARNING_END ! FunctionEnd ;-------------------------------- --- 128,177 ---- File '.\Templates\Project\Java Applet\Files\*' ! WriteUninstaller "$INSTDIR\Uninstall.exe" ! WriteRegStr HKCU "Software\${MUI_PRODUCT}" "" $INSTDIR SectionEnd ! Section "Start menu shortcuts" SecStartMenu ! SetOutPath $SMPROGRAMS\AnyEditPro CreateShortCut '$SMPROGRAMS\AnyEditPro\AnyEdit.lnk' '$INSTDIR\AnyEdit.exe' ! SectionEnd ! Section "Desktop Shortcut" SecDesktop SetOutPath $INSTDIR CreateShortCut '$DESKTOP\AnyEdit Professional.lnk' '$INSTDIR\AnyEdit.exe' '/CD /PAUSE' ! SectionEnd ! Section "Quick Launch Shortcut" SecQuickLaunch SetOutPath $INSTDIR CreateShortCut '$QUICKLAUNCH\AnyEdit Professional.lnk' '$INSTDIR\AnyEdit.exe' '/CD /PAUSE' ! SectionEnd + Section -pre + SectionSetFlags SecMain 16 SectionEnd + Section -post WriteRegStr HKEY_LOCAL_MACHINE SOFTWARE\AnyEditPro "" $INSTDIR ! WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" "DisplayName" "${MUI_PRODUCT} ${MUI_VERSION}" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" "UninstallString" "$INSTDIR\Uninstall.exe" SectionEnd ;-------------------------------- ! ;Descriptions ! !insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SecMain} $(DESC_SecMain) + !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(DESC_StartMenu) + !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(DESC_SecDesktop) + !insertmacro MUI_DESCRIPTION_TEXT ${SecQuickLaunch} $(DESC_SecQuick) + !insertmacro MUI_FUNCTIONS_DESCRIPTION_END ;-------------------------------- *************** *** 269,275 **** Section "Uninstall" ! ;Add your stuff here ! ! DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\AnyEditPro" --- 180,184 ---- Section "Uninstall" ! DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\AnyEditPro" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\AnyEditPro" *************** *** 284,321 **** RMDir /r $INSTDIR ! ! !insertmacro MUI_FINISHHEADER un.SetPage SectionEnd - ;-------------------------------- - ;Uninstaller Functions - - - Function un.onNextPage - - !insertmacro MUI_NEXTPAGE un.SetPage - - FunctionEnd - - Function un.SetPage - - !insertmacro MUI_PAGE_INIT - - !insertmacro MUI_PAGE_START 1 - !insertmacro MUI_HEADER_TEXT 1033 "Uninstall ${NAME}" "Remove ${NAME} from your system." - !insertmacro MUI_PAGE_STOP 1 - - !insertmacro MUI_PAGE_START 2 - !insertmacro MUI_HEADER_TEXT 1033 "Uninstalling" "Please wait while ${NAME} is being uninstalled." - !insertmacro MUI_PAGE_STOP 2 - - !insertmacro MUI_PAGE_START 3 - !insertmacro MUI_HEADER_TEXT 1033 "Finished" "${NAME} has been removed from your system." - !insertmacro MUI_PAGE_STOP 3 - - !insertmacro MUI_PAGE_END - - FunctionEnd - - ;eof --- 193,198 ---- RMDir /r $INSTDIR ! !insertmacro MUI_UNFINISHHEADER SectionEnd Index: ScintillaDefaults.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ScintillaDefaults.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ScintillaDefaults.cpp 17 Jul 2003 11:32:15 -0000 1.11 --- ScintillaDefaults.cpp 22 Jul 2003 04:46:13 -0000 1.12 *************** *** 97,100 **** --- 97,101 ---- AddLanguageToRegistry(6,"XML","xml.syn","xml,xsl,svg,xul,xsd,dtd,xslt"); AddLanguageToRegistry(7,"Perl","perl.syn","pl,pm,cgi,pod"); + m_reg.WriteProfileString(_T("Preferences"),_T("Extension"),_T("All Files (*.*)|*.*|CPP Files (*.cpp;*.c;*.h;*.cxx;*.hpp)|*.cpp;*.c;*.h;*.cxx;*.hpp|Java Files(*.java)|*.java|HTML Files(*.html;*.htm;*.css;*.js)|*.html;*.htm;*.css;*.js|")); } |
From: <td...@us...> - 2003-07-22 04:44:56
|
Update of /cvsroot/anyedit/AnyEditBin/Syntax In directory sc8-pr-cvs1:/tmp/cvs-serv13410/Syntax Modified Files: cpp.syn Log Message: Beta 2.0 Index: cpp.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Syntax/cpp.syn,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cpp.syn 8 May 2003 12:21:02 -0000 1.1 --- cpp.syn 22 Jul 2003 04:44:53 -0000 1.2 *************** *** 18,22 **** StyleForeColor 7 Char StyleForeColor 8 804080 ! StyleForeColor 9 7F7F00 StyleForeColor 10 Operator StyleForeColor 11 000000 --- 18,22 ---- StyleForeColor 7 Char StyleForeColor 8 804080 ! StyleForeColor 9 Preprocessor StyleForeColor 10 Operator StyleForeColor 11 000000 |
From: <td...@us...> - 2003-07-22 04:44:56
|
Update of /cvsroot/anyedit/AnyEditBin/StartPage In directory sc8-pr-cvs1:/tmp/cvs-serv13410/StartPage Modified Files: left.htm right.htm Added Files: history.htm Log Message: Beta 2.0 --- NEW FILE: history.htm --- <html> <body> <font face="verdana" size="2"> <B>Beta 2.0</B><br> 1) Fixed setting focus problem on ctrl+tab [#765240]<br> 2) Word wrap is now saved between sessions and applies to all files.<BR> 3) Unwanted options in Prefs -> Editor Options hidden <br> 4) Highlight current line in menu works<br> 5) Rewrote font handling. It must work as expected now :)<br> 6) AnyEdit identifies modified files ! Warns you about it :)<br> 7) Sorting of function names in class view is now available<br> 8) When find fails.. it notifies user with a dialog<br> 9) Goto and class view jump to line becomes first line of document always.<br> 10) Find dialog vanishes after first successful find... further find carries on with F3<br> Find options are carried on between different files.<br> 11) Changed all 'bool''s to BOOL which removes many performance warnings [Source change]<br> 12) Output window automatically is shown when a tool is run with the output window hidden<br> 13) Fixed input entry length restriction bug. <br> 14) Fixed accelerators for Bookmarking and changed behaviour<br> 15) Fixed input entry length restriction bug. [#745642]<br> 16) AnyEdit now works properly for all users. Even if the admin setsup the program.<br> 17) AnyEdit saves file only if it has to...<br> 18) Added MiniToolbar feature.<br> 19) Fixed bug which caused wrong Autocomplete file to be displayed in Language preferences [#769366]<br> 20) Find & replace allows null replacement [#745169]<br> 21) Tabs to spaces works correctly [#722975]<br> 22) Bug replace whole word fixed.[#741234]<br> 23) User tool can run with no window open [#750948]<br> 24) Added Initial Plugin support<br> 25) Added Diff Plugin<br> </font> </body> </html> Index: left.htm =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/StartPage/left.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** left.htm 8 May 2003 12:21:02 -0000 1.1 --- left.htm 22 Jul 2003 04:44:53 -0000 1.2 *************** *** 86,90 **** <tr> <td bgcolor="#313163"><IMG height=21 src="clear.gif" width=16 border=0></td> ! <td id=td2 width="100%" bgcolor="#313163"><IMG height=16 src="clear.gif" width=16 border=0><a id=a2 onClick='showSelected(me)' class="menu" target=#Main href="whatsnew.htm">What's New</a></td> </tr> --- 86,90 ---- <tr> <td bgcolor="#313163"><IMG height=21 src="clear.gif" width=16 border=0></td> ! <td id=td2 width="100%" bgcolor="#313163"><IMG height=16 src="clear.gif" width=16 border=0><a id=a2 onClick='showSelected(me)' class="menu" target=#Main href="history.htm">History</a></td> </tr> *************** *** 96,100 **** <tr> <td bgcolor="#313163"><IMG height=21 src="clear.gif" width=16 border=0></td> ! <td id=td4 width="100%" bgcolor="#313163"><IMG height=16 src="clear.gif" width=16 border=0><a id=a4 onClick='showSelected(me)' class="menu" target=#Main href="right.htm">Latest News</a></td> </tr> --- 96,100 ---- <tr> <td bgcolor="#313163"><IMG height=21 src="clear.gif" width=16 border=0></td> ! <td id=td4 width="100%" bgcolor="#313163"><IMG height=16 src="clear.gif" width=16 border=0><a id=a4 onClick='showSelected(me)' class="menu" target=#Main href="http://anyedit.sourceforge.net/latestnews.php">Latest News</a></td> </tr> Index: right.htm =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/StartPage/right.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** right.htm 8 May 2003 12:21:02 -0000 1.1 --- right.htm 22 Jul 2003 04:44:53 -0000 1.2 *************** *** 1 **** ! <HTML><HEAD><TITLE>Start Page</TITLE><LINK REL="STYLESHEET" TYPE="text/css" HREF="css.css"><BODY> <div id="FileDetails" style="LEFT: 42px; POSITION: absolute; TOP: 42px;"><table id=tabs style="display:block;width:100%" border=0 cellpadding=0 cellspacing=0> <tr><td onclick="ShowTab(0)" id=tab width=45% style="text-align:center;" class='button' style="position:absloute;text-align:center;left:100px;top:100px;height:18px;" > Recent Files</td><td onclick="ShowTab(1)" id=tab width=45% style="text-align:center;" class='selected' style="position:absloute;text-align:center;left:100px;top:100px;height:18px;" > Recent Workspaces</td></tr><tr><td colspan=6 width=5px height=4px bgcolor="#222244"></td></tr></table></div><div id="Pages" style="LEFT: 42px; POSITION: absolute; TOP: 75px;display:block;"> <TABLE width=100%><TR><TD class=control><table style="display:block;width:100%" border=0 cellpadding=1 cellspacing=1 background="#000000"><TBODY><TR class=item> <TH class=item noWrap align=left width="10%">Sl.No</TH><TH class=item noWrap align=left>File Names</TH></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>1</center></TD><TD><a href="aep://FileOpen|C:\Program Files\AnyEdit\StartPage\home.htm">C:\Program Files\AnyEdit\StartPage\home.htm</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>2</center></TD><TD><a href="aep://FileOpen|C:\AnyEditv2\AssociationPref.cpp">C:\AnyEditv2\AssociationPref.cpp</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>3</center></TD><TD><a href="aep://FileOpen|C:\AnyEditv2\bin\StartPage\home.htm">C:\AnyEditv2\bin\StartPage\home.htm</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>4</center></TD><TD><a href="aep://FileOpen|C:\AnyEditv2\BrowserView.cpp">C:\AnyEditv2\BrowserView.cpp</a></td></TR></TBODY></table></TD></TR></TABLE></div><div id="Pages" style="LEFT: 42px; POSITION: absolute; TOP: 75px;display:none;"> <TABLE width=100%><TR><TD class=control><table style="display:block;width:100%" border=0 cellpadding=1 cellspacing=1 background="#000000"> <TBODY><TR class=item><TH class=item noWrap align=left width="10%">Sl.No</TH><TH class=item noWrap align=left>File Names</TH></TR></TBODY></table></TD></TR></TABLE></div><div id="Buttons" style="LEFT: 42px; POSITION: absolute; TOP: 250px;display:block;"> <table width=100% align><tr><td width=10%><form method=GET action="aep://FileOpenExisting|dummy"><input type=submit class=button value='Open Existing File'></form></td> <td><form method=GET action="aep://FileNew|dummy"><input type=submit class=button value='Create New File'></form></td></tr></table></div></BODY> </HTML><script>function ShowTab(TabIndex){ for(i=0;i<Pages.length;i++) { tab(i).className="selected"; Pages(i).style.display="none"; } tab(parseInt(TabIndex)).className="button"; Pages(parseInt(TabIndex)).style.display="block";}</script> \ No newline at end of file --- 1 ---- ! <HTML><HEAD><TITLE>Start Page</TITLE><LINK REL="STYLESHEET" TYPE="text/css" HREF="css.css"><BODY> <div id="FileDetails" style="LEFT: 42px; POSITION: absolute; TOP: 42px;"><table id=tabs style="display:block;width:100%" border=0 cellpadding=0 cellspacing=0> <tr><td onclick="ShowTab(0)" id=tab width=45% style="text-align:center;" class='button' style="position:absloute;text-align:center;left:100px;top:100px;height:18px;" > Recent Files</td><td onclick="ShowTab(1)" id=tab width=45% style="text-align:center;" class='selected' style="position:absloute;text-align:center;left:100px;top:100px;height:18px;" > Recent Workspaces</td></tr><tr><td colspan=6 width=5px height=4px bgcolor="#222244"></td></tr></table></div><div id="Pages" style="LEFT: 42px; POSITION: absolute; TOP: 75px;display:block;"> <TABLE width=100%><TR><TD class=control><table style="display:block;width:100%" border=0 cellpadding=1 cellspacing=1 background="#000000"><TBODY><TR class=item> <TH class=item noWrap align=left width="10%">Sl.No</TH><TH class=item noWrap align=left>File Names</TH></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>1</center></TD><TD><a href="aep://FileOpen|C:\OS\AnyEditv2\bin\StartPage\home.htm">C:\OS\AnyEditv2\bin\StartPage\home.htm</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>2</center></TD><TD><a href="aep://FileOpen|C:\Program Files\NSIS\makensis.htm">C:\Program Files\NSIS\makensis.htm</a></td></TR><TR class = text width=100% onmouseover="javascript:style.background='#e5e5e5'" onmouseout="javascript:style.background='white'"> <TD width="10%"><center>3</center></TD><TD><a href="aep://FileOpen|C:\work\ssl-vpn\lib\portal\c_src\iewiper-1.0.0.11\HistConfDlg.cpp">C:\work\ssl-vpn\lib\portal\c_src\iewiper-1.0.0.11\HistConfDlg.cpp</a></td></TR></TBODY></table></TD></TR></TABLE></div><div id="Pages" style="LEFT: 42px; POSITION: absolute; TOP: 75px;display:none;"> <TABLE width=100%><TR><TD class=control><table style="display:block;width:100%" border=0 cellpadding=1 cellspacing=1 background="#000000"> <TBODY><TR class=item><TH class=item noWrap align=left width="10%">Sl.No</TH><TH class=item noWrap align=left>File Names</TH></TR></TBODY></table></TD></TR></TABLE></div><div id="Buttons" style="LEFT: 42px; POSITION: absolute; TOP: 250px;display:block;"> <table width=100% align><tr><td width=10%><form method=GET action="aep://FileOpenExisting|dummy"><input type=submit class=button value='Open Existing File'></form></td> <td><form method=GET action="aep://FileNew|dummy"><input type=submit class=button value='Create New File'></form></td></tr></table></div></BODY> </HTML><script> function ShowTab(TabIndex) { for(i=0;i<Pages.length;i++) { tab(i).className="selected"; Pages(i).style.display="none"; } tab(parseInt(TabIndex)).className="button"; Pages(parseInt(TabIndex)).style.display="block"; } </script> \ No newline at end of file |
From: <td...@us...> - 2003-07-22 04:44:56
|
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1:/tmp/cvs-serv13410 Modified Files: AnyEdit.exe Log Message: Beta 2.0 Index: AnyEdit.exe =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/AnyEdit.exe,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsnrnRvZ and /tmp/cvsWzkPXS differ |
Update of /cvsroot/anyedit/AnyEditv2/Plugins/Diff In directory sc8-pr-cvs1:/tmp/cvs-serv2505/Plugins/Diff Added Files: Diff.aps Diff.clw Diff.cpp Diff.def Diff.dsp Diff.dsw Diff.ncb Diff.opt Diff.plg Diff.rc DiffDlg.cpp DiffDlg.h DiffEngine.cpp DiffEngine.h FilePartition.cpp FilePartition.h ReadMe.txt Resource.h StdAfx.cpp StdAfx.h Templates.h Log Message: Added Initial plugin support Added diff plugin --- NEW FILE: Diff.aps --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Diff.clw --- ; CLW file contains information for the MFC ClassWizard [General Info] Version=1 ClassCount=1 ResourceCount=1 NewFileInclude1=#include "stdafx.h" Class1=CDiffDlg LastClass=CDiffDlg LastTemplate=CDialog Resource1=IDD_DIALOG1 [DLG:IDD_DIALOG1] Type=1 Class=CDiffDlg ControlCount=9 Control1=IDOK,button,1342242817 Control2=IDCANCEL,button,1342242816 Control3=ID_EDIT1,edit,1350631552 Control4=ID_EDIT2,edit,1350631552 Control5=ID_BUTTON1,button,1342242816 Control6=ID_BUTTON2,button,1342242816 Control7=ID_CHECK1,button,1342242819 Control8=ID_CHECK2,button,1342242819 Control9=65535,button,1342177287 [CLS:CDiffDlg] Type=0 HeaderFile=DiffDlg.h ImplementationFile=DiffDlg.cpp BaseClass=CDialog Filter=D LastObject=IDOK VirtualFilter=dWC --- NEW FILE: Diff.cpp --- // Diff.cpp : Defines the initialization routines for the DLL. // #include "stdafx.h" #include <afxdllx.h> #include "../../Plugin.h" #include "DiffDlg.h" #include "Resource.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif static AFX_EXTENSION_MODULE DiffDLL = { NULL, NULL }; extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { // Remove this if you use lpReserved UNREFERENCED_PARAMETER(lpReserved); if (dwReason == DLL_PROCESS_ATTACH) { TRACE0("DIFF.DLL Initializing!\n"); // Extension DLL one-time initialization if (!AfxInitExtensionModule(DiffDLL, hInstance)) return 0; // Insert this DLL into the resource chain // NOTE: If this Extension DLL is being implicitly linked to by // an MFC Regular DLL (such as an ActiveX Control) // instead of an MFC application, then you will want to // remove this line from DllMain and put it in a separate // function exported from this Extension DLL. The Regular DLL // that uses this Extension DLL should then explicitly call that // function to initialize this Extension DLL. Otherwise, // the CDynLinkLibrary object will not be attached to the // Regular DLL's resource chain, and serious problems will // result. new CDynLinkLibrary(DiffDLL); } else if (dwReason == DLL_PROCESS_DETACH) { TRACE0("DIFF.DLL Terminating!\n"); // Terminate the library before destructors are called AfxTermExtensionModule(DiffDLL); } return 1; // ok } extern "C" int EntryFunction(CPlugin * plugin) { CDiffDlg dlg; dlg.SetPlugin(plugin); dlg.DoModal(); //plugin->OpenUrl("http://www.google.com"); return 0; } --- NEW FILE: Diff.def --- ; Diff.def : Declares the module parameters for the DLL. LIBRARY "Diff" DESCRIPTION 'Diff Windows Dynamic Link Library' EXPORTS ; Explicit exports can go here EntryFunction --- NEW FILE: Diff.dsp --- # Microsoft Developer Studio Project File - Name="Diff" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=Diff - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "Diff.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "Diff.mak" CFG="Diff - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "Diff - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "Diff - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "Diff - Win32 Release" # PROP BASE Use_MFC 6 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 6 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_AFXEXT" /Yu"stdafx.h" /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" # ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386 # ADD LINK32 /nologo /subsystem:windows /dll /machine:I386 /out:"../../bin/Plugins/Diff.dll" !ELSEIF "$(CFG)" == "Diff - Win32 Debug" # PROP BASE Use_MFC 6 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 6 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_AFXEXT" /Yu"stdafx.h" /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" # ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "Diff - Win32 Release" # Name "Diff - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Group "diffengine" # PROP Default_Filter "" # Begin Source File SOURCE=.\DiffEngine.cpp # End Source File # Begin Source File SOURCE=.\DiffEngine.h # End Source File # Begin Source File SOURCE=.\FilePartition.cpp # End Source File # Begin Source File SOURCE=.\FilePartition.h # End Source File # End Group # Begin Source File SOURCE=.\Diff.cpp # End Source File # Begin Source File SOURCE=.\Diff.def # End Source File # Begin Source File SOURCE=.\Diff.rc # End Source File # Begin Source File SOURCE=.\DiffDlg.cpp # End Source File # Begin Source File SOURCE=.\StdAfx.cpp # ADD CPP /Yc"stdafx.h" # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\DiffDlg.h # End Source File # Begin Source File SOURCE=.\Resource.h # End Source File # Begin Source File SOURCE=.\StdAfx.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # Begin Source File SOURCE=.\res\Diff.rc2 # End Source File # End Group # Begin Source File SOURCE=.\ReadMe.txt # End Source File # End Target # End Project --- NEW FILE: Diff.dsw --- Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "Diff"=.\Diff.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### --- NEW FILE: Diff.ncb --- Microsoft C/C++ program database 2.00 --- NEW FILE: Diff.opt --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Diff.plg --- <html> <body> <pre> <h1>Build Log</h1> <h3> --------------------Configuration: Diff - Win32 Release-------------------- </h3> <h3>Command Lines</h3> <h3>Results</h3> Diff.dll - 0 error(s), 0 warning(s) </pre> </body> </html> --- NEW FILE: Diff.rc --- //Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" "#ifdef _WIN32\r\n" "LANGUAGE 9, 1\r\n" "#pragma code_page(1252)\r\n" "#endif //_WIN32\r\n" "#include ""res\\Diff.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904B0" BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "Diff DLL\0" VALUE "FileVersion", "1, 0, 0, 1\0" VALUE "InternalName", "Diff\0" VALUE "LegalCopyright", "Copyright (C) 2003\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "Diff.DLL\0" VALUE "ProductName", "Diff Dynamic Link Library\0" VALUE "ProductVersion", "1, 0, 0, 1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_DIALOG1 DIALOGEX 0, 0, 283, 82 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "diff tool" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "Diff",IDOK,171,61,50,14 PUSHBUTTON "Cancel",IDCANCEL,226,61,50,14 EDITTEXT ID_EDIT1,7,13,253,12,ES_AUTOHSCROLL EDITTEXT ID_EDIT2,7,31,253,12,ES_AUTOHSCROLL PUSHBUTTON "...",ID_BUTTON1,261,13,15,12,0,WS_EX_CLIENTEDGE PUSHBUTTON "...",ID_BUTTON2,261,31,15,12,0,WS_EX_CLIENTEDGE CONTROL "case",ID_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, 15,60,41,11 CONTROL "indent",ID_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, 60,60,42,11 GROUPBOX "Options",-1,7,50,97,25 END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_DIALOG1, DIALOG BEGIN LEFTMARGIN, 7 TOPMARGIN, 7 END END #endif // APSTUDIO_INVOKED #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE 9, 1 #pragma code_page(1252) #endif //_WIN32 #include "res\Diff.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED --- NEW FILE: DiffDlg.cpp --- // DiffDlg.cpp : implementation file // #include "stdafx.h" #include "Resource.h" #include "DiffDlg.h" #include "FilePartition.h" #include "DiffEngine.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDiffDlg dialog CDiffDlg::CDiffDlg(CWnd* pParent /*=NULL*/) : CDialog(CDiffDlg::IDD, pParent) { //{{AFX_DATA_INIT(CDiffDlg) m_bCheckCase = FALSE; m_bCheckIndent = FALSE; m_szFile1 = _T(""); m_szFile2 = _T(""); //}}AFX_DATA_INIT } void CDiffDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDiffDlg) DDX_Check(pDX, ID_CHECK1, m_bCheckCase); DDX_Check(pDX, ID_CHECK2, m_bCheckIndent); DDX_Text(pDX, ID_EDIT1, m_szFile1); DDX_Text(pDX, ID_EDIT2, m_szFile2); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDiffDlg, CDialog) //{{AFX_MSG_MAP(CDiffDlg) ON_BN_CLICKED(ID_BUTTON1, OnButton1) ON_BN_CLICKED(65535, On65535) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDiffDlg message handlers BOOL FileExists(CString &szFilename) { BOOL bFound = FALSE; WIN32_FIND_DATA findFile; HANDLE hContext; hContext=::FindFirstFile(szFilename.GetBuffer(0), &findFile); if ( hContext != INVALID_HANDLE_VALUE ) { ::FindClose(hContext); bFound = TRUE; } return bFound; } BOOL IsAFolder(CString &szFilename) { if (!FileExists(szFilename)) return FALSE; BOOL bIsADirectory = FALSE; WIN32_FIND_DATA findFile; HANDLE hContext; hContext=::FindFirstFile(szFilename.GetBuffer(0), &findFile); if ( hContext != INVALID_HANDLE_VALUE ) { if (findFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) bIsADirectory = TRUE; ::FindClose(hContext); } return bIsADirectory; } BOOL DoDiff(BOOL bSilentMode, CString &szFile1, CString &szFile2, CString &szOutfile, CFileOptions &o) { // make sure those files exist if ( !FileExists(szFile1) ) { TCHAR szError[MAX_PATH]; sprintf(szError, _T("%s does not exist."), szFile1.GetBuffer(0) ); AfxMessageBox(szError); return FALSE; } if ( !FileExists(szFile2) ) { TCHAR szError[MAX_PATH]; sprintf(szError, _T("%s does not exist."), szFile2.GetBuffer(0) ); AfxMessageBox(szError); return FALSE; } CFilePartition f1; CFilePartition f2; BOOL bFile1IsAFolder = IsAFolder(szFile1); BOOL bFile2IsAFolder = IsAFolder(szFile2); if ( bFile1IsAFolder && bFile2IsAFolder ) { // process folders f1.PreProcessFolder( szFile1, o ); f2.PreProcessFolder( szFile2, o ); } else if ( !bFile1IsAFolder && !bFile2IsAFolder) { // process files f1.PreProcess( szFile1, o ); f2.PreProcess( szFile2, o ); } else { // error (folder and a file cannot match, anyway) TCHAR szError[MAX_PATH]; sprintf(szError, _T("%s cannot be compared with %s."), szFile1.GetBuffer(0), szFile2.GetBuffer(0) ); AfxMessageBox(szError); return FALSE; } CFilePartition f1_bis, f2_bis; CDiffEngine d; d.Diff(f1,f2,f1_bis,f2_bis); if ( szOutfile.IsEmpty() ) // default output file for GUI mode szOutfile = "out.html"; d.MySerialize(szOutfile,f1_bis, f2_bis); // open with the default browser if (!bSilentMode) ::ShellExecute(NULL, "open", szOutfile.GetBuffer(0), NULL, NULL, SW_SHOW); return TRUE; } BOOL ExtractFiles(CFileDialog &fd, CString &f1, CString &f2) { if ( fd.m_ofn.lpstrFile[0]=='\0' ) return FALSE; // struct was not used // get directory CString szDir = fd.m_ofn.lpstrFile; // get first file CString szFile1 = fd.m_ofn.lpstrFile + fd.m_ofn.nFileOffset; szFile1 = szDir + "\\" + szFile1; TCHAR *p = fd.m_ofn.lpstrFile + fd.m_ofn.nFileOffset; if (*p==0) return FALSE; while ( *p ) p++; p++; // do we have a double 0 ? if (*p==0) return FALSE; // so, only one file was selected CString szFile2 = p; szFile2 = szDir + "\\" + szFile2; f1 = szFile2; f2 = szFile1; return TRUE; } void CDiffDlg::OnButton1() { UpdateData(TRUE); // update the DDX variables // show open file dialog, and let choose one or more files CFileDialog my_dialog(TRUE,NULL,NULL,OFN_ALLOWMULTISELECT|OFN_FILEMUSTEXIST|OFN_EXPLORER/*flags*/,NULL); my_dialog.m_ofn.lpstrFile = (TCHAR*) malloc( 2*MAX_PATH*sizeof(TCHAR) ); memset( my_dialog.m_ofn.lpstrFile, 0, 2*MAX_PATH*sizeof(TCHAR) ); my_dialog.m_ofn.nMaxFile = 2*MAX_PATH; // number of chars, not number of bytes if (my_dialog.DoModal()==IDOK) { // do we have two files selected ? if (!ExtractFiles(my_dialog, m_szFile1, m_szFile2) ) { UpdateData(TRUE); // update the DDX variables m_szFile1=my_dialog.GetPathName(); UpdateData(FALSE); // update the dialog box } else UpdateData(FALSE); // update the dialog box } free( my_dialog.m_ofn.lpstrFile ); } void CDiffDlg::On65535() { UpdateData(TRUE); // update the DDX variables // show open file dialog, and let choose one or more files CFileDialog my_dialog(TRUE,NULL,NULL,OFN_ALLOWMULTISELECT|OFN_FILEMUSTEXIST|OFN_EXPLORER/*flags*/,NULL); my_dialog.m_ofn.lpstrFile = (TCHAR*) malloc( 2*MAX_PATH*sizeof(TCHAR) ); memset( my_dialog.m_ofn.lpstrFile, 0, 2*MAX_PATH*sizeof(TCHAR) ); my_dialog.m_ofn.nMaxFile = 2*MAX_PATH; // number of chars, not number of bytes if (my_dialog.DoModal()==IDOK) { // do we have two files selected ? if (!ExtractFiles(my_dialog, m_szFile1, m_szFile2) ) { UpdateData(TRUE); // update the DDX variables m_szFile2=my_dialog.GetPathName(); UpdateData(FALSE); // update the dialog box } else UpdateData(FALSE); // update the dialog box } free( my_dialog.m_ofn.lpstrFile ); } void CDiffDlg::OnOK() { UpdateData(TRUE); // update the DDX variables CFileOptions o; if (!m_bCheckCase) o.SetOption( CString("case"), CString("no") ); if (!m_bCheckIndent) o.SetOption( CString("indent"), CString("no") ); CString app_path = parent_plugin->GetAppPath(); app_path+= "Temp\\Diff.html"; if(DoDiff(TRUE, m_szFile1, m_szFile2, app_path, o)) { parent_plugin->OpenUrl(app_path); CDialog::OnOK(); } } void CDiffDlg::SetPlugin(CPlugin *plugin) { parent_plugin = plugin; } --- NEW FILE: DiffDlg.h --- #if !defined(AFX_DIFFDLG_H__2B1B4FCC_CCB6_470E_8FCF_F3D3A802CE45__INCLUDED_) #define AFX_DIFFDLG_H__2B1B4FCC_CCB6_470E_8FCF_F3D3A802CE45__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // DiffDlg.h : header file // #include "../../plugin.h" #include "Resource.h" ///////////////////////////////////////////////////////////////////////////// // CDiffDlg dialog class CDiffDlg : public CDialog { // Construction public: void SetPlugin(CPlugin * plugin); CDiffDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CDiffDlg) enum { IDD = IDD_DIALOG1 }; BOOL m_bCheckCase; BOOL m_bCheckIndent; CString m_szFile1; CString m_szFile2; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDiffDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: CPlugin * parent_plugin; // Generated message map functions //{{AFX_MSG(CDiffDlg) afx_msg void OnButton1(); afx_msg void On65535(); virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_DIFFDLG_H__2B1B4FCC_CCB6_470E_8FCF_F3D3A802CE45__INCLUDED_) --- NEW FILE: DiffEngine.cpp --- #include "stdafx.h" #include "FilePartition.h" #include "DiffEngine.h" CDiffEngine::CDiffEngine() { m_szColorText = "#888888"; // default colors m_szColorBackground = "white"; m_szColorChanged = "#FFFFBB"; m_szColorAdded = "#BBFFBB"; m_szColorDeleted = "#FFBBBB"; m_szFooter = "<br><font size='-2' color='#BBBBBB'>AnyEdit Diff Plugin - S.Rodriguez</font>"; } // compare f1 (old version) with f2 (new version) // and build two new copies of those file objects with status on a line by line basis // BOOL CDiffEngine::Diff( /*in*/CFilePartition &f1, /*in*/CFilePartition &f2, /*out*/CFilePartition &f1_bis, /*out*/CFilePartition &f2_bis) { f1_bis.SetName( f1.GetName() ); f2_bis.SetName( f2.GetName() ); long nbf1Lines = f1.GetNBLines(); long nbf2Lines = f2.GetNBLines(); // special empty file case if ( nbf1Lines==0 ) { long nLinef2 = 0; CString s; while ( nLinef2<nbf2Lines ) { f1_bis.AddBlankLine(); f2_bis.AddString( f2.GetRawLine(nLinef2++), Normal); } return TRUE; } long i = 0; long nf2CurrentLine = 0; while ( i<nbf1Lines ) { // process this line (and possibly update indexes as well) long nLinef2 = nf2CurrentLine; if ( nLinef2 >= nbf2Lines ) { // it's time to end the game now while ( i < nbf1Lines ) { f1_bis.AddString( f1.GetRawLine(i), Deleted); f2_bis.AddBlankLine(); i++; } break; } if ( f1.MatchLine(i, f2, /*out*/nLinef2) ) { BOOL bDeleted = FALSE; if (nLinef2 > nf2CurrentLine) { long itmp = nf2CurrentLine; bDeleted = f2.MatchLine(nf2CurrentLine, f1, /*out*/itmp) && (itmp<nLinef2); if (bDeleted) { long j = itmp - i; if(j>0) { while ( j>0 ) { f1_bis.AddString( f1.GetRawLine(i), Deleted); f2_bis.AddBlankLine(); i++; j--; } } else { i++; } // please note nf2CurrentLine is not updated continue; // jump here to loop iteration } } // matched, so either the lines were identical, or f2 has added one or more lines if (nLinef2 > nf2CurrentLine) { // add blank lines to f1_bis long j = nLinef2 - nf2CurrentLine; while ( j>0 ) { f1_bis.AddBlankLine(); f2_bis.AddString( f2.GetRawLine(nLinef2-j), Added ); j--; } } // exactly matched f1_bis.AddString( f1.GetRawLine(i), Normal); f2_bis.AddString( f2.GetRawLine(nLinef2), Normal); nf2CurrentLine = nLinef2 + 1; // next line in f2 } else { // this line is not found at all in f2, either it's because it has been changed, or even deleted long nLinef1 = i; if ( f2.MatchLine(nLinef2, f1, /*out*/nLinef1) ) { // the dual line in f2 can be found in f1, that's because // the current line in f1 has been deleted f1_bis.AddString( f1.GetRawLine(i), Deleted); f2_bis.AddBlankLine(); // this whole block is flagged as deleted if (nLinef1>i+1) { long j = nLinef1 - (i+1); while ( j>0 ) { i++; f1_bis.AddString( f1.GetRawLine(i), Deleted); f2_bis.AddBlankLine(); j--; } } // note : nf2CurrentLine is not incremented } else { // neither added, nor deleted, so it's flagged as changed f1_bis.AddString( f1.GetRawLine(i), Changed); f2_bis.AddString( f2.GetRawLine(nLinef2), Changed); nf2CurrentLine = nLinef2 + 1; // next line in f2 } } i++; // next line in f1 } // are there any remaining lines from f2? while ( nf2CurrentLine < nbf2Lines ) { f1_bis.AddBlankLine(); f2_bis.AddString( f2.GetRawLine(nf2CurrentLine), Added ); nf2CurrentLine++; } return TRUE; } // build html report // void CDiffEngine::SetTitles(CString &szHeader, CString &szFooter) { m_szHeader = szHeader; m_szFooter = szFooter; } void CDiffEngine::SetColorStyles(CString &szText, CString &szBackground, CString &szChanged, CString &szAdded, CString &szDeleted) { m_szColorText = szText; m_szColorBackground = szBackground; m_szColorChanged = szChanged; m_szColorAdded = szAdded; m_szColorDeleted = szDeleted; } CString CDiffEngine::Serialize( /*in*/CFilePartition &f1, /*in*/CFilePartition &f2) { // eval amount of differences between the two files int nAdded_f1, nChanged_f1, nDeleted_f1; f1.HowManyChanges(/*out*/nAdded_f1, /*out*/nChanged_f1, /*out*/nDeleted_f1); int nAdded_f2, nChanged_f2, nDeleted_f2; f2.HowManyChanges(/*out*/nAdded_f2, /*out*/nChanged_f2, /*out*/nDeleted_f2); int nTotal = nAdded_f1 + nDeleted_f1 + nChanged_f1 + nAdded_f2 + nDeleted_f2; if (nTotal==0) m_szHeader += "<font size=-1><b>Files are identical.</font><br>"; else { TCHAR szTmp[128]; sprintf(szTmp,"<font size=-1><b>%d changes between the files.</font><br>", nTotal); m_szHeader += szTmp; } // write html header CString s = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n" \ "<!-- diff html gen, (c) Stephane Rodriguez - feb 2003 -->\r\n" \ "<HTML>\r\n" \ "<HEAD>\r\n" \ "<TITLE> File Diff </TITLE>\r\n" \ "<style type='text/css'>\r\n"\ "<!--\r\n" \ ".N { background-color:white; }\r\n" \ ".C { background-color:" + m_szColorChanged + "; }\r\n" \ ".A { background-color:" + m_szColorAdded + "; }\r\n" \ ".D { background-color:" + m_szColorDeleted + "; }\r\n" \ "-->\r\n" \ "</style>\r\n" \ "</HEAD>\r\n" \ "\r\n" \ "<BODY BGCOLOR='#FFFFFF'>\r\n" \ "\r\n" + m_szHeader + \ "<table border=0 bgcolor=0 cellpadding=1 cellspacing=1 width=100%><tr><td>\r\n" \ "<table width=100% bgcolor=white border=0 cellpadding=0 cellspacing=0>\r\n" \ "<tr bgColor='#EEEEEE' style='color:0'><td width=50%>old version</td><td width=50%>new version" \ " (<b style='background-color:" + m_szColorChanged + ";width:20'> </b>changed " \ "<b style='background-color:" + m_szColorAdded + ";width:20'> </b>added " \ "<b style='background-color:" + m_szColorDeleted + ";width:20'> </b>deleted) " \ "<FORM ACTION='' style='display:inline'><SELECT id='fontoptions' " \ "onchange='maintable.style.fontSize=this.options[this.selectedIndex].value'>" \ "<option value='6pt'>6pt<option value='7pt'>7pt<option value='8pt'>8pt<option value='9pt' selected>9pt</SELECT> " \ "</FORM></td></tr>\r\n" \ "<tr bgColor='#EEEEEE' style='color:0'><td width=50%><code>" + f1.GetName() + "</code></td><td width=50%><code>" + f2.GetName() + "</code></td></tr>" \ "</table>\r\n" \ "</td></tr>\r\n" \ "</table>\r\n" \ "\r\n" \ "<br>\r\n" \ "\r\n" ; long nbLines = f1.GetNBLines(); if (nbLines==0) { s += "<br>empty files"; } else { s += "<table border=0 bgcolor=0 cellpadding=1 cellspacing=1 width=100%><tr><td>" \ "<table id='maintable' width=100% bgcolor='" + m_szColorBackground + "' cellpadding=0 cellspacing=0 border=0 style='color:" + m_szColorText + ";font-family: Courier New, Helvetica, sans-serif; font-size: 8pt'>\r\n"; } char *arrStatus[4] = { "", " class='C'", " class='A'", " class='D'" }; CString sc; TCHAR szLine[16]; // write content // for (long i=0; i<nbLines; i++) { sprintf(szLine, "<b>%d</b>", i); sc += "<tr><td width=50%" + CString(arrStatus[ f1.GetStatusLine(i) ]) + ">" + CString(szLine) + " " + Escape(f1.GetRawLine(i)) + "</td>"; sc += "<td width=50%" + CString(arrStatus[ f2.GetStatusLine(i) ]) + ">" + CString(szLine) + " " + Escape(f2.GetRawLine(i)) + "</td></tr>"; } // for i s += sc; if (nbLines>0) s += "</table></td></tr></table>\r\n"; // write html footer s += m_szFooter + "</BODY>\r\n" \ "</HTML>\r\n"; return s; } CString CDiffEngine::Escape(CString &s) // a helper aimed to make sure tag symbols are passed as content { CString o; long nSize = s.GetLength(); if (nSize==0) return CString(" "); TCHAR c; BOOL bIndentation = TRUE; for (long i=0; i<nSize; i++) { c = s.GetAt(i); if (bIndentation && (c==' ' || c=='\t')) { if (c==' ') o += " "; else o += " "; continue; } bIndentation = FALSE; if (c=='<') o += "<"; else if (c=='>') o += ">"; else if (c=='&') o += "&"; else o += c; } return o; } BOOL CDiffEngine::ExportAsHtml(/*in*/CString &szFilename, /*in*/CString &szContent) { /*CStdioFile f; if ( !f.Open(szFilename, CFile::modeCreate | CFile::modeWrite | CFile::typeBinary) ) { TCHAR szError[MAX_PATH]; sprintf(szError, "error : cannot create %s\r\n", szFilename.GetBuffer(0) ); OutputDebugString(szError); return FALSE; } f.Write(szContent.GetBuffer(0), szContent.GetLength()); f.Close();*/ FILE * fp; fp = fopen(szFilename,"rw"); fprintf(fp,"%s",szContent); fclose(fp); return TRUE; } BOOL CDiffEngine::ExportAsStdout(/*in*/CString &szContent) { printf ("%s", szContent.GetBuffer(0)); return TRUE; } void CDiffEngine::MySerialize(LPCSTR fname, CFilePartition &f1, CFilePartition &f2) { FILE * fp = fopen(fname,"w+"); // eval amount of differences between the two files int nAdded_f1, nChanged_f1, nDeleted_f1; f1.HowManyChanges(/*out*/nAdded_f1, /*out*/nChanged_f1, /*out*/nDeleted_f1); int nAdded_f2, nChanged_f2, nDeleted_f2; f2.HowManyChanges(/*out*/nAdded_f2, /*out*/nChanged_f2, /*out*/nDeleted_f2); int nTotal = nAdded_f1 + nDeleted_f1 + nChanged_f1 + nAdded_f2 + nDeleted_f2; if (nTotal==0) m_szHeader += "<font size=-1><b>Files are identical.</font><br>"; else { TCHAR szTmp[128]; sprintf(szTmp,"<font size=-1><b>%d changes between the files.</font><br>", nTotal); m_szHeader += szTmp; } // write html header CString s = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n" \ "<!-- diff html gen, (c) Stephane Rodriguez - feb 2003 -->\r\n" \ "<HTML>\r\n" \ "<HEAD>\r\n" \ "<TITLE> File Diff </TITLE>\r\n" \ "<style type='text/css'>\r\n"\ "<!--\r\n" \ ".N { background-color:white; }\r\n" \ ".C { background-color:" + m_szColorChanged + "; }\r\n" \ ".A { background-color:" + m_szColorAdded + "; }\r\n" \ ".D { background-color:" + m_szColorDeleted + "; }\r\n" \ "-->\r\n" \ "</style>\r\n" \ "</HEAD>\r\n" \ "\r\n" \ "<BODY BGCOLOR='#FFFFFF'>\r\n" \ "\r\n" + m_szHeader + \ "<table border=0 bgcolor=0 cellpadding=1 cellspacing=1 width=100%><tr><td>\r\n" \ "<table width=100% bgcolor=white border=0 cellpadding=0 cellspacing=0>\r\n" \ "<tr bgColor='#EEEEEE' style='color:0'><td width=50%>old version</td><td width=50%>new version" \ " (<b style='background-color:" + m_szColorChanged + ";width:20'> </b>changed " \ "<b style='background-color:" + m_szColorAdded + ";width:20'> </b>added " \ "<b style='background-color:" + m_szColorDeleted + ";width:20'> </b>deleted) " \ "<FORM ACTION='' style='display:inline'><SELECT id='fontoptions' " \ "onchange='maintable.style.fontSize=this.options[this.selectedIndex].value'>" \ "<option value='6pt'>6pt<option value='7pt'>7pt<option value='8pt'>8pt<option value='9pt' selected>9pt</SELECT> " \ "</FORM></td></tr>\r\n" \ "<tr bgColor='#EEEEEE' style='color:0'><td width=50%><code>" + f1.GetName() + "</code></td><td width=50%><code>" + f2.GetName() + "</code></td></tr>" \ "</table>\r\n" \ "</td></tr>\r\n" \ "</table>\r\n" \ "\r\n" \ "<br>\r\n" \ "\r\n" ; long nbLines = f1.GetNBLines(); if (nbLines==0) { s += "<br>empty files"; } else { s += "<table border=0 bgcolor=0 cellpadding=1 cellspacing=1 width=100%><tr><td>" \ "<table id='maintable' width=100% bgcolor='" + m_szColorBackground + "' cellpadding=0 cellspacing=0 border=0 style='color:" + m_szColorText + ";font-family: Courier New, Helvetica, sans-serif; font-size: 8pt'>\r\n"; } fprintf(fp,"%s",s); char *arrStatus[4] = { "", " class='C'", " class='A'", " class='D'" }; CString sc; TCHAR szLine[16]; // write content // for (long i=0; i<nbLines; i++) { sprintf(szLine, "<b>%d</b>", i); sc = "<tr><td width=50%" + CString(arrStatus[ f1.GetStatusLine(i) ]) + ">" + CString(szLine) + " " + Escape(f1.GetRawLine(i)) + "</td>"; sc += "<td width=50%" + CString(arrStatus[ f2.GetStatusLine(i) ]) + ">" + CString(szLine) + " " + Escape(f2.GetRawLine(i)) + "</td></tr>"; fprintf(fp,"%s",sc); } // for i if (nbLines>0) s = "</table></td></tr></table>\r\n"; else s = ""; // write html footer s += m_szFooter + "</BODY>\r\n" \ "</HTML>\r\n"; fprintf(fp,"%s",s); fclose(fp); } --- NEW FILE: DiffEngine.h --- #pragma once // DiffEngine //////////////////////////////////////////////////////// // // ////////////////////////////////////////////////////////////////////// // S.Rodriguez - Feb 2003 ////////////////////////////////////////////////////////////////////// // // class CDiffEngine { // Members protected: CString m_szColorText, m_szColorBackground, m_szColorChanged, m_szColorAdded, m_szColorDeleted; // used by the html renderer CString m_szHeader, m_szFooter; // Constructor public: CDiffEngine(); // Accessors public: void MySerialize(LPCSTR fname,CFilePartition &f1,CFilePartition &f2); // Methods // compare f1 (old version) with f2 (new version) // and build two new copies of those file objects with status on a line by line basis // BOOL Diff( /*in*/CFilePartition &f1, /*in*/CFilePartition &f2, /*out*/CFilePartition &f1_bis, /*out*/CFilePartition &f2_bis); // build html report // void SetTitles(/*in*/CString &szHeader, /*in*/CString &szFooter); void SetColorStyles(/*in*/CString &szText, /*in*/CString &szBackground, /*in*/CString &szChanged, /*in*/CString &szAdded, /*in*/CString &szDeleted); CString Serialize( /*in*/CFilePartition &f1, /*in*/CFilePartition &f2); BOOL ExportAsHtml(/*in*/CString &szFilename, /*in*/CString &szContent); BOOL ExportAsStdout(/*in*/CString &szContent); // Helpers protected: CString Escape(CString &s); }; --- NEW FILE: FilePartition.cpp --- #include "stdafx.h" #include "FilePartition.h" // CFileLine /////////////////////////////////////////////////// // // // Constructor CFileLine::CFileLine() { SetStatus(Normal); } // Accessors long CFileLine::SetLine(/*in*/CString &s, /*in*/CFileOptions &o) // store string and build token { m_s = s; CString so = GetLineWithOptions(s,o); long nToken = 0; long nLength = so.GetLength(); TCHAR *lpString = so.GetBuffer(0); for (long i=0; i<nLength; i++) nToken += 2*nToken + *(lpString++); // (George V. Reilly hint) return nToken; } void CFileLine::SetLine(/*in*/CString &s, /*in*/LineStatus ls) // store string and status (does not eval ID) { m_s = s; SetStatus(ls); } CString CFileLine::GetLine(/*in*/CFileOptions &o) { if ( o.IsDefaultOptions() ) return m_s; else return GetLineWithOptions(m_s,o); } CString CFileLine::GetLineWithOptions(/*in*/CString s,/*in*/CFileOptions &o) { if ( o.IsDefaultOptions() ) return s; CString so = s; // should we take care about indentation differences ? CString szIndentoption = o.GetOption( CString("indent") ); if ( !szIndentoption.IsEmpty() && szIndentoption!="yes") { // no, then remove all 09 and 20 chars from the begin of the string long nSize = so.GetLength(); if (nSize>0) { TCHAR c; BOOL bIndentation = TRUE; for (long i=0; i<nSize && bIndentation; i++) { c = so.GetAt(i); if (c!=0x20 && c!=0x09) bIndentation = FALSE; } so = bIndentation ? so : so.Right( so.GetLength()+1 - i); } } // should we care about case differences ? CString szCaseoption = o.GetOption( CString("case") ); if ( !szCaseoption.IsEmpty() && szCaseoption!="yes") { // no, then make sure we lower the case so.MakeLower(); } return so; } void CFileLine::SetStatus(/*in*/LineStatus ls) { m_status = ls; } LineStatus CFileLine::GetStatus() { return m_status; } // CFileOptions ///////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////// // S.Rodriguez - Feb 2003 ///////////////////////////////////////////////////////////////////// // // CFileOptions::CFileOptions() { } // Accessors void CFileOptions::SetOption(/*in*/CString &szOptionName, /*in*/CString &szOptionValue) { // is it a new option ? long nSize = arrOptions.GetSize(); BOOL bFound = FALSE; for (long i=0; i<nSize && !bFound; i++) { CString s = arrOptions.GetAt(i); if (!s.IsEmpty() && s.Find(szOptionName,0)==0) { bFound = TRUE; long n = s.Find(';',0); if (n>-1) s = s.Left(n) + ";" + szOptionValue; else s = s + ";" + szOptionValue; arrOptions.SetAt(i, s); } } // for if (!bFound) { CString s = szOptionName + ";" + szOptionValue; arrOptions.Add(s); } } CString CFileOptions::GetOption(/*in*/CString &szOptionName) { long nSize = arrOptions.GetSize(); for (long i=0; i<nSize; i++) { CString s = arrOptions.GetAt(i); if (!s.IsEmpty() && s.Find(szOptionName,0)==0) { long n = s.Find(';',0); if (n>-1) return s.Right( s.GetLength() - (n+1) ); else return CString(""); } } // for return CString(""); } BOOL CFileOptions::IsDefaultOptions() { return GetOptionCount()==0; } long CFileOptions::GetOptionCount() { return arrOptions.GetSize(); } CString CFileOptions::GetOption(long i) { return (i>=0 && i<GetOptionCount()) ? arrOptions.GetAt(i) : CString(""); } // Methods void CFileOptions::Copy(CFileOptions &src) { long nbOptions = src.GetOptionCount(); for (long i=0; i<nbOptions; i++) arrOptions.Add( src.GetOption(i) ); } // CFilePartition /////////////////////////////////////////////////// // // CFilePartition::CFilePartition() { } CFilePartition::~CFilePartition() { // remember to destroy those CFileLine objects long nSize = GetNBLines(); for (long i=0; i<nSize; i++) delete m_arrLines.GetAt(i); } void CFilePartition::SetName(CString &szName) { m_szFilename = szName; } CString CFilePartition::GetName() { return m_szFilename; } void CFilePartition::SetOptions(/*in*/CFileOptions &options) { m_options.Copy(options); } long CFilePartition::GetNBLines() { return m_arrLines.GetSize(); } CString CFilePartition::GetLine(/*in*/long i) { ASSERT( i>=0 && i<GetNBLines()); CFileLine *pLine = NULL; if (i>=0 && i<GetNBLines()) pLine = m_arrLines.GetAt(i); return pLine ? pLine->GetLine(m_options) : CString(""); } CString CFilePartition::GetRawLine(/*in*/long i) // returns an arbitrary line (not filtered) { CFileOptions o; // default options ASSERT( i>=0 && i<GetNBLines()); CFileLine *pLine = NULL; if (i>=0 && i<GetNBLines()) pLine = m_arrLines.GetAt(i); return pLine ? pLine->GetLine(o) : CString(""); } LineStatus CFilePartition::GetStatusLine(/*in*/long i) { ASSERT( i>=0 && i<GetNBLines()); CFileLine *pLine = NULL; if (i>=0 && i<GetNBLines()) pLine = m_arrLines.GetAt(i); return pLine ? pLine->GetStatus() : Normal; } long *CFilePartition::GetTokens() { return m_arrTokens.GetData(); } void CFilePartition::HowManyChanges(/*out*/int &nAdded, /*out*/int &nChanged, /*out*/int &nDeleted) { nAdded = nChanged = nDeleted = 0; LineStatus currentStatus = Normal; CFileLine *pLine = NULL; long nSize = GetNBLines(); for (long i=0; i<nSize; i++) { pLine = m_arrLines.GetAt(i); if (!pLine) continue; LineStatus ls = pLine->GetStatus(); if (ls!=Normal && currentStatus!=ls) { switch (ls) { case Added: nAdded++; break; case Changed: nChanged++; break; case Deleted: nDeleted++; break; } } } // end for all lines } // PreProcess // // purpose : reads a file, on a line-by-line basis // BOOL CFilePartition::PreProcess(/*in*/CString &szFilename, /*in*/CFileOptions &options) { ASSERT( !szFilename.IsEmpty() ); if (szFilename.IsEmpty()) { OutputDebugString("error : empty input filename\r\n"); return FALSE; } SetName(szFilename); SetOptions(options); // read the file first, // and build the table of tokens CStdioFile f; if ( !f.Open(szFilename, CFile::modeRead) ) { TCHAR szError[MAX_PATH]; sprintf(szError, "error : cannot open %s\r\n", szFilename.GetBuffer(0) ); OutputDebugString(szError); return FALSE; } // CString s; while ( f.ReadString(s) ) AddString(s); f.Close(); return TRUE; } // PreProcessFolder // // purpose : list folders, files and subfolders // and then build a tree-like list out of it // BOOL CFilePartition::PreProcessFolder(/*in*/CString &szFolder, /*in*/CFileOptions &options) { SetName(szFolder); SetOptions(options); long nIndent = 0; // make sure there is no trailing backslash while (!szFolder.IsEmpty() && szFolder.GetAt( szFolder.GetLength()-1 )=='\\') szFolder = szFolder.Left( szFolder.GetLength()-1 ); return PreProcessFolder(szFolder, options, nIndent); } BOOL CFilePartition::PreProcessFolder(/*in*/CString &szFolder, /*in*/CFileOptions &options, /*in/out*/long nIndent) { if (szFolder.IsEmpty()) return FALSE; CSortedArray arrFiles; long i; CString szIndent; for (i=0; i<nIndent; i++) szIndent += " "; // add this folder CString szCurrentFolder = szFolder; int nBackSlash = szCurrentFolder.ReverseFind('\\'); if (nBackSlash>-1) szCurrentFolder = szCurrentFolder.Right( szCurrentFolder.GetLength()-(nBackSlash+1) ); // add the folder in the partition AddString( szIndent + "+ " + szCurrentFolder ); CString szFolderWildCard = szFolder + "\\*.*"; WIN32_FIND_DATA findFile; HANDLE hContext; hContext=::FindFirstFile(szFolderWildCard.GetBuffer(0), &findFile); if ( hContext != INVALID_HANDLE_VALUE ) { do { if (strcmp(findFile.cFileName,".")!=0 && strcmp(findFile.cFileName,"..")!=0) { if (findFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { // it's a folder // CString szSubFolder = szFolder + "\\" + findFile.cFileName; PreProcessFolder(szSubFolder, options, nIndent+1); } else { // it's a file // // GetInformationByHandle OFSTRUCT ofstruct; BY_HANDLE_FILE_INFORMATION infostruct; HFILE hFile = ::OpenFile(szFolder + "\\" + findFile.cFileName, &ofstruct, OF_READ | OF_SHARE_DENY_NONE); if (hFile!=HFILE_ERROR && ::GetFileInformationByHandle( (HANDLE)hFile, &infostruct) ) { SYSTEMTIME stCreate; // Convert the local file time from UTC to system time. FileTimeToSystemTime(&infostruct.ftLastWriteTime, &stCreate); TCHAR sDate[128]; sprintf(sDate, "%02d/%02d/%d %02d:%02d", stCreate.wDay, stCreate.wMonth, stCreate.wYear, stCreate.wHour, stCreate.wMinute); ::_lclose(hFile); arrFiles.InsertSorted( CString(findFile.cFileName + CString(" (") + sDate + ")") ); } } } } while ( ::FindNextFile(hContext, &findFile) ); ::FindClose(hContext); } // add all files at this point long nbFiles = arrFiles.GetSize(); for (i=0; i<nbFiles; i++) AddString( szIndent + " " + arrFiles.GetAt(i) ); return TRUE; } void CFilePartition::AddString(/*in*/CString &s, /*in*/LineStatus ls) { CFileLine *p = new CFileLine(); ASSERT(p); if (p) { p->SetLine(s, ls); m_arrLines.Add( p ); } } void CFilePartition::AddBlankLine() { AddString(CString(""), Normal); } void CFilePartition::AddString(/*in*/CString &s) { CFileLine *p = new CFileLine(); ASSERT(p); if (p) { m_arrTokens.Add( p->SetLine(s, m_options) ); m_arrLines.Add( p ); } } void CFilePartition::Dump(/*in*/CString &szTitle) { TCHAR s[MAX_PATH]; sprintf(s, "%s : %d lines\r\n\r\n", szTitle.GetBuffer(0), GetNBLines() ); OutputDebugString(s); long nSize = GetNBLines(); for (long i=0; i<nSize; i++) { LineStatus ls = GetStatusLine(i); if (ls==Normal) OutputDebugString("Normal "); else if (ls==Changed) OutputDebugString("Changed "); else if (ls==Added) OutputDebugString("Added "); else if (ls==Deleted) OutputDebugString("Deleted "); OutputDebugString( GetLine(i) ); OutputDebugString("\r\n"); } } BOOL CFilePartition::MatchLine(/*in*/long i1, /*in*/CFilePartition &f2, /*out*/long &i2) { ASSERT( m_arrTokens.GetSize()>0 ); if ( m_arrTokens.GetSize()==0 ) return FALSE; ASSERT( i1<GetNBLines() ); if ( i1>=GetNBLines() ) return FALSE; // should never happen though // try to match the current token from f1, into the a subset of f2 tokens // long nf1Token; nf1Token = m_arrTokens[i1]; long *pf2Tokens = f2.GetTokens(); if (!pf2Tokens) return FALSE; BOOL bFound = FALSE; long i = 0; long nf2SubsetLines = f2.GetNBLines() - i2; long *pf2Token = pf2Tokens + i2; // points to the right token while (!bFound && i<nf2SubsetLines) { if (nf1Token == *pf2Token) // fast compare { // make sure strings really match bFound = ( GetLine(i1).Compare( f2.GetLine(i2+i) )==0 ); } pf2Token++; i++; } i--; if (bFound) { i2 += i; return TRUE; } return FALSE; } --- NEW FILE: FilePartition.h --- #include "Templates.h" #pragma once typedef enum {Normal=0, Changed, Added, Deleted} LineStatus; class CFileLine; // forward declaration class CFileOptions; // forward declaration class CFilePartition; // forward declaration // CFileLine /////////////////////////////////////////////// // //////////////////////////////////////////////////////////// // S.Rodriguez - Feb 2003 //////////////////////////////////////////////////////////// // class CFileLine { // Members protected: CString m_s; LineStatus m_status; // Constructor public: CFileLine(); // Accessors public: long SetLine(/*in*/CString &s, /*in*/CFileOptions &o); // store string and build token void SetLine(/*in*/CString &s, /*in*/LineStatus ls); // store string and status (does not eval token) CString GetLine(/*in*/CFileOptions &o); void SetStatus(/*in*/LineStatus ls); LineStatus GetStatus(); // Helpers protected: CString GetLineWithOptions(/*in*/CString s,/*in*/CFileOptions &o); // that's where options are implemented }; typedef CTemplateArray<CFileLine*> ArrayLines; typedef CTemplateArray<long> ArrayLong; typedef CTemplateObjArray<CString> ArrayCString; // CFileOptions ///////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////// // S.Rodriguez - Feb 2003 ///////////////////////////////////////////////////////////////////// // // class CFileOptions { // Members protected: ArrayCString arrOptions; // "indent" : should the diff engine see differences in tabs/spaces (default = yes) // "case" : should the diff engine see case differences (default = yes) // how to use this class : // CFileOptions o; // o.SetOption("indent","yes"); // Constructor public: CFileOptions(); // Accessors public: void SetOption(/*in*/CString &szOptionName, /*in*/CString &szOptionValue); CString GetOption(/*in*/CString &szOptionName); BOOL IsDefaultOptions(); long GetOptionCount(); CString GetOption(long i); // Methods void Copy(CFileOptions &src); }; // CFilePartition /////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////// // S.Rodriguez - Feb 2003 ///////////////////////////////////////////////////////////////////// // // class CFilePartition { // Members protected: CString m_szFilename; CFileOptions m_options; ArrayLines m_arrLines; ArrayLong m_arrTokens; // Constructor public: CFilePartition(); virtual ~CFilePartition(); // Accessors public: void SetName(/*in*/CString &); CString GetName(); void SetOptions(/*in*/CFileOptions &options); long GetNBLines(); // amount of lines of this file CString GetLine(/*in*/long i); // returns an arbitrary line CString GetRawLine(/*in*/long i); // returns an arbitrary line (not filtered) LineStatus GetStatusLine(/*in*/long i); // returns the status of an arbitrary lin long *GetTokens(); // token table void HowManyChanges(/*out*/int &nAdded, /*out*/int &nChanged, /*out*/int &nDeleted); // Methods BOOL PreProcess(/*in*/CString &szFilename, /*in*/CFileOptions &options); BOOL PreProcessFolder(/*in*/CString &szFolder, /*in*/CFileOptions &options); void AddString(/*in*/CString &s, /*in*/LineStatus ls); void AddBlankLine(); BOOL MatchLine(/*in*/long i1, /*in*/CFilePartition &f2, /*out*/long &i2); void Dump(/*in*/CString &szTitle); // Helpers protected: BOOL PreProcessFolder(/*in*/CString &szFolder, /*in*/CFileOptions &options, /*in/out*/long nIndent); void AddString(/*in*/CString &s); }; --- NEW FILE: ReadMe.txt --- ======================================================================== MICROSOFT FOUNDATION CLASS LIBRARY : Diff ======================================================================== AppWizard has created this Diff DLL for you. This DLL not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your DLL. This file contains a summary of what you will find in each of the files that make up your Diff DLL. Diff.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. Diff.cpp This is the main DLL source file that contains the definition of DllMain(). Diff.rc This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in Microsoft Visual C++. Diff.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to create and edit message maps and dialog data maps and to create prototype member functions. res\Diff.rc2 This file contains resources that are not edited by Microsoft Visual C++. You should place all resources not editable by the resource editor in this file. Diff.def This file contains information about the DLL that must be provided to run with Microsoft Windows. It defines parameters such as the name and description of the DLL. It also exports functions from the DLL. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named Diff.pch and a precompiled types file named StdAfx.obj. Resource.h This is the standard header file, which defines new resource IDs. Microsoft Visual C++ reads and updates this file. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize. ///////////////////////////////////////////////////////////////////////////// --- NEW FILE: Resource.h --- //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by Diff.rc // #define IDD_DIALOG1 1000 #define ID_EDIT1 1000 #define ID_BUTTON1 1001 #define ID_EDIT2 1002 #define ID_BUTTON2 1003 #define ID_CHECK1 1004 #define ID_CHECK2 1005 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 1001 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 1000 #endif #endif --- NEW FILE: StdAfx.cpp --- // stdafx.cpp : source file that includes just the standard includes // Diff.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" --- NEW FILE: StdAfx.h --- // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #if !defined(AFX_STDAFX_H__58CCA3EA_C439_4F7D_BC66_DCC0204CB494__INCLUDED_) #define AFX_STDAFX_H__58CCA3EA_C439_4F7D_BC66_DCC0204CB494__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #ifndef _AFX_NO_OLE_SUPPORT #include <afxole.h> // MFC OLE classes #include <afxodlgs.h> // MFC OLE dialog classes #include <afxdisp.h> // MFC Automation classes #endif // _AFX_NO_OLE_SUPPORT #ifndef _AFX_NO_DB_SUPPORT #include <afxdb.h> // MFC ODBC database classes #endif // _AFX_NO_DB_SUPPORT #ifndef _AFX_NO_DAO_SUPPORT #include <afxdao.h> // MFC DAO database classes #endif // _AFX_NO_DAO_SUPPORT #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STDAFX_H__58CCA3EA_C439_4F7D_BC66_DCC0204CB494__INCLUDED_) --- NEW FILE: Templates.h --- #pragma once ///////////////////////////////////////////////////////////////////////////////////// // // collection templates // // taken from the Windows MFC // templated // // // template <class T> class CTemplateArray { public: // Construction CTemplateArray(); ~CTemplateArray(); // Attributes int GetSize() const; int GetUpperBound() const; void SetSize(int nNewSize, int nGrowBy = -1); // Operations // Clean up void FreeExtra(); void RemoveAll(); // Accessing elements T GetAt(int nIndex) const; void SetAt(int nIndex, T newElement); T& ElementAt(int nIndex); // Direct Access to the element data (may return NULL) const T* GetData() const; T* GetData(); // Potentially growing the array void SetAtGrow(int nIndex, T newElement); int Add(T newElement); int Append(const CTemplateArray& src); void Copy(const CTemplateArray& src); // overloaded operator helpers T operator[](int nIndex) const; T& operator[](int nIndex); // Operations that move elements around void InsertAt(int nIndex, T newElement, int nCount = 1); void RemoveAt(int nIndex, int nCount = 1); void InsertAt(int nStartIndex, CTemplateArray* pNewArray); void Remove(T oldElement); // Implementation protected: T* m_pData; // the actual array of data int m_nSize; // # of elements (upperBound - 1) int m_nMaxSize; // max allocated int m_nGrowBy; // grow amount protected: // local typedefs for class templates typedef void* BASE_TYPE; typedef void* BASE_ARG_TYPE; }; template <class T> CTemplateArray<T>::CTemplateArray() { m_pData = NULL; m_nSize = m_nMaxSize = m_nGrowBy = 0; } template <class T> CTemplateArray<T>::~CTemplateArray() { delete[] (BYTE*)m_pData; } template <class T> int CTemplateArray<T>::GetSize() const { return m_nSize; } template <class T> int CTemplateArray<T>::GetUpperBound() const { return m_nSize-1; } template <class T> void CTemplateArray<T>::SetSize(int nNewSize, int nGrowBy) { if (nNewSize < 0) return; if (nGrowBy != -1) m_nGrowBy = nGrowBy; // set new size if (nNewSize == 0) { // shrink to nothing delete[] (BYTE*)m_pData; m_pData = NULL; m_nSize = m_nMaxSize = 0; } else if (m_pData == NULL) { // create one with exact size m_pData = (T*) new BYTE[nNewSize * sizeof(T)]; memset(m_pData, 0, nNewSize * sizeof(T)); // zero fill m_nSize = m_nMaxSize = nNewSize; } else if (nNewSize <= m_nMaxSize) { // it fits if (nNewSize > m_nSize) { // initialize the new elements memset(&m_pData[m_nSize], 0, (nNewSize-m_nSize) * sizeof(T)); } m_nSize = nNewSize; } else { // otherwise, grow array int nGrowBy = m_nGrowBy; if (nGrowBy == 0) { // heuristically determine growth when nGrowBy == 0 // (this avoids heap fragmentation in many situations) nGrowBy = (m_nSize/8 > 4)? m_nSize/8 : 4; } int nNewMax; if (nNewSize < m_nMaxSize + nGrowBy) nNewMax = m_nMaxSize + nGrowBy; // granularity else nNewMax = nNewSize; // no slush T* pNewData = (T*) new BYTE[nNewMax * sizeof(T)]; // copy new data from old memcpy(pNewData, m_pData, m_nSize * sizeof(T)); memset(&pNewData[m_nSize], 0, (nNewSize-m_nSize) * sizeof(T)); // get rid of old stuff (note: no destructors called) delete[] (BYTE*)m_pData; m_pData = pNewData; m_nSize = nNewSize; m_nMaxSize = nNewMax; } } template <class T> void CTemplateArray<T>::FreeExtra() { if (m_nSize != m_nMaxSize) { // shrink to desired size T* pNewData = NULL; if (m_nSize != 0) { pNewData = (T*) new BYTE[m_nSize * sizeof(T)]; // copy new data from old memcpy(pNewData, m_pData, m_nSize * sizeof(T)); } // get rid of old stuff (note: no destructors called) delete[] (BYTE*)m_pData; m_pData = pNewData; m_nMaxSize = m_nSize; } } template <class T> void CTemplateArray<T>::RemoveAll() { SetSize(0); } template <class T> T CTemplateArray<T>::GetAt(int nIndex) const { if (nIndex<0 || nIndex>=m_nSize) return NULL; else return m_pData[nIndex]; } template <class T> void CTemplateArray<T>::SetAt(int nIndex, T newElement) { if (nIndex >= 0 && nIndex < m_nSize) m_pData[nIndex] = newElement; } template <class T> T& CTemplateArray<T>::ElementAt(int nIndex) { static T pVoid=NULL; if (nIndex<0 || nIndex>=m_nSize) return pVoid; else return m_pData[nIndex]; } template <class T> const T* CTemplateArray<T>::GetData() const { return (const T*)m_pData; } template <class T> T* CTemplateArray<T>::GetData() { return (T*)m_pData; } template <class T> void CTemplateArray<T>::SetAtGrow(int nIndex, T newElement) { if (nIndex < 0) return; if (nIndex >= m_nSize) SetSize(nIndex+1); m_pData[nIndex] = newElement; } template <class T> int CTemplateArray<T>::Add(T newElement) { int nIndex = m_nSize; SetAtGrow(nIndex, newElement); return nIndex; } template <class T> void CTemplateArray<T>::Remove(T oldElement) { for( int i = 0; i < m_nSize; i++) { if( m_pData[i] == oldElement) { if( i < m_nSize - 1) m_pData[i] = m_pData[i+1]; m_nSize--; return; } } } template <class T> int CTemplateArray<T>::Append(const CTemplateArray& src) { int nOldSize = m_nSize; if (this != &src) { SetSize(m_nSize + src.m_nSize); memcpy(m_pData + nOldSize, src.m_pData, src.m_nSize * sizeof(T)); } return nOldSize; } template <class T> void CTemplateArray<T>::Copy(const CTemplateArray& src) { if (this == &src) return; SetSize(src.m_nSize); memcpy(m_pData, src.m_pData, src.m_nSize * sizeof(T)); } template <class T> T CTemplateArray<T>::operator[](int nIndex) const { return GetAt(nIndex); } template <class T> T& CTemplateArray<T>::operator[](int nIndex) { return ElementAt(nIndex); } template <class T> void CTemplateArray<T>::InsertAt(int nIndex, T newElement, int nCount) { if (nIndex<0 || nCount<=0) return; if (nIndex >= m_nSize) { // adding after the end of the array SetSize(nIndex + nCount); // grow so nIndex is valid } else { // inserting in the middle of the array int nOldSize = m_nSize; SetSize(m_nSize + nCount); // grow it to new size // shift old data up to fill gap memmove(&m_pData[nIndex+nCount], &m_pData[nIndex], (nOldSize-nIndex) * sizeof(T)); // re-init slots we copied from memset(&m_pData[nIndex], 0, nCount * sizeof(T)); } // insert new value in the gap while (nCount-- && (nIndex + nCount <= m_nSize)) m_pData[nIndex++] = newElement; } template <class T> void CTemplateArray<T>::RemoveAt(int nIndex, int nCount) { if (nIndex >= 0 || nCount >= 0 || (nIndex + nCount <= m_nSize) ) { // just remove a range int nMoveCount = m_nSize - (nIndex + nCount); if (nMov... [truncated message content] |
From: <td...@us...> - 2003-07-18 19:05:39
|
Update of /cvsroot/anyedit/AnyEditv2/Plugins/Diff/res In directory sc8-pr-cvs1:/tmp/cvs-serv2505/Plugins/Diff/res Added Files: Diff.rc2 Log Message: Added Initial plugin support Added diff plugin --- NEW FILE: Diff.rc2 --- // // DIFF.RC2 - resources Microsoft Visual C++ does not edit directly // #ifdef APSTUDIO_INVOKED #error this file is not editable by Microsoft Visual C++ #endif //APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // Add manually edited resources here... ///////////////////////////////////////////////////////////////////////////// |