You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(67) |
Apr
(455) |
May
(202) |
Jun
(136) |
Jul
(203) |
Aug
(60) |
Sep
(88) |
Oct
(64) |
Nov
(56) |
Dec
(78) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(271) |
Feb
(207) |
Mar
|
Apr
|
May
(167) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Foster B. <fos...@us...> - 2006-02-03 18:21:28
|
Update of /cvsroot/adobe-source/adobe-source/adobe/test/begin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/test/begin Modified Files: Info.plist Jamfile.v2 version.plist Log Message: asl 1.0.13 Index: Info.plist =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/test/begin/Info.plist,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Info.plist 6 Oct 2005 20:43:17 -0000 1.2 --- Info.plist 3 Feb 2006 18:20:47 -0000 1.3 *************** *** 3,55 **** <plist version="1.0"> <dict> ! <key>CFBundleDevelopmentRegion</key> ! <string>English</string> ! <key>CFBundleDocumentTypes</key> ! <array> ! <dict> ! <key>CFBundleTypeExtensions</key> ! <array> ! <string>adm</string> ! </array> ! <key>CFBundleTypeName</key> ! <string>Adam file</string> ! <key>CFBundleTypeRole</key> ! <string>Viewer</string> ! <key>LSTypeIsPackage</key> ! <false/> ! </dict> ! <dict> ! <key>CFBundleTypeExtensions</key> ! <array> ! <string>eve</string> ! </array> ! <key>CFBundleTypeName</key> ! <string>Eve file</string> ! <key>CFBundleTypeRole</key> ! <string>Viewer</string> ! <key>LSTypeIsPackage</key> ! <false/> ! </dict> ! </array> ! <key>CFBundleExecutable</key> ! <string>Adobe Begin</string> ! <key>CFBundleGetInfoString</key> ! <string>Adobe Begin version 1.0, Copyright © 2004-2005 by Adobe Systems, Inc. All rights reserved.</string> ! <key>CFBundleIconFile</key> ! <string>app_icon.icns</string> ! <key>CFBundleIdentifier</key> ! <string>com.adobe.begin</string> ! <key>CFBundleInfoDictionaryVersion</key> ! <string>6.0</string> ! <key>CFBundleName</key> ! <string>Adobe Begin.app</string> ! <key>CFBundlePackageType</key> ! <string>APPL</string> ! <key>CFBundleSignature</key> ! <string>????</string> ! <key>CFBundleVersion</key> ! <string>1.0</string> ! <key>CSResourcesFileMapped</key> ! <true/> </dict> </plist> --- 3,55 ---- <plist version="1.0"> <dict> ! <key>CFBundleDevelopmentRegion</key> ! <string>English</string> ! <key>CFBundleDocumentTypes</key> ! <array> ! <dict> ! <key>CFBundleTypeExtensions</key> ! <array> ! <string>adm</string> ! </array> ! <key>CFBundleTypeName</key> ! <string>Adam file</string> ! <key>CFBundleTypeRole</key> ! <string>Viewer</string> ! <key>LSTypeIsPackage</key> ! <false/> ! </dict> ! <dict> ! <key>CFBundleTypeExtensions</key> ! <array> ! <string>eve</string> ! </array> ! <key>CFBundleTypeName</key> ! <string>Eve file</string> ! <key>CFBundleTypeRole</key> ! <string>Viewer</string> ! <key>LSTypeIsPackage</key> ! <false/> ! </dict> ! </array> ! <key>CFBundleExecutable</key> ! <string>Adobe Begin</string> ! <key>CFBundleGetInfoString</key> ! <string>Adobe Begin version 1.0, Copyright © 2004-2005 by Adobe Systems, Inc. All rights reserved.</string> ! <key>CFBundleIconFile</key> ! <string>app_icon.icns</string> ! <key>CFBundleIdentifier</key> ! <string>com.adobe.begin</string> ! <key>CFBundleInfoDictionaryVersion</key> ! <string>6.0</string> ! <key>CFBundleName</key> ! <string>Adobe Begin.app</string> ! <key>CFBundlePackageType</key> ! <string>APPL</string> ! <key>CFBundleSignature</key> ! <string>????</string> ! <key>CFBundleVersion</key> ! <string>1.0</string> ! <key>CSResourcesFileMapped</key> ! <true/> </dict> </plist> Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/test/begin/Jamfile.v2,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jamfile.v2 7 Nov 2005 18:00:43 -0000 1.3 --- Jamfile.v2 3 Feb 2006 18:20:47 -0000 1.4 *************** *** 4,92 **** import os ; ! SOURCE_DIRECTORY = sources ; ! HEADER_DIRECTORY = headers ; switch [ os.name ] { case NT : # --- Windows --------------------------------------------------------------------------- ! { ! # ! # Directory name for Windows specific sources and headers ! # ! PLATFORM_DIRECTORIES_NAME = win ; ! # ! # Build settings for Windows ! # ! PLATFORM_SETTINGS = ! # ! # The header file containing the resource definitions is currently ! # used by win/ui_core_implementation.cpp to load an icon in begin. ! # ! <include>resources ! <include>. ! # ! # These definitions say that we're targetting Windows XP. ! # That means that we get various preprocessor definitions which we ! # need, such as the WS_EX_COMPOSITED window style. ! # ! <define>WINVER=0x501 <define>_WIN32_WINNT=0x501 <define>_WIN32_IE=0x501 ! <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib shell32.lib" ! # ! # If compiling with GCC we add -mno-cygwin to tell the cygwin compiler ! # and linker that we want a native Windows application. ! # ! <toolset>gcc:<cxxflags>"-mno-cygwin" ! <toolset>gcc:<linkflags>"-lgdi32 -lshell32 -luser32 -lcomctl32 -mno-cygwin" ! ; ! # ! # The resource file should only be included on the executable. ! # We don't want it in the library, so this PLATFORM_EXTRA ! # variable is defined. ! # ! PLATFORM_EXTRAS = resources/resources.rc ; ! } case FREEBSD : ! { ! PLATFORM_DIRECTORIES_NAME = fltk ; ! # ! # Details of *your* local FLTK2 installation must be added here. ! # ! PLATFORM_SETTINGS = <linkflags>"-L/usr/X11R6/lib -lXft -L/usr/local/lib -lfreetype -lz -lfontconfig -lXrender -lXext -lXi -lX11" ; ! PLATFORM_EXTRAS = ; ! } case MACOSX : # --- Mac OS (assumed) ------------------------------------------------------------------ ! { ! # ! # Directory name for MacOS specific sources ! # ! PLATFORM_DIRECTORIES_NAME = mac ; ! # ! # Build settings for MacOS ! # ! PLATFORM_SETTINGS = <toolset>darwin:<linkflags>"-framework Carbon" ; ! ! # ! # MacOS has no extra requirements. ! # ! PLATFORM_EXTRAS = ; ! } } # ------------------------------------------------------------------------------------------------- ! INCLUDE = <include>$(HEADER_DIRECTORY) <include>$(HEADER_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME) ; EXE_SOURCES = ! $(SOURCE_DIRECTORY)/express_viewer.cpp ! $(SOURCE_DIRECTORY)/report_exception.cpp ! $(SOURCE_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME)/main.cpp ! ; # ------------------------------------------------------------------------------------------------- --- 4,124 ---- import os ; ! SOURCE_DIRECTORY = sources ; ! HEADER_DIRECTORY = headers ; ! switch [ os.name ] { case NT : # --- Windows --------------------------------------------------------------------------- ! { ! # ! # Directory name for Windows specific sources and headers ! # ! PLATFORM_DIRECTORIES_NAME = ! win32 ! ; + # + # Build settings for Windows + # + PLATFORM_SETTINGS = + # + # The header file containing the resource definitions is currently + # used by win/ui_core_implementation.cpp to load an icon in begin. + # + <include>resources + <include>. + # + # These definitions say that we're targetting Windows XP. + # That means that we get various preprocessor definitions which we + # need, such as the WS_EX_COMPOSITED window style. + # + <define>WINVER=0x501 <define>_WIN32_WINNT=0x501 <define>_WIN32_IE=0x501 + <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib shell32.lib" ! # Commented out because manifests aren't working in boost 1.33.1 anyhow ! # ! # <toolset>msvc,<toolset-msvc:version>8.0:<define>ADOBE_VER=8 ! # <toolset>msvc,<toolset-msvc:version>7.1:<define>ADOBE_VER=7 ! # ! # If compiling with GCC we add -mno-cygwin to tell the cygwin compiler ! # and linker that we want a native Windows application. ! # ! <toolset>gcc:<cxxflags>"-mno-cygwin" ! <toolset>gcc:<linkflags>"-lgdi32 -lshell32 -luser32 -lcomctl32 -mno-cygwin" ! ; ! # ! # The resource file should only be included on the executable. ! # We don't want it in the library, so this PLATFORM_EXTRA ! # variable is defined. ! # ! PLATFORM_EXTRAS = ! resources/resources.rc ! ; ! } case FREEBSD : ! { ! PLATFORM_DIRECTORIES_NAME = ! fltk ! ; ! # ! # Details of *your* local FLTK2 installation must be added here. ! # ! PLATFORM_SETTINGS = ! <linkflags>"-L/usr/X11R6/lib -lXft -L/usr/local/lib -lfreetype -lz -lfontconfig -lXrender -lXext -lXi -lX11" ! ; ! PLATFORM_EXTRAS = ! ; ! } case MACOSX : # --- Mac OS (assumed) ------------------------------------------------------------------ ! { ! # ! # Directory name for MacOS specific sources ! # ! PLATFORM_DIRECTORIES_NAME = ! mac ! ; ! # ! # Build settings for MacOS ! # ! PLATFORM_SETTINGS = ! <toolset>darwin:<linkflags>"-framework Carbon" ! ; ! ! # ! # MacOS has no extra requirements. ! # ! PLATFORM_EXTRAS = ! ; ! } } # ------------------------------------------------------------------------------------------------- ! INCLUDE = ! <include>$(HEADER_DIRECTORY) ! <include>$(HEADER_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME) ! ; EXE_SOURCES = ! $(SOURCE_DIRECTORY)/express_viewer.cpp ! $(SOURCE_DIRECTORY)/report_exception.cpp ! $(SOURCE_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME)/main.cpp ! ; ! ! # ------------------------------------------------------------------------------------------------- ! ! project adobe/begin ! : requirements ! <user-interface>gui ! $(INCLUDE) ! : usage-requirements ! $(INCLUDE) ! ; # ------------------------------------------------------------------------------------------------- *************** *** 94,122 **** switch [ os.name ] { ! case MACOSX : ! { ! BINARY_NAME = "Adobe Begin" ; ! } case * : ! { ! BINARY_NAME = "begin" ; ! } } - # ------------------------------------------------------------------------------------------------- ! project adobe/begin ! : requirements ! <user-interface>gui ! $(INCLUDE) ! : usage-requirements ! $(INCLUDE) ! ; exe $(BINARY_NAME) ! : $(EXE_SOURCES) ! /adobe/adobe_widgets//adobe_widgets ! $(PLATFORM_EXTRAS) ! : $(PLATFORM_SETTINGS) ! ; # Construct the destination path location --- 126,152 ---- switch [ os.name ] { ! case MACOSX : ! { ! BINARY_NAME = "Adobe Begin" ; ! } ! case NT : ! { ! manifest begin.exe : resources/begin.exe.manifesttmpl ; ! BINARY_NAME = "begin" ; ! } case * : ! { ! BINARY_NAME "begin" ; ! } } ! # ------------------------------------------------------------------------------------------------- exe $(BINARY_NAME) ! : $(EXE_SOURCES) ! /adobe/adobe_widgets//adobe_widgets ! $(PLATFORM_EXTRAS) ! : $(PLATFORM_SETTINGS) ! ; # Construct the destination path location *************** *** 126,176 **** switch [ os.name ] { ! case MACOSX : ! { ! # set up the bundle of the app ! ! install "Adobe Begin.app/Contents" ! : Info.plist ! resources/PkgInfo ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin.app/Contents" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin.app/Contents" ! ; ! ! install "Adobe Begin.app/Contents/MacOS" ! : "Adobe Begin" ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin.app/Contents/MacOS" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin.app/Contents/MacOS" ! ; ! ! install "Adobe Begin.app/Contents/Resources/begin.nib" ! : [ glob resources/begin.nib/*.* ] ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin.app/Contents/Resources/begin.nib" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin.app/Contents/Resources/begin.nib" ! ; ! ! install "Adobe Begin.app/Contents/Resources" ! : resources/app_icon.icns ! resources/editor.adm ! resources/editor.eve ! resources/eve_globals.scp ! resources/glossary.xstr ! resources/link_icon.png ! resources/metrics_glossary.xstr ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin.app/Contents/Resources" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin.app/Contents/Resources" ! ; ! } ! case * : ! { ! install "Adobe Begin" ! : begin ! resources/editor.adm ! resources/editor.eve ! resources/eve_globals.scp ! resources/glossary.xstr ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin" ! ; ! } } --- 156,219 ---- switch [ os.name ] { ! case MACOSX : ! { ! # set up the bundle of the app ! ! install "Adobe Begin.app/Contents" ! : Info.plist ! resources/PkgInfo ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin.app/Contents" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin.app/Contents" ! ; ! ! install "Adobe Begin.app/Contents/MacOS" ! : "Adobe Begin" ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin.app/Contents/MacOS" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin.app/Contents/MacOS" ! ; ! ! install "Adobe Begin.app/Contents/Resources/begin.nib" ! : [ glob resources/begin.nib/*.* ] ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin.app/Contents/Resources/begin.nib" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin.app/Contents/Resources/begin.nib" ! ; ! ! install "Adobe Begin.app/Contents/Resources" ! : resources/app_icon.icns ! resources/editor.adm ! resources/editor.eve ! resources/eve_globals.scp ! resources/glossary.xstr ! resources/link_icon.png ! resources/metrics_glossary.xstr ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin.app/Contents/Resources" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin.app/Contents/Resources" ! ; ! } ! case NT : ! { ! install "Adobe Begin" ! : begin ! begin.exe ! resources/editor.adm ! resources/editor.eve ! resources/eve_globals.scp ! resources/glossary.xstr ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin" ! ; ! } ! case * : ! { ! install "Adobe Begin" ! : begin ! resources/editor.adm ! resources/editor.eve ! resources/eve_globals.scp ! resources/glossary.xstr ! : <variant>release:<location>$(DEST_PATH)"release/Adobe Begin" ! <variant>debug:<location>$(DEST_PATH)"debug/Adobe Begin" ! ; ! } } Index: version.plist =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/test/begin/version.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** version.plist 7 Jul 2005 22:00:25 -0000 1.1 --- version.plist 3 Feb 2006 18:20:47 -0000 1.2 *************** *** 3,16 **** <plist version="1.0"> <dict> ! <key>BuildVersion</key> ! <string>92</string> ! <key>CFBundleVersion</key> ! <string>1.0</string> ! <key>ProductBuildVersion</key> ! <string>7K571</string> ! <key>ProjectName</key> ! <string>NibPBTemplates</string> ! <key>SourceVersion</key> ! <string>1200000</string> </dict> </plist> --- 3,16 ---- <plist version="1.0"> <dict> ! <key>BuildVersion</key> ! <string>92</string> ! <key>CFBundleVersion</key> ! <string>1.0</string> ! <key>ProductBuildVersion</key> ! <string>7K571</string> ! <key>ProjectName</key> ! <string>NibPBTemplates</string> ! <key>SourceVersion</key> ! <string>1200000</string> </dict> </plist> |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:28
|
Update of /cvsroot/adobe-source/adobe-source/adobe/test/begin/sources/fltk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/test/begin/sources/fltk Modified Files: main.cpp Log Message: asl 1.0.13 Index: main.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/test/begin/sources/fltk/main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.cpp 7 Jul 2005 22:00:31 -0000 1.1 --- main.cpp 3 Feb 2006 18:20:47 -0000 1.2 *************** *** 1,7 **** /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License ! (see accompanying file LICENSE_1_0_0.txt or a copy at ! http://opensource.adobe.com/licenses.html) */ --- 1,7 ---- /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License ! (see accompanying file LICENSE_1_0_0.txt or a copy at ! http://opensource.adobe.com/licenses.html) */ *************** *** 27,48 **** bool os_initialize(application_t* app) { ! // ! // This is example code currently. It makes no real effort ! // to locate the resources. ! // ! app->set_resource_directory("examples"); ! app->set_adam_file("examples/image_size.adm"); ! app->set_eve_file("examples/image_size.eve"); ! return true; } void os_mainloop() { ! fltk::run(); } void os_end_mainloop() { ! exit(0); } --- 27,48 ---- bool os_initialize(application_t* app) { ! // ! // This is example code currently. It makes no real effort ! // to locate the resources. ! // ! app->set_resource_directory("examples"); ! app->set_adam_file("examples/image_size.adm"); ! app->set_eve_file("examples/image_size.eve"); ! return true; } void os_mainloop() { ! fltk::run(); } void os_end_mainloop() { ! exit(0); } *************** *** 53,66 **** int main() { ! // try ! { ! adobe::application_t* app = adobe::application_t::getInstance(); ! if (app) app->run(); ! } ! /* catch(...) ! { ! adobe::report_exception(); ! }*/ ! return 0; } --- 53,66 ---- int main() { ! // try ! { ! adobe::application_t* app = adobe::application_t::getInstance(); ! if (app) app->run(); ! } ! /* catch(...) ! { ! adobe::report_exception(); ! }*/ ! return 0; } |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:27
|
Update of /cvsroot/adobe-source/adobe-source/adobe/test/begin/resources/begin.nib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/test/begin/resources/begin.nib Modified Files: info.nib objects.xib Log Message: asl 1.0.13 Index: objects.xib =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/test/begin/resources/begin.nib/objects.xib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** objects.xib 7 Nov 2005 18:00:44 -0000 1.2 --- objects.xib 3 Feb 2006 18:20:47 -0000 1.3 *************** *** 5,9 **** <string name="customClass">NSApplication</string> </object> ! <array count="53" name="allObjects"> <object class="IBCarbonMenu" id="29"> <string name="title">SimpleHello</string> --- 5,9 ---- <string name="customClass">NSApplication</string> </object> ! <array count="55" name="allObjects"> <object class="IBCarbonMenu" id="29"> <string name="title">SimpleHello</string> *************** *** 125,129 **** <object name="submenu" class="IBCarbonMenu" id="233"> <string name="title">View Options</string> ! <array count="11" name="items"> <object class="IBCarbonMenuItem" id="234"> <boolean name="updateSingleItem">TRUE</boolean> --- 125,129 ---- <object name="submenu" class="IBCarbonMenu" id="233"> <string name="title">View Options</string> ! <array count="13" name="items"> <object class="IBCarbonMenuItem" id="234"> <boolean name="updateSingleItem">TRUE</boolean> *************** *** 193,196 **** --- 193,206 ---- <ostype name="command">SzWg</ostype> </object> + <object class="IBCarbonMenuItem" id="252"> + <boolean name="separator">TRUE</boolean> + <boolean name="updateSingleItem">TRUE</boolean> + </object> + <object class="IBCarbonMenuItem" id="253"> + <boolean name="updateSingleItem">TRUE</boolean> + <string name="title">Run Modal</string> + <string name="keyEquivalent">d</string> + <ostype name="command">dlog</ostype> + </object> </array> </object> *************** *** 321,326 **** <reference idRef="250"/> <reference idRef="251"/> </array> ! <array count="53" name="allParents"> <reference idRef="1"/> <reference idRef="29"/> --- 331,338 ---- <reference idRef="250"/> <reference idRef="251"/> + <reference idRef="252"/> + <reference idRef="253"/> </array> ! <array count="55" name="allParents"> <reference idRef="1"/> <reference idRef="29"/> *************** *** 376,379 **** --- 388,393 ---- <reference idRef="246"/> <reference idRef="246"/> + <reference idRef="233"/> + <reference idRef="233"/> </array> <dictionary count="2" name="nameTable"> *************** *** 383,386 **** <reference idRef="29"/> </dictionary> ! <unsigned_int name="nextObjectID">252</unsigned_int> </object> --- 397,400 ---- <reference idRef="29"/> </dictionary> ! <unsigned_int name="nextObjectID">254</unsigned_int> </object> Index: info.nib =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/test/begin/resources/begin.nib/info.nib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** info.nib 7 Nov 2005 18:00:44 -0000 1.2 --- info.nib 3 Feb 2006 18:20:47 -0000 1.3 *************** *** 11,15 **** </dict> <key>IBFramework Version</key> ! <string>439.0</string> <key>IBOpenObjects</key> <array> --- 11,15 ---- </dict> <key>IBFramework Version</key> ! <string>443.0</string> <key>IBOpenObjects</key> <array> *************** *** 17,21 **** </array> <key>IBSystem Version</key> ! <string>8C46</string> <key>targetFramework</key> <string>IBCarbonFramework</string> --- 17,21 ---- </array> <key>IBSystem Version</key> ! <string>8G32</string> <key>targetFramework</key> <string>IBCarbonFramework</string> |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:27
|
Update of /cvsroot/adobe-source/adobe-source/adobe/test/begin/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/test/begin/sources Modified Files: express_viewer.cpp report_exception.cpp Log Message: asl 1.0.13 Index: report_exception.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/test/begin/sources/report_exception.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** report_exception.cpp 6 Jan 2006 18:35:24 -0000 1.2 --- report_exception.cpp 3 Feb 2006 18:20:47 -0000 1.3 *************** *** 1,73 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! #include "report_exception.hpp" ! ! #include <cassert> ! ! #ifndef NDEBUG ! #include <iostream> ! #endif ! ! /****************************************************************************************************/ ! ! namespace { ! ! /****************************************************************************************************/ ! ! inline adobe::report_exception_proc_t& report_exception_proc() ! { ! static adobe::report_exception_proc_t report_exception_proc_s; ! ! return report_exception_proc_s; ! } ! ! /****************************************************************************************************/ ! ! } // namespace ! ! /****************************************************************************************************/ ! ! namespace adobe { ! ! /****************************************************************************************************/ ! ! namespace implementation { ! ! /****************************************************************************************************/ ! ! void report_exception(const std::string& error_message) ! { ! if (report_exception_proc()) ! { ! report_exception_proc()(error_message); ! } ! #ifndef NDEBUG ! else ! { ! std::cerr << error_message << std::endl; ! } ! #endif ! } ! ! /****************************************************************************************************/ ! ! } // namespace implementation ! ! /****************************************************************************************************/ ! ! void set_report_exception_callback(boost::function<void (const std::string& msg)> proc) ! { ! report_exception_proc() = proc; ! } ! ! /****************************************************************************************************/ ! ! } // namespace adobe ! ! /****************************************************************************************************/ --- 1,9 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! // This file intentionally left blank Index: express_viewer.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/test/begin/sources/express_viewer.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** express_viewer.cpp 6 Jan 2006 18:35:24 -0000 1.7 --- express_viewer.cpp 3 Feb 2006 18:20:47 -0000 1.8 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt [...1125 lines suppressed...] ! system_beep(); } --- 633,647 ---- void application_t::display_error( const std::string& msg ) { ! if (_editor_sheet_m) ! { ! _editor_sheet_m->set( editor_error_cell_g, adobe::value_t( msg ) ); ! _editor_sheet_m->set( editor_visible_tab_cell_g, adobe::value_t( editor_key_errors_tab_g ) ); ! _editor_sheet_m->update(); ! } #ifndef NDEBUG ! else std::cerr << msg << std::endl; #endif ! system_beep(); } |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:26
|
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/doxygen_support_files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/doxygen_support_files Modified Files: header.dox Added Files: include_stub.dox Log Message: asl 1.0.13 Index: header.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/doxygen_support_files/header.dox,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** header.dox 6 Jan 2006 18:35:20 -0000 1.8 --- header.dox 3 Feb 2006 18:20:42 -0000 1.9 *************** *** 4,10 **** <!-- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ Some files are held under additional license. Please see "licenses.html" for more information. --- 4,10 ---- <!-- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ Some files are held under additional license. Please see "licenses.html" for more information. *************** *** 12,25 **** <head> ! <TITLE>$title</TITLE> <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=ISO-8859-1"/> <LINK TYPE="text/css" REL="stylesheet" HREF="http://www.adobe.com/ssi/css/basic.css"/> ! <STYLE TYPE="text/css" MEDIA="all"><!-- ! @import url("http://www.adobe.com/ssi/css/modern.css"); ! --></STYLE> ! <LINK TYPE="text/css" REL="stylesheet" HREF="http://www.adobe.com/ssi/css/print.css" MEDIA="print"/> ! <LINK TYPE="text/css" REL="stylesheet" HREF="http://www.adobe.com/ssi/css/mainnav.css"/> ! <LINK TYPE="text/css" REL="stylesheet" HREF="stlab.css"/> ! <LINK REL="alternate" TITLE="opensource.adobe.com RSS" HREF="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&rss_fulltext=1" TYPE="application/rss+xml"/> </HEAD> --- 12,25 ---- <head> ! <TITLE>$title</TITLE> <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=ISO-8859-1"/> <LINK TYPE="text/css" REL="stylesheet" HREF="http://www.adobe.com/ssi/css/basic.css"/> ! <STYLE TYPE="text/css" MEDIA="all"><!-- ! @import url("http://www.adobe.com/ssi/css/modern.css"); ! --></STYLE> ! <LINK TYPE="text/css" REL="stylesheet" HREF="http://www.adobe.com/ssi/css/print.css" MEDIA="print"/> ! <LINK TYPE="text/css" REL="stylesheet" HREF="http://www.adobe.com/ssi/css/mainnav.css"/> ! <LINK TYPE="text/css" REL="stylesheet" HREF="stlab.css"/> ! <LINK REL="alternate" TITLE="opensource.adobe.com RSS" HREF="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&rss_fulltext=1" TYPE="application/rss+xml"/> </HEAD> *************** *** 38,91 **** <tr><td width="10" nowrap="1"> </td> <td valign="top"> ! <table border="0" cellpadding="5"> ! <tr><td nowrap="1"> ! <h3 class="navbar">Information</h3> ! <ul> ! <li><a href="index.html">Home</a></li> ! <li><a href="group__asl__overview.html">Overview</a></li> ! <li><a href="asl_toc.html">Documentation</a></li> ! <li><a href="asl_readme.html">Getting Started</a></li> ! <li><a href="asl_release_notes.html">Release Notes</a></li> ! <li><a href="http://opensource.adobe.com/twiki/bin/view/AdobeSource">ASL Wiki</a></li> ! <li><a href="licenses.html">License</a></li> ! <li><a href="asl_indices.html">Indices</a></li> ! </ul> ! <h3 class="navbar">Media</h3> ! <ul> ! <li><a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">Download</a></li> ! <li><a href="asl_download_cvs.html">ASL CVS Repository</a></li> ! <li><a href="http://cvs.sourceforge.net/viewcvs.py/adobe-source/">View CVS Repository</a></li> ! </ul> ! <h3 class="navbar">Support</h3> ! <ul> ! <li><a href="http://sourceforge.net/projects/adobe-source/">ASL SourceForge Home</a></li> ! <li><a href="http://sourceforge.net/mail/?group_id=132417">Mailing Lists</a></li> ! <li><a href="http://sourceforge.net/forum/?group_id=132417">Discussion Forums</a></li> ! <li><a href="http://sourceforge.net/tracker/?atid=724218&group_id=132417&func=browse">Report Bugs</a></li> ! <li><a href="http://sourceforge.net/tracker/?atid=724221&group_id=132417&func=browse">Suggest Features</a></li> ! <li><a href="asl_contributing.html">Contributing to ASL</a></li> ! </ul> ! <h3 class="navbar">RSS</h3> ! <ul> ! <li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417">Short-text news</a></li> ! <li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&rss_fulltext=1">Full-text news</a></li> ! <li><a href="http://sourceforge.net/export/rss2_projfiles.php?group_id=132417">File releases</a></li> ! </ul> ! <h3 class="navbar">Other Resources</h3> ! <ul> ! <li><a href="http://boost.org">Boost</a></li> ! <li><a href="http://www.sgi.com/tech/stl">SGI STL</a></li> ! </ul> ! <h3 class="navbar">Other Adobe Projects</h3> ! <ul> ! <li><a href="http://www.adobe.com/products/xmp/">Adobe XMP</a></li> ! </ul> ! </td></tr> ! </table> </td> <td width="10" nowrap="1"> </td> <td width="100%" valign="top"> - <!-- This page generated $datetime --> <!-- End Header --> --- 38,90 ---- <tr><td width="10" nowrap="1"> </td> <td valign="top"> ! <table border="0" cellpadding="5"> ! <tr><td nowrap="1"> ! <h3 class="navbar">Information</h3> ! <ul> ! <li><a href="index.html">Home</a></li> ! <li><a href="group__asl__overview.html">Overview</a></li> ! <li><a href="asl_toc.html">Documentation</a></li> ! <li><a href="asl_readme.html">Getting Started</a></li> ! <li><a href="asl_release_notes.html">Release Notes</a></li> ! <li><a href="http://opensource.adobe.com/twiki/bin/view/AdobeSource">ASL Wiki</a></li> ! <li><a href="licenses.html">License</a></li> ! <li><a href="asl_indices.html">Indices</a></li> ! </ul> ! <h3 class="navbar">Media</h3> ! <ul> ! <li><a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">Download</a></li> ! <li><a href="asl_download_cvs.html">ASL CVS Repository</a></li> ! <li><a href="http://cvs.sourceforge.net/viewcvs.py/adobe-source/">View CVS Repository</a></li> ! </ul> ! <h3 class="navbar">Support</h3> ! <ul> ! <li><a href="http://sourceforge.net/projects/adobe-source/">ASL SourceForge Home</a></li> ! <li><a href="http://sourceforge.net/mail/?group_id=132417">Mailing Lists</a></li> ! <li><a href="http://sourceforge.net/forum/?group_id=132417">Discussion Forums</a></li> ! <li><a href="http://sourceforge.net/tracker/?atid=724218&group_id=132417&func=browse">Report Bugs</a></li> ! <li><a href="http://sourceforge.net/tracker/?atid=724221&group_id=132417&func=browse">Suggest Features</a></li> ! <li><a href="asl_contributing.html">Contributing to ASL</a></li> ! </ul> ! <h3 class="navbar">RSS</h3> ! <ul> ! <li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417">Short-text news</a></li> ! <li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&rss_fulltext=1">Full-text news</a></li> ! <li><a href="http://sourceforge.net/export/rss2_projfiles.php?group_id=132417">File releases</a></li> ! </ul> ! <h3 class="navbar">Other Resources</h3> ! <ul> ! <li><a href="http://boost.org">Boost</a></li> ! <li><a href="http://www.sgi.com/tech/stl">SGI STL</a></li> ! </ul> ! <h3 class="navbar">Other Adobe Projects</h3> ! <ul> ! <li><a href="http://www.adobe.com/products/xmp/">Adobe XMP</a></li> ! </ul> ! </td></tr> ! </table> </td> <td width="10" nowrap="1"> </td> <td width="100%" valign="top"> <!-- End Header --> --- NEW FILE: include_stub.dox --- /*! \page asl_include_stub ASL include stub page This stub page is included so Doxygen will include stuff that we haven't otherwise specified in a way Doxygen will include it automatically. \image html grant_munsey.jpg "Grant and his wife Sandy in 2000" \image html gil_design_guide.pdf "GIL Design Guide (PDF)" \image html gil_tutorial.pdf "GIL Tutorial (PDF)" */ |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:26
|
Update of /cvsroot/adobe-source/adobe-source/adobe/gil/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/gil/core Modified Files: algorithm.hpp channel.hpp cmyk.hpp color_convert.hpp gil_concept.hpp gil_config.hpp gray.hpp image.hpp image_view_factory.hpp lab.hpp metafunctions.hpp pixel.hpp pixel_iterator.hpp rgb.hpp rgba.hpp typedefs.hpp utilities.hpp variant.hpp Log Message: asl 1.0.13 Index: image.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/gil/core/image.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** image.hpp 9 Jan 2006 19:41:09 -0000 1.1 --- image.hpp 3 Feb 2006 18:20:46 -0000 1.2 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 11,18 **** //////////////////////////////////////////////////////////////////////////////////////// ! /// \file /// \brief Templated image /// \author Lubomir Bourdev and Hailin Jin \n ! /// Adobe Systems Incorporated /// /// --- 11,18 ---- //////////////////////////////////////////////////////////////////////////////////////// ! /// \file /// \brief Templated image /// \author Lubomir Bourdev and Hailin Jin \n ! /// Adobe Systems Incorporated /// /// *************** *** 29,37 **** #ifdef _MSC_VER #pragma warning(push) ! #pragma warning(disable : 4244) // conversion from 'gil::image<V,ALLOC>::coord_type' to 'int', possible loss of data (visual studio compiler doesn't realize that the two types are the same) #endif //////////////////////////////////////////////////////////////////////////////////////// ! /// \class image_view /// \ingroup ImageView /// \brief A lightweight object that interprets memory as a 2D array of pixels. --- 29,37 ---- #ifdef _MSC_VER #pragma warning(push) ! #pragma warning(disable : 4244) // conversion from 'gil::image<V,ALLOC>::coord_type' to 'int', possible loss of data (visual studio compiler doesn't realize that the two types are the same) #endif //////////////////////////////////////////////////////////////////////////////////////// ! /// \class image_view /// \ingroup ImageView /// \brief A lightweight object that interprets memory as a 2D array of pixels. *************** *** 60,175 **** template <typename LOC> class pixel_image_iterator; ! template <typename LOC> // Models 2D Pixel Locator class image_view { ! GIL_CLASS_REQUIRE(LOC, GIL, XYLocatorConcept); public: // typedefs required by ConstRandomAccessNDImageViewConcept ! static const size_t num_dimensions=2; ! typedef typename LOC::value_type value_type; ! typedef typename LOC::reference reference; // result of dereferencing ! typedef typename LOC::coord_type coord_type; // 1D difference type (same for all dimensions) ! typedef coord_type difference_type; // result of operator-(1d_iterator,1d_iterator) ! typedef value_type domain_type; ! typedef typename LOC::point_type point_type; ! typedef LOC locator; ! typedef image_view<typename LOC::const_type> const_type; // same as this type, but over const values ! template <size_t D> struct axis { ! typedef typename LOC::template axis<D>::coord_type coord_type; // difference_type along each dimension ! typedef typename LOC::template axis<D>::iterator iterator; // 1D iterator type along each dimension ! }; ! typedef pixel_image_iterator<LOC> iterator; // 1D iterator type for each pixel left-to-right inside top-to-bottom ! typedef std::reverse_iterator<iterator> reverse_iterator; ! typedef size_t size_type; // typedefs required by ConstRandomAccess2DImageViewConcept ! typedef locator xy_locator; ! typedef typename xy_locator::x_iterator x_iterator; // pixel iterator along a row ! typedef typename xy_locator::y_iterator y_iterator; // pixel iterator along a column ! typedef typename xy_locator::x_coord_type x_coord_type; ! typedef typename xy_locator::y_coord_type y_coord_type; // typedefs required by ConstRandomAccess2DImageViewConcept ! typedef image_view<typename LOC::dynamic_step_type> dynamic_step_type; ! typedef typename LOC::channel_type channel_type; // type of the channel of a pixel ! typedef typename LOC::color_space_type color_space_type;// tag indicating the color space of an image ! image_view() : _dimensions(0,0) {} ! template <typename VIEW> image_view(const VIEW& iv) : _dimensions(iv.dimensions()), _pixels(iv.pixels()) {} ! template <typename L2> image_view(const point_type& sz , const L2& loc) : _dimensions(sz), _pixels(loc) {} ! template <typename L2> image_view(coord_type width, coord_type height, const L2& loc) : _dimensions(x_coord_type(width),y_coord_type(height)), _pixels(loc) {} ! image_view(const point_type& sz , const x_iterator& x_it, coord_type row_bytes) : _dimensions(sz), _pixels(x_it, row_bytes) {} ! image_view(coord_type width, coord_type height, const x_iterator& x_it, coord_type row_bytes) : _dimensions(x_coord_type(width),y_coord_type(height)), _pixels(x_it, row_bytes) {} ! template <typename VIEW> image_view& operator=(const VIEW& iv) { _pixels=iv.pixels(); _dimensions=iv.dimensions(); return *this; } ! image_view& operator=(const image_view& iv) { _pixels=iv.pixels(); _dimensions=iv.dimensions(); return *this; } ! template <typename VIEW> bool operator==(const VIEW& v) const { return pixels()==v.pixels() && dimensions()==v.dimensions(); } ! template <typename VIEW> bool operator!=(const VIEW& v) const { return !(*this==v); } ! template <typename L2> friend void swap(image_view<L2>& x, image_view<L2>& y); ! const point_type& dimensions() const { return _dimensions; } ! const locator& pixels() const { return _pixels; } ! x_coord_type width() const { return dimensions().x; } ! y_coord_type height() const { return dimensions().y; } ! difference_type row_bytes() const { return _pixels.row_bytes(); } // number of bytes per row ! difference_type pix_bytestep() const { return _pixels.pix_bytestep(); } // number of bytes between two adjacent pixels on the same row ! //\{@ ! /// \name 1D navigation ! size_type size() const { return width()*height(); } ! iterator begin() const { return iterator(_pixels,_dimensions.x); } ! iterator end() const { return begin()+size(); } // potential performance problem! ! reverse_iterator rbegin() const { return reverse_iterator(end()); } ! reverse_iterator rend() const { return reverse_iterator(begin()); } ! reference operator[](difference_type i) const { return begin()[i]; } // potential performance problem! ! iterator at(const point_type& p)const { return begin()+p.y*width()+p.x; } ! iterator at(x_coord_type x, y_coord_type y)const { return begin()+y*width()+x; } ! //\}@ ! //\{@ ! /// \name 2-D navigation ! reference operator()(const point_type& p) const { return _pixels(p.x,p.y); } ! reference operator()(x_coord_type x, y_coord_type y)const { return _pixels(x,y); } ! template <size_t D> typename axis<D>::iterator axis_iterator(const point_type& p) const { return _pixels.axis_iterator<D>(p); } ! xy_locator xy_at(x_coord_type x, y_coord_type y) const { return _pixels+point_type(x_coord_type(x),y_coord_type(y)); } ! locator xy_at(const point_type& p) const { return _pixels+p; } ! //\}@ ! //\{@ ! /// \name X navigation ! x_iterator x_at(x_coord_type x, y_coord_type y) const { return _pixels.x_at(x,y); } ! x_iterator x_at(const point_type& p) const { return _pixels.x_at(p); } ! x_iterator row_begin(y_coord_type y) const { return x_at(0,y); } ! x_iterator row_end(y_coord_type y) const { return x_at(width(),y); } ! //\}@ ! //\{@ ! /// \name Y navigation ! y_iterator y_at(x_coord_type x, y_coord_type y) const { return xy_at(x,y).y(); } ! y_iterator y_at(const point_type& p) const { return xy_at(p).y(); } ! y_iterator col_begin(x_coord_type x) const { return y_at(x,0); } ! y_iterator col_end(x_coord_type x) const { return y_at(x,height()); } ! //\}@ private: ! template <typename L2> friend class image_view; ! point_type _dimensions; ! xy_locator _pixels; }; template <typename L2> inline void swap(image_view<L2>& x, image_view<L2>& y) { ! std::swap(x._dimensions,y._dimensions); ! std::swap(x._pixels, y._pixels); // TODO: Extend further } //////////////////////////////////////////////////////////////////////////////////////// ! /// \class image /// \ingroup Image /// \brief container interface over image view --- 60,175 ---- template <typename LOC> class pixel_image_iterator; ! template <typename LOC> // Models 2D Pixel Locator class image_view { ! GIL_CLASS_REQUIRE(LOC, GIL, PixelLocatorConcept); public: // typedefs required by ConstRandomAccessNDImageViewConcept ! static const std::size_t num_dimensions=2; ! typedef typename LOC::value_type value_type; ! typedef typename LOC::reference reference; // result of dereferencing ! typedef typename LOC::coord_type coord_type; // 1D difference type (same for all dimensions) ! typedef coord_type difference_type; // result of operator-(1d_iterator,1d_iterator) ! typedef value_type domain_type; ! typedef typename LOC::point_type point_type; ! typedef LOC locator; ! typedef image_view<typename LOC::const_type> const_type; // same as this type, but over const values ! template <std::size_t D> struct axis { ! typedef typename LOC::template axis<D>::coord_type coord_type; // difference_type along each dimension ! typedef typename LOC::template axis<D>::iterator iterator; // 1D iterator type along each dimension ! }; ! typedef pixel_image_iterator<LOC> iterator; // 1D iterator type for each pixel left-to-right inside top-to-bottom ! typedef std::reverse_iterator<iterator> reverse_iterator; ! typedef size_t size_type; // typedefs required by ConstRandomAccess2DImageViewConcept ! typedef locator xy_locator; ! typedef typename xy_locator::x_iterator x_iterator; // pixel iterator along a row ! typedef typename xy_locator::y_iterator y_iterator; // pixel iterator along a column ! typedef typename xy_locator::x_coord_type x_coord_type; ! typedef typename xy_locator::y_coord_type y_coord_type; // typedefs required by ConstRandomAccess2DImageViewConcept ! typedef image_view<typename LOC::dynamic_step_type> dynamic_step_type; ! typedef typename LOC::channel_type channel_type; // type of the channel of a pixel ! typedef typename LOC::color_space_type color_space_type;// tag indicating the color space of an image ! image_view() : _dimensions(0,0) {} ! template <typename VIEW> image_view(const VIEW& iv) : _dimensions(iv.dimensions()), _pixels(iv.pixels()) {} ! template <typename L2> image_view(const point_type& sz , const L2& loc) : _dimensions(sz), _pixels(loc) {} ! template <typename L2> image_view(coord_type width, coord_type height, const L2& loc) : _dimensions(x_coord_type(width),y_coord_type(height)), _pixels(loc) {} ! image_view(const point_type& sz , const x_iterator& x_it, coord_type row_bytes) : _dimensions(sz), _pixels(x_it, row_bytes) {} ! image_view(coord_type width, coord_type height, const x_iterator& x_it, coord_type row_bytes) : _dimensions(x_coord_type(width),y_coord_type(height)), _pixels(x_it, row_bytes) {} ! template <typename VIEW> image_view& operator=(const VIEW& iv) { _pixels=iv.pixels(); _dimensions=iv.dimensions(); return *this; } ! image_view& operator=(const image_view& iv) { _pixels=iv.pixels(); _dimensions=iv.dimensions(); return *this; } ! template <typename VIEW> bool operator==(const VIEW& v) const { return pixels()==v.pixels() && dimensions()==v.dimensions(); } ! template <typename VIEW> bool operator!=(const VIEW& v) const { return !(*this==v); } ! template <typename L2> friend void swap(image_view<L2>& x, image_view<L2>& y); ! const point_type& dimensions() const { return _dimensions; } ! const locator& pixels() const { return _pixels; } ! x_coord_type width() const { return dimensions().x; } ! y_coord_type height() const { return dimensions().y; } ! difference_type row_bytes() const { return _pixels.row_bytes(); } // number of bytes per row ! difference_type pix_bytestep() const { return _pixels.pix_bytestep(); } // number of bytes between two adjacent pixels on the same row ! //\{@ ! /// \name 1D navigation ! size_type size() const { return width()*height(); } ! iterator begin() const { return iterator(_pixels,_dimensions.x); } ! iterator end() const { return begin()+size(); } // potential performance problem! ! reverse_iterator rbegin() const { return reverse_iterator(end()); } ! reverse_iterator rend() const { return reverse_iterator(begin()); } ! reference operator[](difference_type i) const { return begin()[i]; } // potential performance problem! ! iterator at(const point_type& p)const { return begin()+p.y*width()+p.x; } ! iterator at(x_coord_type x, y_coord_type y)const { return begin()+y*width()+x; } ! //\}@ ! //\{@ ! /// \name 2-D navigation ! reference operator()(const point_type& p) const { return _pixels(p.x,p.y); } ! reference operator()(x_coord_type x, y_coord_type y)const { return _pixels(x,y); } ! template <std::size_t D> typename axis<D>::iterator axis_iterator(const point_type& p) const { return _pixels.axis_iterator<D>(p); } ! xy_locator xy_at(x_coord_type x, y_coord_type y) const { return _pixels+point_type(x_coord_type(x),y_coord_type(y)); } ! locator xy_at(const point_type& p) const { return _pixels+p; } ! //\}@ ! //\{@ ! /// \name X navigation ! x_iterator x_at(x_coord_type x, y_coord_type y) const { return _pixels.x_at(x,y); } ! x_iterator x_at(const point_type& p) const { return _pixels.x_at(p); } ! x_iterator row_begin(y_coord_type y) const { return x_at(0,y); } ! x_iterator row_end(y_coord_type y) const { return x_at(width(),y); } ! //\}@ ! //\{@ ! /// \name Y navigation ! y_iterator y_at(x_coord_type x, y_coord_type y) const { return xy_at(x,y).y(); } ! y_iterator y_at(const point_type& p) const { return xy_at(p).y(); } ! y_iterator col_begin(x_coord_type x) const { return y_at(x,0); } ! y_iterator col_end(x_coord_type x) const { return y_at(x,height()); } ! //\}@ private: ! template <typename L2> friend class image_view; ! point_type _dimensions; ! xy_locator _pixels; }; template <typename L2> inline void swap(image_view<L2>& x, image_view<L2>& y) { ! std::swap(x._dimensions,y._dimensions); ! std::swap(x._pixels, y._pixels); // TODO: Extend further } //////////////////////////////////////////////////////////////////////////////////////// ! /// \class image /// \ingroup Image /// \brief container interface over image view *************** *** 181,297 **** template <typename V2,typename ALLOC2> void swap(image<V2,ALLOC2>& im1,image<V2,ALLOC2>& im2); ! template <typename V, typename ALLOC=std::allocator<unsigned char> > class image { public: ! typedef ALLOC allocator_type; ! typedef V view_type; ! typedef typename view_type::const_type const_view_type; ! typedef typename view_type::point_type point_type; ! typedef typename view_type::coord_type coord_type; ! typedef coord_type x_coord_type; ! typedef coord_type y_coord_type; ! typedef typename view_type::iterator iterator; ! typedef iterator pointer; ! typedef typename const_view_type::iterator const_iterator; ! typedef const_iterator const_pointer; ! typedef typename view_type::difference_type difference_type; ! typedef typename view_type::value_type value_type; ! typedef typename view_type::reference reference; ! typedef typename const_view_type::reference const_reference; ! typedef typename view_type::size_type size_type; ! typedef typename view_type::reverse_iterator reverse_iterator; ! typedef typename const_view_type::reverse_iterator const_reverse_iterator; ! ! const_iterator begin() const { return const_view(*this).begin(); } ! const_iterator end() const { return const_view(*this).end(); } ! const_reverse_iterator rbegin() const { return const_view(*this).rbegin(); } ! const_reverse_iterator rend() const { return const_view(*this).rend(); } ! iterator begin() { return _view.begin(); } ! iterator end() { return _view.end(); } ! reverse_iterator rbegin() { return _view.rbegin(); } ! reverse_iterator rend() { return _view.rend(); } ! reference operator[](size_type i) { return _view[i]; } ! const_reference operator[](size_type i) const { return const_view(*this)[i]; } // Warning: Slow!! ! size_type size() const { return _view.size(); } ! size_type max_size() const { return size(); } ! bool empty() const { return size()==0; } ! const point_type& dimensions() const { return _view.dimensions(); } ! x_coord_type width() const { return _view.width(); } ! y_coord_type height() const { return _view.height(); } ! image() {} ! // image that allocates own data. Calls new/delete[] ! image(const point_type& dimensions, unsigned int alignment=1) { create_with_own_data(dimensions,alignment); } ! image(x_coord_type width, y_coord_type height, unsigned int alignment=1) { create_with_own_data(point_type(width,height),alignment); } ! image(const image& img) : _alloc(img._alloc) { ! create_with_own_data(const_view(img).dimensions()); // TODO: Use the same alignment ! copy_pixels(const_view(img),_view); } template <typename V2,typename ALLOC2> image(const image<V2,ALLOC2>& img) :_alloc(img._alloc) { ! create_with_own_data(view(img).dimensions()); ! copy_pixels(view(img),_view); } ! template <typename IMG> image& operator=(const IMG& img) { image tmp(img); swap(tmp); return *this; } ! image& operator=(const image& img) { image tmp(img); swap(tmp); return *this; } ! ~image() { ! size_t size_in_bytes=_view.row_bytes()*_view.height(); if(std::iterator_traits<typename V::x_iterator>::is_planar) ! size_in_bytes*=V::color_space_type::num_channels; _alloc.deallocate((unsigned char*)&(_view(0,0)[0]),size_in_bytes); } ! template <typename V2, typename ALLOC2> friend const V2& view(image<V2,ALLOC2>& img); ! template <typename V2, typename ALLOC2> friend const typename V2::const_type& const_view(const image<V2,ALLOC2>& img); ! ALLOC& allocator() { return _alloc; } ! ALLOC const& allocator() const { return _alloc; } ! template <typename V2,typename ALLOC2> ! friend void swap(image<V2,ALLOC2>& im1,image<V2,ALLOC2>& im2); ! void swap(image& img) { GIL::swap(*this,img); } // required by boost::MutableContainerConcept private: ! view_type _view; // contains pointer to the pixels, the image size and ways to navigate pixels allocator_type _alloc; template <bool> class is_planar {}; ! void create_with_own_data(const point_type& dimensions, unsigned int alignment=1) { ! BOOST_STATIC_ASSERT(!has_dynamic_step<typename V::x_iterator>::value); ! create_with_own_data_(dimensions,alignment,is_planar<std::iterator_traits<typename V::x_iterator>::is_planar>()); ! } ! void create_with_own_data_(const point_type& dimensions, unsigned int alignment, is_planar<false>) { ! size_t rowsize_in_bytes=get_aligned(dimensions.x*sizeof(typename V::value_type),alignment); unsigned char* tmp=_alloc.allocate(rowsize_in_bytes*dimensions.y); ! try { ! _view=V(dimensions,typename V::x_iterator(tmp),rowsize_in_bytes); ! } catch(...) { ! _alloc.deallocate(tmp, rowsize_in_bytes*dimensions.y); ! throw; ! } ! } void create_with_own_data_(const point_type& dimensions, unsigned int alignment, is_planar<true>) { ! size_t planesize_in_bytes=get_aligned(dimensions.x*dimensions.y*sizeof(typename V::channel_type),alignment); ! size_t image_size_in_bytes=planesize_in_bytes*V::color_space_type::num_channels; ! unsigned char* tmp=_alloc.allocate(image_size_in_bytes); ! try { ! _view=V(dimensions, typename V::x_iterator(tmp,planesize_in_bytes),dimensions.x*sizeof(typename V::channel_type)); ! } catch(...) { ! _alloc.deallocate(tmp, image_size_in_bytes); ! throw; ! } } --- 181,297 ---- template <typename V2,typename ALLOC2> void swap(image<V2,ALLOC2>& im1,image<V2,ALLOC2>& im2); ! template <typename V, typename ALLOC=std::allocator<unsigned char> > class image { public: ! typedef ALLOC allocator_type; ! typedef V view_type; ! typedef typename view_type::const_type const_view_type; ! typedef typename view_type::point_type point_type; ! typedef typename view_type::coord_type coord_type; ! typedef coord_type x_coord_type; ! typedef coord_type y_coord_type; ! typedef typename view_type::iterator iterator; ! typedef iterator pointer; ! typedef typename const_view_type::iterator const_iterator; ! typedef const_iterator const_pointer; ! typedef typename view_type::difference_type difference_type; ! typedef typename view_type::value_type value_type; ! typedef typename view_type::reference reference; ! typedef typename const_view_type::reference const_reference; ! typedef typename view_type::size_type size_type; ! typedef typename view_type::reverse_iterator reverse_iterator; ! typedef typename const_view_type::reverse_iterator const_reverse_iterator; ! ! const_iterator begin() const { return const_view(*this).begin(); } ! const_iterator end() const { return const_view(*this).end(); } ! const_reverse_iterator rbegin() const { return const_view(*this).rbegin(); } ! const_reverse_iterator rend() const { return const_view(*this).rend(); } ! iterator begin() { return _view.begin(); } ! iterator end() { return _view.end(); } ! reverse_iterator rbegin() { return _view.rbegin(); } ! reverse_iterator rend() { return _view.rend(); } ! reference operator[](size_type i) { return _view[i]; } ! const_reference operator[](size_type i) const { return const_view(*this)[i]; } // Warning: Slow!! ! size_type size() const { return _view.size(); } ! size_type max_size() const { return size(); } ! bool empty() const { return size()==0; } ! const point_type& dimensions() const { return _view.dimensions(); } ! x_coord_type width() const { return _view.width(); } ! y_coord_type height() const { return _view.height(); } ! image() {} ! // image that allocates own data. Calls new/delete[] ! image(const point_type& dimensions, unsigned int alignment=1) { create_with_own_data(dimensions,alignment); } ! image(x_coord_type width, y_coord_type height, unsigned int alignment=1) { create_with_own_data(point_type(width,height),alignment); } ! image(const image& img) : _alloc(img._alloc) { ! create_with_own_data(const_view(img).dimensions()); // TODO: Use the same alignment ! copy_pixels(const_view(img),_view); } template <typename V2,typename ALLOC2> image(const image<V2,ALLOC2>& img) :_alloc(img._alloc) { ! create_with_own_data(view(img).dimensions()); ! copy_pixels(view(img),_view); } ! template <typename IMG> image& operator=(const IMG& img) { image tmp(img); swap(tmp); return *this; } ! image& operator=(const image& img) { image tmp(img); swap(tmp); return *this; } ! ~image() { ! std::size_t size_in_bytes=_view.row_bytes()*_view.height(); if(std::iterator_traits<typename V::x_iterator>::is_planar) ! size_in_bytes*=V::color_space_type::num_channels; _alloc.deallocate((unsigned char*)&(_view(0,0)[0]),size_in_bytes); } ! template <typename V2, typename ALLOC2> friend const V2& view(image<V2,ALLOC2>& img); ! template <typename V2, typename ALLOC2> friend const typename V2::const_type& const_view(const image<V2,ALLOC2>& img); ! ALLOC& allocator() { return _alloc; } ! ALLOC const& allocator() const { return _alloc; } ! template <typename V2,typename ALLOC2> ! friend void swap(image<V2,ALLOC2>& im1,image<V2,ALLOC2>& im2); ! void swap(image& img) { GIL::swap(*this,img); } // required by boost::MutableContainerConcept private: ! view_type _view; // contains pointer to the pixels, the image size and ways to navigate pixels allocator_type _alloc; template <bool> class is_planar {}; ! void create_with_own_data(const point_type& dimensions, unsigned int alignment=1) { ! BOOST_STATIC_ASSERT(!has_dynamic_step<typename V::x_iterator>::value); ! create_with_own_data_(dimensions,alignment,is_planar<std::iterator_traits<typename V::x_iterator>::is_planar>()); ! } ! void create_with_own_data_(const point_type& dimensions, unsigned int alignment, is_planar<false>) { ! std::size_t rowsize_in_bytes=get_aligned(dimensions.x*sizeof(typename V::value_type),alignment); unsigned char* tmp=_alloc.allocate(rowsize_in_bytes*dimensions.y); ! try { ! _view=V(dimensions,typename V::x_iterator(tmp),rowsize_in_bytes); ! } catch(...) { ! _alloc.deallocate(tmp, rowsize_in_bytes*dimensions.y); ! throw; ! } ! } void create_with_own_data_(const point_type& dimensions, unsigned int alignment, is_planar<true>) { ! std::size_t planesize_in_bytes=get_aligned(dimensions.x*dimensions.y*sizeof(typename V::channel_type),alignment); ! std::size_t image_size_in_bytes=planesize_in_bytes*V::color_space_type::num_channels; ! unsigned char* tmp=_alloc.allocate(image_size_in_bytes); ! try { ! _view=V(dimensions, typename V::x_iterator(tmp,planesize_in_bytes),dimensions.x*sizeof(typename V::channel_type)); ! } catch(...) { ! _alloc.deallocate(tmp, image_size_in_bytes); ! throw; ! } } *************** *** 302,306 **** if (&im1==&im2) return true; if (const_view(im1).dimensions()!=const_view(im2).dimensions()) return false; ! return std::equal(const_view(im1).begin(),const_view(im1).end(),const_view(im2).begin()); // TODO: change this to equal_pixels (for performance) } template <typename V1,typename V2> --- 302,306 ---- if (&im1==&im2) return true; if (const_view(im1).dimensions()!=const_view(im2).dimensions()) return false; ! return std::equal(const_view(im1).begin(),const_view(im1).end(),const_view(im2).begin()); // TODO: change this to equal_pixels (for performance) } template <typename V1,typename V2> *************** *** 309,340 **** template <typename V2,typename ALLOC2> inline void swap(image<V2,ALLOC2>& im1,image<V2,ALLOC2>& im2) { ! swap(im1._view, im2._view); ! std::swap(im1.allocator(), im2.allocator()); } template <typename C> class variant; namespace detail { ! template <typename VC> // Models View Concept Space ! struct any_image_get_view { ! typedef variant<VC> result_type; ! template <typename V> result_type operator()( image<V>& img) const { return result_type(view(img)); } ! }; ! template <typename VC> // Models ConstView Concept Space ! struct any_image_get_const_view { ! typedef variant<VC> result_type; ! template <typename V> result_type operator()(const image<V>& img) const { return result_type(const_view(img)); } ! }; ! struct any_image_view_get_num_channels { ! typedef int result_type; ! template <typename VIEW> result_type operator()(const VIEW& v) const { ! return VIEW::color_space_type::num_channels; ! } ! }; ! struct any_image_view_get_dimensions { ! typedef point2<ptrdiff_t> result_type; ! template <typename VIEW> result_type operator()(const VIEW& v) const { ! return v.dimensions(); ! } ! }; } --- 309,340 ---- template <typename V2,typename ALLOC2> inline void swap(image<V2,ALLOC2>& im1,image<V2,ALLOC2>& im2) { ! swap(im1._view, im2._view); ! std::swap(im1.allocator(), im2.allocator()); } template <typename C> class variant; namespace detail { ! template <typename VC> // Models View Concept Space ! struct any_image_get_view { ! typedef variant<VC> result_type; ! template <typename V> result_type operator()( image<V>& img) const { return result_type(view(img)); } ! }; ! template <typename VC> // Models ConstView Concept Space ! struct any_image_get_const_view { ! typedef variant<VC> result_type; ! template <typename V> result_type operator()(const image<V>& img) const { return result_type(const_view(img)); } ! }; ! struct any_image_view_get_num_channels { ! typedef int result_type; ! template <typename VIEW> result_type operator()(const VIEW& v) const { ! return VIEW::color_space_type::num_channels; ! } ! }; ! struct any_image_view_get_dimensions { ! typedef point2<ptrdiff_t> result_type; ! template <typename VIEW> result_type operator()(const VIEW& v) const { ! return v.dimensions(); ! } ! }; } *************** *** 352,417 **** /// \brief Returns the non-constant-pixel view of any image. The returned view is any view. See variant.h for more ! template <typename IC> // Models Image Concept Space inline variant<typename IC::view_concept_space> view(variant<IC>& anyImage) { ! return anyImage.apply_visitor(detail::any_image_get_view<typename IC::view_concept_space>()); } /// \brief Returns the constant-pixel view of any image. The returned view is any view. See variant.h for more ! template <typename IC> // Models Image Concept Space inline variant<typename IC::const_view_concept_space> const_view(const variant<IC>& anyImage) { ! return anyImage.apply_visitor(detail::any_image_get_const_view<typename IC::const_view_concept_space>()); } ///@} ///@{ ! /// \name get_num_channels ! /// \brief Returns the number of channels of an image view /// \ingroup ImageView ! template <typename LOC> ! int get_num_channels(const image_view<LOC>& view) { ! return image_view<LOC>::color_space_type::num_channels; ! } ! template <typename C_S> int get_num_channels(const variant<C_S>& img_view) { ! return img_view.apply_visitor(detail::any_image_view_get_num_channels()); } - ///@} - - ///@{ - /// \name get_width, get_height, get_dimensions - /// \brief Returns the dimensions of an image view - - /// \ingroup ImageView - /// \brief Returns the width of a templated image view - template <typename LOC> - int get_width(const image_view<LOC>& view) { return view.width(); } /// \brief Returns the width of any image view template <typename C_S> int get_width(const variant<C_S>& img_view) { ! return img_view.apply_visitor(detail::any_image_view_get_dimensions()).x; } - /// \brief Returns the height of a templated image view - template <typename LOC> - int get_height(const image_view<LOC>& view) { return view.width(); } - /// \brief Returns the height of any image view template <typename C_S> int get_height(const variant<C_S>& img_view) { ! return img_view.apply_visitor(detail::any_image_view_get_dimensions()).y; } - /// \brief Returns the dimensions of a templated image view - template <typename LOC> - point2<int> get_dimensions(const image_view<LOC>& view) { return view.dimensions(); } - /// \brief Returns the dimensions of any image view template <typename C_S> point2<int> get_dimensions(const variant<C_S>& img_view) { ! return img_view.apply_visitor(detail::any_image_view_get_dimensions()); } ///@} --- 352,395 ---- /// \brief Returns the non-constant-pixel view of any image. The returned view is any view. See variant.h for more ! template <typename IC> // Models Image Concept Space inline variant<typename IC::view_concept_space> view(variant<IC>& anyImage) { ! return anyImage.apply_visitor(detail::any_image_get_view<typename IC::view_concept_space>()); } /// \brief Returns the constant-pixel view of any image. The returned view is any view. See variant.h for more ! template <typename IC> // Models Image Concept Space inline variant<typename IC::const_view_concept_space> const_view(const variant<IC>& anyImage) { ! return anyImage.apply_visitor(detail::any_image_get_const_view<typename IC::const_view_concept_space>()); } ///@} ///@{ ! /// \name get_width, get_height, get_dimensions, get_num_channels ! /// \brief Returns the dimensions of an image view variant /// \ingroup ImageView ! /// \brief Returns the number of channels of an image view template <typename C_S> int get_num_channels(const variant<C_S>& img_view) { ! return img_view.apply_visitor(detail::any_image_view_get_num_channels()); } /// \brief Returns the width of any image view template <typename C_S> int get_width(const variant<C_S>& img_view) { ! return img_view.apply_visitor(detail::any_image_view_get_dimensions()).x; } /// \brief Returns the height of any image view template <typename C_S> int get_height(const variant<C_S>& img_view) { ! return img_view.apply_visitor(detail::any_image_view_get_dimensions()).y; } /// \brief Returns the dimensions of any image view template <typename C_S> point2<int> get_dimensions(const variant<C_S>& img_view) { ! return img_view.apply_visitor(detail::any_image_view_get_dimensions()); } ///@} *************** *** 424,435 **** template <typename IMG> void resize_clobber_image(IMG& img, const typename IMG::point_type& new_size) { ! gil_function_requires<ImageConcept<IMG> >(); ! IMG tmp(new_size); ! swap(tmp,img); } template <typename IMG> void resize_clobber_image(IMG& img, const typename IMG::x_coord_type& width, const typename IMG::y_coord_type& height) { ! resize_clobber_image(img, typename IMG::point_type(width,height)); } ///@} --- 402,413 ---- template <typename IMG> void resize_clobber_image(IMG& img, const typename IMG::point_type& new_size) { ! gil_function_requires<ImageConcept<IMG> >(); ! IMG tmp(new_size); ! swap(tmp,img); } template <typename IMG> void resize_clobber_image(IMG& img, const typename IMG::x_coord_type& width, const typename IMG::y_coord_type& height) { ! resize_clobber_image(img, typename IMG::point_type(width,height)); } ///@} Index: cmyk.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/gil/core/cmyk.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cmyk.hpp 9 Jan 2006 19:41:09 -0000 1.1 --- cmyk.hpp 3 Feb 2006 18:20:46 -0000 1.2 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 14,18 **** /// \brief Support for CMYK color space and variants /// \author Lubomir Bourdev and Hailin Jin \n ! /// Adobe Systems Incorporated //////////////////////////////////////////////////////////////////////////////////////// --- 14,18 ---- /// \brief Support for CMYK color space and variants /// \author Lubomir Bourdev and Hailin Jin \n ! /// Adobe Systems Incorporated //////////////////////////////////////////////////////////////////////////////////////// *************** *** 35,67 **** /// \ingroup CMYK struct cmyk_tag { ! typedef cmyk_tag base; ! BOOST_STATIC_CONSTANT(int, num_channels=4); }; namespace detail { ! /// \ingroup ColorBase ! /// \ingroup CMYK ! /// \brief cyan, magenta, yellow and black channel values/references/pointers ! /// ! /// Represents a CMYK unit of channel values (when used to construct a pixel), channel references (when used in a planar CMYK reference) ! /// or channel pointers (when used in a CMYK planar pointer) defined in this specific ordering in memory. Also provides channel accessors ! /// v0(), v1(), v2(), v3() agnostic of color space, which allow uniform operations on channels of different color spaces. The accessors also have ! /// consistent mapping between color bases representing order variations of the same color space. For example, v0() returns the red ! /// channel value/reference/pointer in both an rgb color base and in a bgr color base. ! template <typename T> ! struct color_base<T,cmyk_tag> { ! typedef cmyk_tag color_space_type; ! typedef T channel_type; ! typedef typename boost::add_const<channel_type>::type channel_const_type; ! typedef typename boost::add_reference<channel_type>::type channel_reference; ! typedef typename boost::add_reference<channel_const_type>::type channel_const_reference; ! T c,m,y,k; ! color_base() {} ! color_base(channel_type v0, channel_type v1, channel_type v2, channel_type v3) : c(v0), m(v1), y(v2), k(v3) {} ! template <typename T1, typename C1> color_base(const color_base<T1,C1>& cb) : c(cb.c), m(cb.m), y(cb.y), k(cb.k) {} ! template <typename T1, typename C1> color_base( color_base<T1,C1>& cb) : c(cb.c), m(cb.m), y(cb.y), k(cb.k) {} ! }; } --- 35,67 ---- /// \ingroup CMYK struct cmyk_tag { ! typedef cmyk_tag base; ! BOOST_STATIC_CONSTANT(int, num_channels=4); }; namespace detail { ! /// \ingroup ColorBase ! /// \ingroup CMYK ! /// \brief cyan, magenta, yellow and black channel values/references/pointers ! /// ! /// Represents a CMYK unit of channel values (when used to construct a pixel), channel references (when used in a planar CMYK reference) ! /// or channel pointers (when used in a CMYK planar pointer) defined in this specific ordering in memory. Also provides channel accessors ! /// v0(), v1(), v2(), v3() agnostic of color space, which allow uniform operations on channels of different color spaces. The accessors also have ! /// consistent mapping between color bases representing order variations of the same color space. For example, v0() returns the red ! /// channel value/reference/pointer in both an rgb color base and in a bgr color base. ! template <typename T> ! struct color_base<T,cmyk_tag> { ! typedef cmyk_tag color_space_type; ! typedef T channel_type; ! typedef typename boost::add_const<channel_type>::type channel_const_type; ! typedef typename boost::add_reference<channel_type>::type channel_reference; ! typedef typename boost::add_reference<channel_const_type>::type channel_const_reference; ! T c,m,y,k; ! color_base() {} ! color_base(channel_type v0, channel_type v1, channel_type v2, channel_type v3) : c(v0), m(v1), y(v2), k(v3) {} ! template <typename T1, typename C1> color_base(const color_base<T1,C1>& cb) : c(cb.c), m(cb.m), y(cb.y), k(cb.k) {} ! template <typename T1, typename C1> color_base( color_base<T1,C1>& cb) : c(cb.c), m(cb.m), y(cb.y), k(cb.k) {} ! }; } *************** *** 74,78 **** //////////////////////////////////////////////////////////////////////////////////////// ! /// PLANAR CMYK //////////////////////////////////////////////////////////////////////////////////////// --- 74,78 ---- //////////////////////////////////////////////////////////////////////////////////////// ! /// PLANAR CMYK //////////////////////////////////////////////////////////////////////////////////////// *************** *** 86,110 **** template <typename T> struct planar_ptr<T,cmyk_tag> : public planar_ptr_base<T,cmyk_tag> { ! typedef planar_ptr_base<T,cmyk_tag> parent_type; typedef typename parent_type::reference reference; typedef typename parent_type::color_space_type color_space_type; ! planar_ptr() : parent_type(0,0,0,0) {} ! planar_ptr(T* ic, T* im, T* iy, T* ik) : parent_type(ic,im,iy,ik) {} ! // from raw data ! planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step), (T*)(data+step*3)) {} ! planar_ptr(const planar_ptr& ptr) : parent_type(ptr) {} ! planar_ptr& operator=(const planar_ptr& ptr) { this->p=ptr.p; return *this; } ! /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. ! /// That allow constructs like pointer = &value or pointer = &reference ! /// Since we should not override operator& that's the best we can do. ! template <typename T1, typename C1> planar_ptr(pixel<T1,C1>* pix) : parent_type(&pix->template v<0>(),&pix->template v<1>(), &pix->template v<2>(), &pix->template v<3>()) { STATIC_ASSERT_COMPATIBLE(T1,C1,T,color_space_type); } ! template <typename T1, typename C1> planar_ptr& operator=(pixel<T1,C1>* pix) { STATIC_ASSERT_COMPATIBLE(T1,C1,T,color_space_type); this->p.template v<0>()=&pix->template v<0>(); --- 86,110 ---- template <typename T> struct planar_ptr<T,cmyk_tag> : public planar_ptr_base<T,cmyk_tag> { ! typedef planar_ptr_base<T,cmyk_tag> parent_type; typedef typename parent_type::reference reference; typedef typename parent_type::color_space_type color_space_type; ! planar_ptr() : parent_type(0,0,0,0) {} ! planar_ptr(T* ic, T* im, T* iy, T* ik) : parent_type(ic,im,iy,ik) {} ! // from raw data ! planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step), (T*)(data+step*3)) {} ! planar_ptr(const planar_ptr& ptr) : parent_type(ptr) {} ! planar_ptr& operator=(const planar_ptr& ptr) { this->p=ptr.p; return *this; } ! /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. ! /// That allow constructs like pointer = &value or pointer = &reference ! /// Since we should not override operator& that's the best we can do. ! template <typename T1, typename C1> planar_ptr(pixel<T1,C1>* pix) : parent_type(&pix->template v<0>(),&pix->template v<1>(), &pix->template v<2>(), &pix->template v<3>()) { STATIC_ASSERT_COMPATIBLE(T1,C1,T,color_space_type); } ! template <typename T1, typename C1> planar_ptr& operator=(pixel<T1,C1>* pix) { STATIC_ASSERT_COMPATIBLE(T1,C1,T,color_space_type); this->p.template v<0>()=&pix->template v<0>(); *************** *** 115,119 **** } ! reference dereference() const { return reference(*(this->p.c),*(this->p.m),*(this->p.y),*(this->p.k)); } }; --- 115,119 ---- } ! reference dereference() const { return reference(*(this->p.c),*(this->p.m),*(this->p.y),*(this->p.k)); } }; *************** *** 122,155 **** template <typename T> inline pixel<T&,cmyk_tag> byte_advanced_ref(const planar_ptr<T,cmyk_tag>& p, ptrdiff_t byteDiff) { ! return pixel<T&,cmyk_tag>(*byte_advanced(p.p.c, byteDiff), *byte_advanced(p.p.m, byteDiff), ! *byte_advanced(p.p.y, byteDiff), *byte_advanced(p.p.k, byteDiff)); } namespace detail { ! template <typename CS,int N> struct logical_channel_accessor; ! /// \ingroup ChannelAccessor ! template <> ! struct logical_channel_accessor<cmyk_tag,0> { ! template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,cmyk_tag>& p) const {return p.c;} ! template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,cmyk_tag>& p) const {return p.c;} ! }; ! /// \ingroup ChannelAccessor ! template <> ! struct logical_channel_accessor<cmyk_tag,1> { ! template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,cmyk_tag>& p) const {return p.m;} ! template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,cmyk_tag>& p) const {return p.m;} ! }; ! /// \ingroup ChannelAccessor ! template <> ! struct logical_channel_accessor<cmyk_tag,2> { ! template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,cmyk_tag>& p) const {return p.y;} ! template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,cmyk_tag>& p) const {return p.y;} ! }; ! /// \ingroup ChannelAccessor ! template <> ! struct logical_channel_accessor<cmyk_tag,3> { ! template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,cmyk_tag>& p) const {return p.k;} ! template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,cmyk_tag>& p) const {return p.k;} ! }; } --- 122,155 ---- template <typename T> inline pixel<T&,cmyk_tag> byte_advanced_ref(const planar_ptr<T,cmyk_tag>& p, ptrdiff_t byteDiff) { ! return pixel<T&,cmyk_tag>(*byte_advanced(p.p.c, byteDiff), *byte_advanced(p.p.m, byteDiff), ! *byte_advanced(p.p.y, byteDiff), *byte_advanced(p.p.k, byteDiff)); } namespace detail { ! template <typename CS,int N> struct logical_channel_accessor; ! /// \ingroup ChannelAccessor ! template <> ! struct logical_channel_accessor<cmyk_tag,0> { ! template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,cmyk_tag>& p) const {return p.c;} ! template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,cmyk_tag>& p) const {return p.c;} ! }; ! /// \ingroup ChannelAccessor ! template <> ! struct logical_channel_accessor<cmyk_tag,1> { ! template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,cmyk_tag>& p) const {return p.m;} ! template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,cmyk_tag>& p) const {return p.m;} ! }; ! /// \ingroup ChannelAccessor ! template <> ! struct logical_channel_accessor<cmyk_tag,2> { ! template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,cmyk_tag>& p) const {return p.y;} ! template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,cmyk_tag>& p) const {return p.y;} ! }; ! /// \ingroup ChannelAccessor ! template <> ! struct logical_channel_accessor<cmyk_tag,3> { ! template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,cmyk_tag>& p) const {return p.k;} ! template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,cmyk_tag>& p) const {return p.k;} ! }; } Index: pixel.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/gil/core/pixel.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pixel.hpp 9 Jan 2006 19:41:09 -0000 1.1 --- pixel.hpp 3 Feb 2006 18:20:46 -0000 1.2 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 11,18 **** //////////////////////////////////////////////////////////////////////////////////////// ! /// \file /// \brief generic pixel definitions and utilities /// \author Lubomir Bourdev and Hailin Jin \n ! /// Adobe Systems Incorporated /// Last updated on 11-06-2005 /// --- 11,18 ---- //////////////////////////////////////////////////////////////////////////////////////// ! /// \file /// \brief generic pixel definitions and utilities /// \author Lubomir Bourdev and Hailin Jin \n ! /// Adobe Systems Incorporated /// Last updated on 11-06-2005 /// *************** *** 31,217 **** namespace detail { ! /// \addtogroup ColorBase ! /// \brief Represents a bundle of channel values/references/pointers for a specific color space. ! /// ! /// The class is used in three different cases: ! /// - As a base for pixel values, in which case it instantiates into a set of channel values whose relative ordering is specified by C ! /// - As a base for the proxy class representing a reference to a planar pixel, in which case it instantiates into a set of channel references ! /// - In the construction of planar_ptr, the proxy class representing a pointer to a planar pixel, in which case in instantiates into a set of channel pointers ! /// ! /// Color bases also provide color-space independent accessors to the channel values/references/pointers, which allows us to perform color-space-independent ! /// channel operations (see pixel_base for more). ! /// ! /// color_base specializations are provided for each color space. See concrete specializations for more. ! template <typename T, typename C> struct color_base {}; ! /// \ingroup ColorConvert ! /// \brief Color Convertion function object. To be specialized for every src/dst color space ! template <typename T1, typename C1, typename T2, typename C2> ! struct _color_converter { ! template <typename P1, typename P2> void operator()(const P1& src, P2& dst); ! }; ! /// \addtogroup ChannelAccessor ! /// ! /// Returns the N-th logical channel of a pixel. Logical channel indices are the same across related color spaces. For example, the red channel has index 0 in both rgb and bgr ! /// Specialized for each index and each color space. Instead of this class, it would be easier to provide in each color base specialization a ! /// member function templated over the channel index. Unfortunately many compilers don't support fully specialized member functions inside partially specialized classes. ! template <typename CS,int N> struct logical_channel_accessor {}; ! /// \brief Returns the N-th channel of a pixel as laid down in memory ! /// \ingroup ChannelAccessor ! template <typename CS> ! struct physical_channel_accessor { ! // pixel has the structure of an array of T. Getting a reference to the i-th value ! template <typename T> T& operator()(pixel<T,CS>& p,size_t i) const { return ((T*)(&p))[i]; } ! template <typename T> const T& operator()(const pixel<T,CS>& p,size_t i) const {return ((const T*)(&p))[i]; } ! // pixel is an array of _references_ to T. Getting the i-th reference ! template <typename T> T& operator()(pixel<T&,CS>& p,size_t i) const { return *(((T**)((T*)&p))[i]); } ! template <typename T> const T& operator()(pixel<const T&,CS>& p,size_t i) const { return *(((const T**)((const T*)&p))[i]); } ! }; ! /// \brief compile-time recursion for per-channel operations of pixels ! /// \ingroup Pixel ! template <int N> struct recur { ! template <typename P,typename F> static void multiplies_eq(P& p, F x) { ! recur<N-1>::multiplies_eq(p,x); ! p.template v<N>()*=x; ! } ! template <typename P,typename F> static void divides_eq(P& p, F x) { ! recur<N-1>::divides_eq(p,x); ! p.template v<N>()/=x; ! } ! template <typename P1,typename P2> static void set_val(P1& p1, const P2& p2) { ! recur<N-1>::set_val(p1,p2); ! p1.template v<N>()=p2.template v<N>(); ! } ! template <typename P1,typename P2> static void plus_eq(P1& p1, const P2& p2) { ! recur<N-1>::plus_eq(p1,p2); ! p1.template v<N>()+=p2.template v<N>(); ! } ! template <typename P1,typename P2> static void minus_eq(P1& p1, const P2& p2) { ! recur<N-1>::minus_eq(p1,p2); ! p1.template v<N>()-=p2.template v<N>(); ! } ! template <typename P,typename T2> static void set_channels(P& p, T2 v) { ! recur<N-1>::set_channels(p,v); ! p.template v<N>()=v; ! } ! template <typename P1,typename P2> static bool equal_to(const P1& p1, const P2& p2) { ! return recur<N-1>::equal_to(p1,p2) && p1.template v<N>()==p2.template v<N>(); ! } ! template <typename OP,typename P1> ! static void per_channel_op(const P1& p1, OP& op) { ! recur<N-1>::per_channel_op(p1,op); ! op(p1.template v<N>()); ! } ! template <typename OP, typename P1,typename P2> ! static void per_channel_op(const P1& p1, const P2& p2, OP& op) { ! recur<N-1>::per_channel_op(p1,p2,op); ! op(p1.template v<N>(), p2.template v<N>()); ! } ! template <typename OP, typename P1,typename P2, typename P3> ! static void per_channel_op(const P1& p1, const P2& p2, const P3& p3, OP& op) { ! recur<N-1>::per_channel_op(p1,p2,p3,op); ! op(p1.template v<N>(), p2.template v<N>(), p3.template v<N>()); ! } ! template <typename OP,typename P> ! static void per_channel_set_op(P& dst, OP& op) { ! recur<N-1>::per_channel_set_op(dst,op); ! dst.template v<N>()=op(); ! } ! template <typename OP,typename P, typename P1> ! static void per_channel_set_op(P& dst, const P1& src, OP& op) { ! recur<N-1>::per_channel_set_op(dst,src,op); ! dst.template v<N>()=op(src.template v<N>()); ! } ! template <typename OP,typename P,typename P1, typename P2> ! static void per_channel_set_op(P& dst, const P1& src1, const P2& src2, OP& op) { ! recur<N-1>::per_channel_set_op(dst,src1,src2,op); ! dst.template v<N>()=op(src1.template v<N>(), src2.template v<N>()); ! } ! //#ifdef PROVIDE_CONST_VERSIONS ! template <typename OP,typename P1> ! static void per_channel_op(const P1& p1, const OP& op) { ! recur<N-1>::per_channel_op(p1,op); ! op(p1.template v<N>()); ! } ! template <typename OP, typename P1,typename P2> ! static void per_channel_op(const P1& p1, const P2& p2, const OP& op) { ! recur<N-1>::per_channel_op(p1,p2,op); ! op(p1.template v<N>(), p2.template v<N>()); ! } ! template <typename OP, typename P1, typename P2, typename P3> ! static void per_channel_op(const P1& p1, const P2& p2, const P3& p3, const OP& op) { ! recur<N-1>::per_channel_op(p1,p2,p3,op); ! op(p1.template v<N>(), p2.template v<N>(), p3.template v<N>()); ! } ! template <typename OP,typename P> ! static void per_channel_set_op(P& dst, const OP& op) { ! recur<N-1>::per_channel_set_op(dst,op); ! dst.template v<N>()=op(); ! } ! template <typename OP,typename P,typename P1> ! static void per_channel_set_op(P& dst, const P1& src, const OP& op) { ! recur<N-1>::per_channel_set_op(dst,src,op); ! dst.template v<N>()=op(src.template v<N>()); ! } ! template <typename OP,typename P,typename P1,typename P2> ! static void per_channel_set_op(P& dst, const P1& src1, const P2& src2, const OP& op) { ! recur<N-1>::per_channel_set_op(dst,src1,src2,op); ! dst.template v<N>()=op(src1.template v<N>(), src2.template v<N>()); ! } ! //#endif ! }; ! /// \brief termination condition of the compile-time recursion for channel operations on a pixel ! /// \ingroup Pixel ! template<> struct recur<-1> { ! template <typename P, typename F> static void multiplies_eq(P& p, F x) {} ! template <typename P, typename F> static void divides_eq(P& p, F x) {} ! template <typename P1,typename P2> static void set_val(P1& p1, const P2& p2) {} ! template <typename P1,typename P2> static void plus_eq(P1& p1, const P2& p2) {} ! template <typename P1,typename P2> static void minus_eq(P1& p1, const P2& p2) {} ! template <typename P, typename T2> static void set_channels(P& p, T2 v) {} ! template <typename P1,typename P2> static bool equal_to(const P1& p1, const P2& p2) { return true; } ! template <typename OP,typename P1> static void per_channel_op(const P1&,OP&){} ! template <typename OP,typename P1,typename P2> static void per_channel_op(const P1&,const P2&,OP&){} ! template <typename OP,typename P1,typename P2,typename P3> static void per_channel_op(const P1&,const P2&,const P3&,OP&){} ! template <typename OP,typename P> static void per_channel_set_op(P&,OP&){} ! template <typename OP,typename P, typename P1> static void per_channel_set_op(P&,const P1&,OP&){} ! template <typename OP,typename P, typename P1, typename P2> static void per_channel_set_op(P&,const P1&,const P2&,OP&){} ! //#ifdef PROVIDE_CONST_VERSIONS ! template <typename OP,typename P1> static void per_channel_op(const P1&,const OP&){} ! template <typename OP,typename P1,typename P2> static void per_channel_op(const P1&,const P2&,const OP&){} ! template <typename OP,typename P1,typename P2,typename P3> static void per_channel_op(const P1&,const P2&,const P3&,const OP&){} ! template <typename OP,typename P> static void per_channel_set_op(P&,const OP&){} ! template <typename OP,typename P, typename P1> static void per_channel_set_op(P&,const P1&,const OP&){} ! template <typename OP,typename P, typename P1, typename P2> static void per_channel_set_op(P&,const P1&,const P2&,const OP&){} ! //#endif ! }; ! /// \brief compile-time recursion for min/max channel ! /// \ingroup Pixel ! template <int N> ! struct min_max_recur { ! template <typename P> static typename P::channel_value_type max_(const P& p) { ! return std::max(min_max_recur<N-1>::max_(p),p.template v<N>()); ! } ! template <typename P> static typename P::channel_value_type min_(const P& p) { ! return std::min(min_max_recur<... [truncated message content] |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:26
|
Update of /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future/widgets/sources/mac Modified Files: display.cpp metrics.cpp ui_core_implementation.cpp ui_overlay.cpp Added Files: os_utilities.cpp Log Message: asl 1.0.13 Index: display.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/mac/display.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** display.cpp 6 Jan 2006 18:35:21 -0000 1.3 --- display.cpp 3 Feb 2006 18:20:45 -0000 1.4 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 20,28 **** struct view_wrap { ! explicit view_wrap(HIViewRef ref) : ! ref_m(ref) ! { } ! HIViewRef ref_m; }; --- 20,28 ---- struct view_wrap { ! explicit view_wrap(HIViewRef ref) : ! ref_m(ref) ! { } ! HIViewRef ref_m; }; *************** *** 31,35 **** HIViewRef unwrap(adobe::display_t::position_t& position) { ! return (boost::any_cast<view_wrap>(position)).ref_m; } --- 31,35 ---- HIViewRef unwrap(adobe::display_t::position_t& position) { ! return (boost::any_cast<view_wrap>(position)).ref_m; } *************** *** 38,42 **** adobe::display_t::position_t wrap(HIViewRef view) { ! return adobe::display_t::position_t(view_wrap(view)); } --- 38,42 ---- adobe::display_t::position_t wrap(HIViewRef view) { ! return adobe::display_t::position_t(view_wrap(view)); } *************** *** 48,52 **** #if 0 ! #pragma mark - #endif --- 48,52 ---- #if 0 ! #pragma mark - #endif *************** *** 63,69 **** display_t& get_main_display() { ! static display_t display_s; ! return display_s; } --- 63,69 ---- display_t& get_main_display() { ! static display_t display_s; ! return display_s; } *************** *** 72,78 **** struct display_t::implementation_t { ! void erase(display_t::position_t& position); ! std::vector<HIViewRef> roots_m; }; --- 72,78 ---- struct display_t::implementation_t { ! void erase(display_t::position_t& position); ! std::vector<HIViewRef> roots_m; }; *************** *** 85,90 **** /****************************************************************************************************/ #if 0 ! #pragma mark - #endif --- 85,96 ---- /****************************************************************************************************/ + template <> + HIViewRef unwrap_display_token<HIViewRef, adobe::display_t::position_t>(adobe::display_t::position_t& position) + { return (boost::any_cast<view_wrap>(position)).ref_m; } + + /****************************************************************************************************/ + #if 0 ! #pragma mark - #endif *************** *** 92,116 **** display_t::display_t() : ! object_m(new implementation_t()) ! { } display_t::~display_t() ! { delete object_m; object_m = 0; } display_t::implementation_t& display_t::implementation() ! { return *object_m; } const display_t::implementation_t& display_t::implementation() const ! { return *object_m; } display_t::position_t display_t::root() ! { return display_t::position_t(root_token()); } void display_t::erase(position_t& position) ! { return object_m->erase(position); } template <typename DisplayElement> display_t::position_t display_t::insert(position_t& parent, DisplayElement& element) ! { return insert(parent, adobe::view_for_element<HIViewRef>(element)); } /****************************************************************************************************/ --- 98,122 ---- display_t::display_t() : ! object_m(new implementation_t()) ! { } display_t::~display_t() ! { delete object_m; object_m = 0; } display_t::implementation_t& display_t::implementation() ! { return *object_m; } const display_t::implementation_t& display_t::implementation() const ! { return *object_m; } display_t::position_t display_t::root() ! { return display_t::position_t(root_token()); } void display_t::erase(position_t& position) ! { return object_m->erase(position); } template <typename DisplayElement> display_t::position_t display_t::insert(position_t& parent, DisplayElement& element) ! { return insert(parent, adobe::view_for_element<HIViewRef>(element)); } /****************************************************************************************************/ *************** *** 119,134 **** display_t::position_t display_t::insert<HIViewRef>(position_t& parent, HIViewRef& element) { ! if (parent.type() == typeid(view_wrap)) ! { ! HIViewRef parent_view(unwrap(parent)); ! ADOBE_REQUIRE_STATUS(::HIViewAddSubview(parent_view, element)); ! } ! else if (parent.type() == typeid(root_token)) ! { ! object_m->roots_m.push_back(element); ! } ! return wrap(element); } --- 125,140 ---- display_t::position_t display_t::insert<HIViewRef>(position_t& parent, HIViewRef& element) { ! if (parent.type() == typeid(view_wrap)) ! { ! HIViewRef parent_view(unwrap(parent)); ! ADOBE_REQUIRE_STATUS(::HIViewAddSubview(parent_view, element)); ! } ! else if (parent.type() == typeid(root_token)) ! { ! object_m->roots_m.push_back(element); ! } ! return wrap(element); } *************** *** 136,140 **** #if 0 ! #pragma mark - #endif --- 142,146 ---- #if 0 ! #pragma mark - #endif *************** *** 143,152 **** void display_t::implementation_t::erase(display_t::position_t&) { ! // REVISIT (fbrereto) : What should we do here? ! // 1) Call DetachSubView on the position? ! // 2) Call erase recursively for all children of the position? ! // 3) Invalidate (wipe) the position data? ! // 4) Invoke some (currently nonexistent) detach() callback for the client? ! // 4a) With what parameters, considering questions 1, 2, & 3? } --- 149,158 ---- void display_t::implementation_t::erase(display_t::position_t&) { ! // REVISIT (fbrereto) : What should we do here? ! // 1) Call DetachSubView on the position? ! // 2) Call erase recursively for all children of the position? ! // 3) Invalidate (wipe) the position data? ! // 4) Invoke some (currently nonexistent) detach() callback for the client? ! // 4a) With what parameters, considering questions 1, 2, & 3? } Index: metrics.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/mac/metrics.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** metrics.cpp 6 Jan 2006 18:35:21 -0000 1.5 --- metrics.cpp 3 Feb 2006 18:20:45 -0000 1.6 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 26,63 **** adobe::dictionary_t widget_metrics(const std::string& xstr, const adobe::dictionary_t& context) { ! std::vector<adobe::attribute_set_t::value_type> context_attribute_set; ! if (!context.count(adobe::static_name_t("theme"))) ! context_attribute_set.push_back(std::make_pair(adobe::static_token_range("theme"), adobe::static_token_range("normal"))); ! for ( dictionary_t::const_iterator first(context.begin()), last(context.end()); ! first != last; ++first) ! { ! const char* key_c_str(first->first.get()); ! const char* value_c_str(first->second.get<adobe::name_t>().get()); ! adobe::token_range_t key(key_c_str, key_c_str + std::strlen(key_c_str)); ! adobe::token_range_t value(value_c_str, value_c_str + std::strlen(value_c_str)); ! context_attribute_set.push_back(std::make_pair(key, value)); ! } ! adobe::xstring_context_t local_context(context_attribute_set.begin(), context_attribute_set.end()); ! std::string utf8(adobe::xstring(xstr.c_str(), xstr.size())); ! if (utf8.empty()) return adobe::dictionary_t(); ! std::stringstream expression_stream(utf8); ! expression_parser parser(expression_stream, line_position_t("widget_metrics")); ! array_t expression; ! parser.require_expression(expression); ! virtual_machine_t machine; ! machine.evaluate(expression); ! return machine.back().value_m.get<adobe::dictionary_t>(); } --- 26,63 ---- adobe::dictionary_t widget_metrics(const std::string& xstr, const adobe::dictionary_t& context) { ! std::vector<adobe::attribute_set_t::value_type> context_attribute_set; ! if (!context.count(adobe::static_name_t("theme"))) ! context_attribute_set.push_back(std::make_pair(adobe::static_token_range("theme"), adobe::static_token_range("normal"))); ! for ( dictionary_t::const_iterator first(context.begin()), last(context.end()); ! first != last; ++first) ! { ! const char* key_c_str(first->first.get()); ! const char* value_c_str(first->second.get<adobe::name_t>().get()); ! adobe::token_range_t key(key_c_str, key_c_str + std::strlen(key_c_str)); ! adobe::token_range_t value(value_c_str, value_c_str + std::strlen(value_c_str)); ! context_attribute_set.push_back(std::make_pair(key, value)); ! } ! adobe::xstring_context_t local_context(context_attribute_set.begin(), context_attribute_set.end()); ! std::string utf8(adobe::xstring(xstr.c_str(), xstr.size())); ! if (utf8.empty()) return adobe::dictionary_t(); ! std::stringstream expression_stream(utf8); ! expression_parser parser(expression_stream, line_position_t("widget_metrics")); ! array_t expression; ! parser.require_expression(expression); ! virtual_machine_t machine; ! machine.evaluate(expression); ! return machine.back().value_m.get<adobe::dictionary_t>(); } Index: ui_overlay.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/mac/ui_overlay.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ui_overlay.cpp 6 Jan 2006 18:35:21 -0000 1.4 --- ui_overlay.cpp 3 Feb 2006 18:20:45 -0000 1.5 *************** *** 1,10 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #include "ui_overlay.hpp" #include "carbon_safe.hpp" --- 1,12 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ + #ifndef NDEBUG + #include "ui_overlay.hpp" #include "carbon_safe.hpp" *************** *** 22,32 **** struct overlay_data_t { ! adobe::point_2d_t origin_m; ! adobe::extents_t extents_m; }; /****************************************************************************************************/ ! typedef adobe::forest<overlay_data_t> overlay_forest_t; /****************************************************************************************************/ --- 24,34 ---- struct overlay_data_t { ! adobe::point_2d_t origin_m; ! adobe::extents_t extents_m; }; /****************************************************************************************************/ ! typedef adobe::forest<overlay_data_t> overlay_forest_t; /****************************************************************************************************/ *************** *** 34,38 **** overlay_forest_t::iterator unwrap(adobe::ui_overlay_t::position_t& position) { ! return boost::any_cast<overlay_forest_t::iterator>(position); } --- 36,40 ---- overlay_forest_t::iterator unwrap(adobe::ui_overlay_t::position_t& position) { ! return boost::any_cast<overlay_forest_t::iterator>(position); } *************** *** 41,45 **** adobe::ui_overlay_t::position_t wrap(overlay_forest_t::iterator view) { ! return adobe::ui_overlay_t::position_t(view); } --- 43,47 ---- adobe::ui_overlay_t::position_t wrap(overlay_forest_t::iterator view) { ! return adobe::ui_overlay_t::position_t(view); } *************** *** 56,112 **** struct ui_overlay_t::implementation_t { ! implementation_t(); ! ~implementation_t(); ! struct draw_element_t ! { ! enum element_type ! { ! element_type_top_left, ! element_type_top_right, ! element_type_bottom_left, ! element_type_bottom_right, ! element_type_horizontal_poi, ! element_type_vertical_poi, ! element_type_count // always be last ! }; ! draw_element_t(element_type type, const CGRect& rect, const RGBColor& color) : ! type_m(type), rect_m(rect), color_m(color) ! { } ! draw_element_t(const draw_element_t& rhs) : ! type_m(rhs.type_m), rect_m(rhs.rect_m), color_m(rhs.color_m) ! { } ! element_type type_m; ! CGRect rect_m; ! RGBColor color_m; ! }; ! typedef std::vector<draw_element_t> draw_element_set_t; ! position_t root(HIViewRef& element); ! position_t insert(position_t parent); ! void place(position_t node, const point_2d_t& origin, const extents_t& extents); ! void framing(bool do_framing); ! overlay_data_t flatten_overlay_data(overlay_forest_t::iterator iter); ! void tick_extents(const overlay_data_t& overlay_data, draw_element_set_t& set); ! void overlay_bounds_update(); ! void draw_tick(CGContextRef context, const draw_element_set_t::value_type& element); ! WindowRef overlay_m; ! WindowRef source_m; ! ControlRef control_m; ! bool framing_m; ! overlay_forest_t tree_m; }; --- 58,114 ---- struct ui_overlay_t::implementation_t { ! implementation_t(); ! ~implementation_t(); ! struct draw_element_t ! { ! enum element_type ! { ! element_type_top_left, ! element_type_top_right, ! element_type_bottom_left, ! element_type_bottom_right, ! element_type_horizontal_poi, ! element_type_vertical_poi, ! element_type_count // always be last ! }; ! draw_element_t(element_type type, const CGRect& rect, const RGBColor& color) : ! type_m(type), rect_m(rect), color_m(color) ! { } ! draw_element_t(const draw_element_t& rhs) : ! type_m(rhs.type_m), rect_m(rhs.rect_m), color_m(rhs.color_m) ! { } ! element_type type_m; ! CGRect rect_m; ! RGBColor color_m; ! }; ! typedef std::vector<draw_element_t> draw_element_set_t; ! position_t root(HIViewRef& element); ! position_t insert(position_t parent); ! void place(position_t node, const point_2d_t& origin, const extents_t& extents); ! void framing(bool do_framing); ! overlay_data_t flatten_overlay_data(overlay_forest_t::iterator iter); ! void tick_extents(const overlay_data_t& overlay_data, draw_element_set_t& set); ! void overlay_bounds_update(); ! void draw_tick(CGContextRef context, const draw_element_set_t::value_type& element); ! WindowRef overlay_m; ! WindowRef source_m; ! ControlRef control_m; ! bool framing_m; ! overlay_forest_t tree_m; }; *************** *** 123,137 **** pascal void draw_overlay(ControlRef control, SInt16) { ! adobe::ui_overlay_t::implementation_t& overlay ! (*reinterpret_cast<adobe::ui_overlay_t::implementation_t*> ! (::GetControlReference(control))); ! overlay.framing(overlay.framing_m); } /****************************************************************************************************/ ! typedef adobe::point_2d<float> coord_t; ! typedef std::vector<coord_t> coord_set_t; /****************************************************************************************************/ --- 125,139 ---- pascal void draw_overlay(ControlRef control, SInt16) { ! adobe::ui_overlay_t::implementation_t& overlay ! (*reinterpret_cast<adobe::ui_overlay_t::implementation_t*> ! (::GetControlReference(control))); ! overlay.framing(overlay.framing_m); } /****************************************************************************************************/ ! typedef adobe::point_2d<float> coord_t; ! typedef std::vector<coord_t> coord_set_t; /****************************************************************************************************/ *************** *** 139,155 **** void draw_line_path(CGContextRef context, coord_set_t& coord_set) { ! if (coord_set.size() < 2) return; ! coord_set_t::iterator iter(coord_set.begin()); ! coord_set_t::iterator last(coord_set.end()); ! ::CGContextMoveToPoint(context, iter->x_m, iter->y_m); ! while (++iter != last) ::CGContextAddLineToPoint(context, iter->x_m, iter->y_m); ! ::CGContextStrokePath(context); ! ::CGContextClosePath(context); ! coord_set.clear(); } --- 141,157 ---- void draw_line_path(CGContextRef context, coord_set_t& coord_set) { ! if (coord_set.size() < 2) return; ! coord_set_t::iterator iter(coord_set.begin()); ! coord_set_t::iterator last(coord_set.end()); ! ::CGContextMoveToPoint(context, iter->x_m, iter->y_m); ! while (++iter != last) ::CGContextAddLineToPoint(context, iter->x_m, iter->y_m); ! ::CGContextStrokePath(context); ! ::CGContextClosePath(context); ! coord_set.clear(); } *************** *** 165,169 **** ui_overlay_t::ui_overlay_t() : ! object_m(new implementation_t()) { } --- 167,171 ---- ui_overlay_t::ui_overlay_t() : ! object_m(new implementation_t()) { } *************** *** 197,201 **** #if 0 ! #pragma mark - #endif --- 199,203 ---- #if 0 ! #pragma mark - #endif *************** *** 203,210 **** ui_overlay_t::implementation_t::implementation_t() : ! overlay_m(0), ! source_m(0), ! control_m(0), ! framing_m(false) { } --- 205,212 ---- ui_overlay_t::implementation_t::implementation_t() : ! overlay_m(0), ! source_m(0), ! control_m(0), ! framing_m(false) { } *************** *** 213,219 **** ui_overlay_t::implementation_t::~implementation_t() { ! if (overlay_m) ::DisposeWindow(overlay_m); ! overlay_m = 0; } --- 215,221 ---- ui_overlay_t::implementation_t::~implementation_t() { ! if (overlay_m) ::DisposeWindow(overlay_m); ! overlay_m = 0; } *************** *** 222,253 **** ui_overlay_t::position_t ui_overlay_t::implementation_t::root(HIViewRef& element) { ! assert(!control_m); ! assert(element); ! Rect global_bounds; ! WindowGroupRef new_group; ! Rect one_bounds = { 0, 0, 1, 1 }; ! WindowRef owner(::GetControlOwner(element)); ! static ControlUserPaneDrawUPP draw_handler(::NewControlUserPaneDrawUPP(draw_overlay)); ! source_m = owner; ! ADOBE_REQUIRE_STATUS(::GetWindowBounds(source_m, kWindowGlobalPortRgn, &global_bounds)); ! ADOBE_REQUIRE_STATUS(::CreateNewWindow(kOverlayWindowClass, kWindowCompositingAttribute, &global_bounds, &overlay_m)); ! ADOBE_REQUIRE_STATUS(::CreateUserPaneControl(overlay_m, &one_bounds, 0, &control_m)); ! ::ShowWindow(overlay_m); ! ::SetControlReference(control_m, reinterpret_cast<SInt32>(this)); ! ::SetControlData(control_m, kControlEntireControl, kControlUserPaneDrawProcTag, sizeof(ControlUserPaneDrawUPP), &draw_handler); ! ADOBE_REQUIRE_STATUS(::CreateWindowGroup(kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether, &new_group)); ! ADOBE_REQUIRE_STATUS(::SetWindowGroupParent(new_group, ::GetWindowGroup(source_m))); ! ADOBE_REQUIRE_STATUS(::SetWindowGroup(source_m, new_group)); ! ADOBE_REQUIRE_STATUS(::SetWindowGroup(overlay_m, new_group)); ! return wrap(tree_m.insert(tree_m.begin(), overlay_data_t())); } --- 224,255 ---- ui_overlay_t::position_t ui_overlay_t::implementation_t::root(HIViewRef& element) { ! assert(!control_m); ! assert(element); ! Rect global_bounds; ! WindowGroupRef new_group; ! Rect one_bounds = { 0, 0, 1, 1 }; ! WindowRef owner(::GetControlOwner(element)); ! static ControlUserPaneDrawUPP draw_handler(::NewControlUserPaneDrawUPP(draw_overlay)); ! source_m = owner; ! ADOBE_REQUIRE_STATUS(::GetWindowBounds(source_m, kWindowGlobalPortRgn, &global_bounds)); ! ADOBE_REQUIRE_STATUS(::CreateNewWindow(kOverlayWindowClass, kWindowCompositingAttribute, &global_bounds, &overlay_m)); ! ADOBE_REQUIRE_STATUS(::CreateUserPaneControl(overlay_m, &one_bounds, 0, &control_m)); ! ::ShowWindow(overlay_m); ! ::SetControlReference(control_m, reinterpret_cast<SInt32>(this)); ! ::SetControlData(control_m, kControlEntireControl, kControlUserPaneDrawProcTag, sizeof(ControlUserPaneDrawUPP), &draw_handler); ! ADOBE_REQUIRE_STATUS(::CreateWindowGroup(kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether, &new_group)); ! ADOBE_REQUIRE_STATUS(::SetWindowGroupParent(new_group, ::GetWindowGroup(source_m))); ! ADOBE_REQUIRE_STATUS(::SetWindowGroup(source_m, new_group)); ! ADOBE_REQUIRE_STATUS(::SetWindowGroup(overlay_m, new_group)); ! return wrap(tree_m.insert(tree_m.begin(), overlay_data_t())); } *************** *** 256,260 **** ui_overlay_t::position_t ui_overlay_t::implementation_t::insert(position_t parent) { ! return wrap(tree_m.insert(adobe::trailing_of(unwrap(parent)), overlay_data_t())); } --- 258,262 ---- ui_overlay_t::position_t ui_overlay_t::implementation_t::insert(position_t parent) { ! return wrap(tree_m.insert(adobe::trailing_of(unwrap(parent)), overlay_data_t())); } *************** *** 263,275 **** void ui_overlay_t::implementation_t::place(position_t node, const point_2d_t& origin, const extents_t& extents) { ! assert(control_m); ! overlay_forest_t::iterator position(unwrap(node)); ! position->origin_m = origin; ! position->extents_m = extents; ! if (framing_m) ! ADOBE_REQUIRE_STATUS(::HIViewSetNeedsDisplay(control_m, true)); } --- 265,277 ---- void ui_overlay_t::implementation_t::place(position_t node, const point_2d_t& origin, const extents_t& extents) { ! assert(control_m); ! overlay_forest_t::iterator position(unwrap(node)); ! position->origin_m = origin; ! position->extents_m = extents; ! if (framing_m) ! ADOBE_REQUIRE_STATUS(::HIViewSetNeedsDisplay(control_m, true)); } *************** *** 278,328 **** void ui_overlay_t::implementation_t::framing(bool do_framing) { ! assert(control_m); ! framing_m = do_framing; ! if (do_framing) ! { ! ::ShowWindow(overlay_m); ! draw_element_set_t tick_set; ! overlay_forest_t::preorder_iterator first(tree_m.begin()); ! overlay_forest_t::preorder_iterator last(tree_m.end()); ! for (; first != last; ++first) ! tick_extents(flatten_overlay_data(first.base()), tick_set); ! if (!tick_set.empty()) ! { ! CGrafPtr window_port(::GetWindowPort(overlay_m)); ! CGContextRef context(0); ! Rect bounds; ! overlay_bounds_update(); ! ::GetWindowBounds(overlay_m, kWindowContentRgn, &bounds); ! ADOBE_REQUIRE_STATUS(::QDBeginCGContext(window_port, &context)); ! ::CGContextTranslateCTM(context, 0.0, static_cast<float>(bounds.bottom - bounds.top)); ! ::CGContextScaleCTM(context, 1.0, -1.0); ! ::CGContextSetLineWidth(context, 1); ! ::CGContextSetShouldAntialias(context, false); ! ::CGContextSetAlpha(context, .75f); ! ::CGContextBeginPath(context); ! adobe::for_each(tick_set, boost::bind(&implementation_t::draw_tick, boost::ref(*this), context, _1)); ! ::CGContextFlush(context); ! ADOBE_REQUIRE_STATUS(::QDEndCGContext(window_port, &context)); ! } ! } ! else ! { ! ::HideWindow(overlay_m); ! } } --- 280,330 ---- void ui_overlay_t::implementation_t::framing(bool do_framing) { ! assert(control_m); ! framing_m = do_framing; ! if (do_framing) ! { ! ::ShowWindow(overlay_m); ! draw_element_set_t tick_set; ! overlay_forest_t::preorder_iterator first(tree_m.begin()); ! overlay_forest_t::preorder_iterator last(tree_m.end()); ! for (; first != last; ++first) ! tick_extents(flatten_overlay_data(first.base()), tick_set); ! if (!tick_set.empty()) ! { ! CGrafPtr window_port(::GetWindowPort(overlay_m)); ! CGContextRef context(0); ! Rect bounds; ! overlay_bounds_update(); ! ::GetWindowBounds(overlay_m, kWindowContentRgn, &bounds); ! ADOBE_REQUIRE_STATUS(::QDBeginCGContext(window_port, &context)); ! ::CGContextTranslateCTM(context, 0.0, static_cast<float>(bounds.bottom - bounds.top)); ! ::CGContextScaleCTM(context, 1.0, -1.0); ! ::CGContextSetLineWidth(context, 1); ! ::CGContextSetShouldAntialias(context, false); ! ::CGContextSetAlpha(context, .75f); ! ::CGContextBeginPath(context); ! adobe::for_each(tick_set, boost::bind(&implementation_t::draw_tick, boost::ref(*this), context, _1)); ! ::CGContextFlush(context); ! ADOBE_REQUIRE_STATUS(::QDEndCGContext(window_port, &context)); ! } ! } ! else ! { ! ::HideWindow(overlay_m); ! } } *************** *** 331,347 **** overlay_data_t ui_overlay_t::implementation_t::flatten_overlay_data(overlay_forest_t::iterator iter) { ! overlay_data_t result; ! point_2d_t& origin(result.origin_m); ! overlay_forest_t::iterator last(tree_m.end()); ! result.extents_m = iter->extents_m; ! for (; iter != last; iter = find_parent(iter)) ! { ! origin.x_m += iter->origin_m.x_m; ! origin.y_m += iter->origin_m.y_m; ! } ! return result; } --- 333,349 ---- overlay_data_t ui_overlay_t::implementation_t::flatten_overlay_data(overlay_forest_t::iterator iter) { ! overlay_data_t result; ! point_2d_t& origin(result.origin_m); ! overlay_forest_t::iterator last(tree_m.end()); ! result.extents_m = iter->extents_m; ! for (; iter != last; iter = find_parent(iter)) ! { ! origin.x_m += iter->origin_m.x_m; ! origin.y_m += iter->origin_m.y_m; ! } ! return result; } *************** *** 350,374 **** struct frame_rect_t { ! frame_rect_t(float left, float top, float right, float bottom, float tick = 3) : ! tick_width_m(adobe::pin(0.0f, right - left, tick)), ! tick_height_m(adobe::pin(0.0f, bottom - top, tick)), ! tick_start_right_m(std::max(right - tick, left)), ! tick_start_bottom_m(std::max(bottom - tick, top)), ! tl_m(::CGRectMake(left, top, tick_width_m, tick_height_m)), ! tr_m(::CGRectMake(tick_start_right_m, top, tick_width_m, tick_height_m)), ! bl_m(::CGRectMake(left, tick_start_bottom_m, tick_width_m, tick_height_m)), ! br_m(::CGRectMake(tick_start_right_m, tick_start_bottom_m, tick_width_m, tick_height_m)) ! { ! } ! float tick_width_m; ! float tick_height_m; ! float tick_start_right_m; ! float tick_start_bottom_m; ! CGRect tl_m; ! CGRect tr_m; ! CGRect bl_m; ! CGRect br_m; }; --- 352,376 ---- struct frame_rect_t { ! frame_rect_t(float left, float top, float right, float bottom, float tick = 3) : ! tick_width_m(adobe::pin(0.0f, right - left, tick)), ! tick_height_m(adobe::pin(0.0f, bottom - top, tick)), ! tick_start_right_m(std::max(right - tick, left)), ! tick_start_bottom_m(std::max(bottom - tick, top)), ! tl_m(::CGRectMake(left, top, tick_width_m, tick_height_m)), ! tr_m(::CGRectMake(tick_start_right_m, top, tick_width_m, tick_height_m)), ! bl_m(::CGRectMake(left, tick_start_bottom_m, tick_width_m, tick_height_m)), ! br_m(::CGRectMake(tick_start_right_m, tick_start_bottom_m, tick_width_m, tick_height_m)) ! { ! } ! float tick_width_m; ! float tick_height_m; ! float tick_start_right_m; ! float tick_start_bottom_m; ! CGRect tl_m; ! CGRect tr_m; ! CGRect bl_m; ! CGRect br_m; }; *************** *** 377,451 **** void ui_overlay_t::implementation_t::tick_extents(const overlay_data_t& overlay_data, draw_element_set_t& set) { ! typedef draw_element_t de_t; ! static const RGBColor red = { USHRT_MAX, 0, 0 }; ! static const RGBColor green = { 0, USHRT_MAX, 0 }; ! static const RGBColor blue = { 0, 0, USHRT_MAX }; ! const point_2d_t& position(overlay_data.origin_m); ! const extents_t& extents(overlay_data.extents_m); ! float top(static_cast<float>(position.y_m)); ! float left(static_cast<float>(position.x_m)); ! float bottom(top + extents.height()); ! float right(left + extents.width()); ! frame_rect_t bounds(left, top, right, bottom); ! set.push_back(de_t(de_t::element_type_top_left, bounds.tl_m, blue)); ! set.push_back(de_t(de_t::element_type_top_right, bounds.tr_m, blue)); ! set.push_back(de_t(de_t::element_type_bottom_left, bounds.bl_m, blue)); ! set.push_back(de_t(de_t::element_type_bottom_right, bounds.br_m, blue)); ! if (extents.vertical().outset_m.first || extents.vertical().outset_m.second || ! extents.horizontal().outset_m.first || extents.horizontal().outset_m.second) ! { ! float top_outset(top - extents.vertical().outset_m.first); ! float bottom_outset(bottom + extents.vertical().outset_m.second); ! float left_outset(left - extents.horizontal().outset_m.first); ! float right_outset(right + extents.horizontal().outset_m.second); ! frame_rect_t outsets(left_outset, top_outset, right_outset, bottom_outset); ! set.push_back(de_t(de_t::element_type_top_left, outsets.tl_m, green)); ! set.push_back(de_t(de_t::element_type_top_right, outsets.tr_m, green)); ! set.push_back(de_t(de_t::element_type_bottom_left, outsets.bl_m, green)); ! set.push_back(de_t(de_t::element_type_bottom_right, outsets.br_m, green)); ! } ! { ! guide_set_t::const_iterator iter(extents.horizontal().poi_m.begin()); ! guide_set_t::const_iterator last(extents.horizontal().poi_m.end()); ! CGRect top_tick(::CGRectMake(0, top, 1.0, bounds.tick_height_m)); ! CGRect bottom_tick(::CGRectMake(0, bottom - bounds.tick_height_m, 1.0, bounds.tick_height_m)); ! for (; iter != last; ++iter) ! { ! float poi(left + *iter); ! top_tick.origin.x = poi; ! bottom_tick.origin.x = poi; ! set.push_back(de_t(de_t::element_type_horizontal_poi, top_tick, red)); ! set.push_back(de_t(de_t::element_type_horizontal_poi, bottom_tick, red)); ! } ! } ! { ! guide_set_t::const_iterator iter(extents.vertical().poi_m.begin()); ! guide_set_t::const_iterator last(extents.vertical().poi_m.end()); ! CGRect left_tick(::CGRectMake(left, 0, bounds.tick_width_m, 1.0)); ! CGRect right_tick(::CGRectMake(right - bounds.tick_width_m, 0, bounds.tick_width_m, 1.0)); ! for (; iter != last; ++iter) ! { ! float poi(top + *iter); ! left_tick.origin.y = poi; ! right_tick.origin.y = poi; ! set.push_back(de_t(de_t::element_type_vertical_poi, left_tick, red)); ! set.push_back(de_t(de_t::element_type_vertical_poi, right_tick, red)); ! } ! } } --- 379,453 ---- void ui_overlay_t::implementation_t::tick_extents(const overlay_data_t& overlay_data, draw_element_set_t& set) { ! typedef draw_element_t de_t; ! static const RGBColor red = { USHRT_MAX, 0, 0 }; ! static const RGBColor green = { 0, USHRT_MAX, 0 }; ! static const RGBColor blue = { 0, 0, USHRT_MAX }; ! const point_2d_t& position(overlay_data.origin_m); ! const extents_t& extents(overlay_data.extents_m); ! float top(static_cast<float>(position.y_m)); ! float left(static_cast<float>(position.x_m)); ! float bottom(top + extents.height()); ! float right(left + extents.width()); ! frame_rect_t bounds(left, top, right, bottom); ! set.push_back(de_t(de_t::element_type_top_left, bounds.tl_m, blue)); ! set.push_back(de_t(de_t::element_type_top_right, bounds.tr_m, blue)); ! set.push_back(de_t(de_t::element_type_bottom_left, bounds.bl_m, blue)); ! set.push_back(de_t(de_t::element_type_bottom_right, bounds.br_m, blue)); ! if (extents.vertical().outset_m.first || extents.vertical().outset_m.second || ! extents.horizontal().outset_m.first || extents.horizontal().outset_m.second) ! { ! float top_outset(top - extents.vertical().outset_m.first); ! float bottom_outset(bottom + extents.vertical().outset_m.second); ! float left_outset(left - extents.horizontal().outset_m.first); ! float right_outset(right + extents.horizontal().outset_m.second); ! frame_rect_t outsets(left_outset, top_outset, right_outset, bottom_outset); ! set.push_back(de_t(de_t::element_type_top_left, outsets.tl_m, green)); ! set.push_back(de_t(de_t::element_type_top_right, outsets.tr_m, green)); ! set.push_back(de_t(de_t::element_type_bottom_left, outsets.bl_m, green)); ! set.push_back(de_t(de_t::element_type_bottom_right, outsets.br_m, green)); ! } ! { ! guide_set_t::const_iterator iter(extents.horizontal().poi_m.begin()); ! guide_set_t::const_iterator last(extents.horizontal().poi_m.end()); ! CGRect top_tick(::CGRectMake(0, top, 1.0, bounds.tick_height_m)); ! CGRect bottom_tick(::CGRectMake(0, bottom - bounds.tick_height_m, 1.0, bounds.tick_height_m)); ! for (; iter != last; ++iter) ! { ! float poi(left + *iter); ! top_tick.origin.x = poi; ! bottom_tick.origin.x = poi; ! set.push_back(de_t(de_t::element_type_horizontal_poi, top_tick, red)); ! set.push_back(de_t(de_t::element_type_horizontal_poi, bottom_tick, red)); ! } ! } ! { ! guide_set_t::const_iterator iter(extents.vertical().poi_m.begin()); ! guide_set_t::const_iterator last(extents.vertical().poi_m.end()); ! CGRect left_tick(::CGRectMake(left, 0, bounds.tick_width_m, 1.0)); ! CGRect right_tick(::CGRectMake(right - bounds.tick_width_m, 0, bounds.tick_width_m, 1.0)); ! for (; iter != last; ++iter) ! { ! float poi(top + *iter); ! left_tick.origin.y = poi; ! right_tick.origin.y = poi; ! set.push_back(de_t(de_t::element_type_vertical_poi, left_tick, red)); ! set.push_back(de_t(de_t::element_type_vertical_poi, right_tick, red)); ! } ! } } *************** *** 454,511 **** void ui_overlay_t::implementation_t::draw_tick(CGContextRef context, const draw_element_set_t::value_type& element) { ! typedef draw_element_set_t::value_type desvt_t; ! coord_set_t coord_set; ! float top(element.rect_m.origin.y + 1); ! float left(element.rect_m.origin.x); ! float bottom(element.rect_m.origin.y + element.rect_m.size.height); ! float right(element.rect_m.origin.x + element.rect_m.size.width - 1); ! coord_t top_left(left, top); ! coord_t top_right(right, top); ! coord_t bottom_left(left, bottom); ! coord_t bottom_right(right, bottom); ! ::CGContextSetRGBStrokeColor( context, ! element.color_m.red / static_cast<float>(USHRT_MAX), ! element.color_m.green / static_cast<float>(USHRT_MAX), ! element.color_m.blue / static_cast<float>(USHRT_MAX), ! 1.0f); ! if (element.type_m == desvt_t::element_type_top_left) ! { ! coord_set.push_back(top_right); ! coord_set.push_back(top_left); ! coord_set.push_back(bottom_left); ! } ! else if (element.type_m == desvt_t::element_type_top_right) ! { ! coord_set.push_back(top_left); ! coord_set.push_back(top_right); ! coord_set.push_back(bottom_right); ! } ! else if (element.type_m == desvt_t::element_type_bottom_left) ! { ! coord_set.push_back(top_left); ! coord_set.push_back(bottom_left); ! coord_set.push_back(bottom_right); ! } ! else if (element.type_m == desvt_t::element_type_bottom_right) ! { ! coord_set.push_back(top_right); ! coord_set.push_back(bottom_right); ! coord_set.push_back(bottom_left); ! } ! else if (element.type_m == desvt_t::element_type_horizontal_poi) ! { ! coord_set.push_back(top_left); ! coord_set.push_back(bottom_left); ! } ! else if (element.type_m == desvt_t::element_type_vertical_poi) ! { ! coord_set.push_back(top_left); ! coord_set.push_back(top_right); ! } ! draw_line_path(context, coord_set); } --- 456,513 ---- void ui_overlay_t::implementation_t::draw_tick(CGContextRef context, const draw_element_set_t::value_type& element) { ! typedef draw_element_set_t::value_type desvt_t; ! coord_set_t coord_set; ! float top(element.rect_m.origin.y + 1); ! float left(element.rect_m.origin.x); ! float bottom(element.rect_m.origin.y + element.rect_m.size.height); ! float right(element.rect_m.origin.x + element.rect_m.size.width - 1); ! coord_t top_left(left, top); ! coord_t top_right(right, top); ! coord_t bottom_left(left, bottom); ! coord_t bottom_right(right, bottom); ! ::CGContextSetRGBStrokeColor( context, ! element.color_m.red / static_cast<float>(USHRT_MAX), ! element.color_m.green / static_cast<float>(USHRT_MAX), ! element.color_m.blue / static_cast<float>(USHRT_MAX), ! 1.0f); ! if (element.type_m == desvt_t::element_type_top_left) ! { ! coord_set.push_back(top_right); ! coord_set.push_back(top_left); ! coord_set.push_back(bottom_left); ! } ! else if (element.type_m == desvt_t::element_type_top_right) ! { ! coord_set.push_back(top_left); ! coord_set.push_back(top_right); ! coord_set.push_back(bottom_right); ! } ! else if (element.type_m == desvt_t::element_type_bottom_left) ! { ! coord_set.push_back(top_left); ! coord_set.push_back(bottom_left); ! coord_set.push_back(bottom_right); ! } ! else if (element.type_m == desvt_t::element_type_bottom_right) ! { ! coord_set.push_back(top_right); ! coord_set.push_back(bottom_right); ! coord_set.push_back(bottom_left); ! } ! else if (element.type_m == desvt_t::element_type_horizontal_poi) ! { ! coord_set.push_back(top_left); ! coord_set.push_back(bottom_left); ! } ! else if (element.type_m == desvt_t::element_type_vertical_poi) ! { ! coord_set.push_back(top_left); ! coord_set.push_back(top_right); ! } ! draw_line_path(context, coord_set); } *************** *** 514,533 **** void ui_overlay_t::implementation_t::overlay_bounds_update() { ! Rect overlay_bounds = { 0 }; ! Rect hosting_bounds = { 0 }; ! WindowClass host_window_class(0); ! ADOBE_REQUIRE_STATUS(::GetWindowClass(source_m, &host_window_class)); ! ::GetWindowBounds(overlay_m, kWindowContentRgn, &overlay_bounds); ! ::GetWindowBounds(source_m, kWindowContentRgn, &hosting_bounds); ! if (overlay_bounds.top != hosting_bounds.top || ! overlay_bounds.bottom != hosting_bounds.bottom || ! overlay_bounds.left != hosting_bounds.left || ! overlay_bounds.right != hosting_bounds.right) ! { ! ::SetWindowBounds(overlay_m, kWindowContentRgn, &hosting_bounds); ! } } --- 516,535 ---- void ui_overlay_t::implementation_t::overlay_bounds_update() { ! Rect overlay_bounds = { 0 }; ! Rect hosting_bounds = { 0 }; ! WindowClass host_window_class(0); ! ADOBE_REQUIRE_STATUS(::GetWindowClass(source_m, &host_window_class)); ! ::GetWindowBounds(overlay_m, kWindowContentRgn, &overlay_bounds); ! ::GetWindowBounds(source_m, kWindowContentRgn, &hosting_bounds); ! if (overlay_bounds.top != hosting_bounds.top || ! overlay_bounds.bottom != hosting_bounds.bottom || ! overlay_bounds.left != hosting_bounds.left || ! overlay_bounds.right != hosting_bounds.right) ! { ! ::SetWindowBounds(overlay_m, kWindowContentRgn, &hosting_bounds); ! } } *************** *** 537,538 **** --- 539,544 ---- /****************************************************************************************************/ + + #endif + + /****************************************************************************************************/ --- NEW FILE: os_utilities.cpp --- /* Copyright 2005-2006 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #include "os_utilities.hpp" /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ namespace implementation { /****************************************************************************************************/ std::string cfstring_to_string(::CFStringRef x) { if (x == 0) return std::string(); const int pad(16); // must be at least one - seems like a good conservative size ::CFIndex max_size(::CFStringGetMaximumSizeForEncoding(::CFStringGetLength(x), kCFStringEncodingUTF8) + pad); std::vector<char> buffer(static_cast<std::size_t>(max_size)); #ifndef NDEBUG ::Boolean result = #endif ::CFStringGetCString(x, &buffer[0], max_size, kCFStringEncodingUTF8); #ifndef NDEBUG assert(result); #endif return std::string(&buffer[0]); } /****************************************************************************************************/ template <> void get_bounds< ::ControlRef >(const ::ControlRef& control, ::Rect& bounds, bool absolute) { assert(control); static const float round(.5); ::HIRect cur_bounds = { { 0, 0 }, { 0, 0 } }; ADOBE_REQUIRE_STATUS(::HIViewGetFrame(control, &cur_bounds)); if (absolute) { // bounds are relative to the parent control; this makes them relative to the window. ::WindowRef window(::GetControlOwner(control)); ::ControlRef root_control(0); if (window) ::ADOBE_REQUIRE_STATUS(::GetRootControl(window, &root_control)); if (root_control) ::ADOBE_REQUIRE_STATUS(::HIViewConvertRect(&cur_bounds, ::HIViewGetSuperview(control), root_control)); } bounds.left = static_cast<short>(cur_bounds.origin.x + round); bounds.top = static_cast<short>(cur_bounds.origin.y + round); bounds.right = static_cast<short>(bounds.left + cur_bounds.size.width + round); bounds.bottom = static_cast<short>(bounds.top + cur_bounds.size.height + round); } /****************************************************************************************************/ template <> std::string get_field_text< ::ControlRef >(::ControlRef& control) { if (!control) return std::string(); ::CFStringRef cfstring(0); ADOBE_REQUIRE_STATUS(::CopyControlTitleAsCFString(control, &cfstring)); adobe::auto_resource< ::CFStringRef > auto_string(cfstring); return cfstring_to_string(cfstring); } /****************************************************************************************************/ std::string get_name(const ::ControlRef& control) { assert (control); ::CFStringRef cfstring(0); ADOBE_REQUIRE_STATUS(::CopyControlTitleAsCFString(control, &cfstring)); adobe::auto_resource< ::CFStringRef > auto_string(cfstring); return cfstring_to_string(cfstring); } /****************************************************************************************************/ std::string get_name(const ::WindowRef& window) { assert(window); ::CFStringRef cfstring(0); ADOBE_REQUIRE_STATUS(::CopyWindowTitleAsCFString(window, &cfstring)); adobe::auto_resource< ::CFStringRef > auto_string(cfstring); return cfstring_to_string(cfstring); } /****************************************************************************************************/ /// REVISIT (fbrereto) : This is tucked into a cpp file because it uses a deprecated MacOS X API ::FMFontFamily get_classic_font_id(const char* font_name, std::size_t name_length) { ::ATSUFontID atsui_font_id(get_atsui_font_id(font_name, name_length)); ::FMFont font(::FMGetFontFromATSFontRef(atsui_font_id)); ::FMFontFamily font_family; ::FMFontStyle font_style; ADOBE_REQUIRE_STATUS(::FMGetFontFamilyInstanceFromFont(font, &font_family, &font_style)); return font_family; } /****************************************************************************************************/ adobe::extents_t get_text_dimensions(const std::string& text, adobe::theme_t theme) { adobe::extents_t result; ::ATSUStyle style_nonauto; ::ATSUTextLayout layout_nonauto; std::vector<boost::uint16_t> unibuffer; ::UniCharCount run_length(kATSUToTextEnd); unibuffer.reserve(text.size()); adobe::to_utf16(text.begin(), text.end(), std::back_inserter(unibuffer)); ADOBE_REQUIRE_STATUS(::ATSUCreateStyle(&style_nonauto)); adobe::auto_resource< ::ATSUStyle > style(style_nonauto); adobe::theme_t masked(theme & adobe::theme_mask_s); if (masked == adobe::theme_mini_s) atsu_set_attribute(style_nonauto, kATSUSizeTag, ::Long2Fix(9)); else if (masked == adobe::theme_small_s) atsu_set_attribute(style_nonauto, kATSUSizeTag, ::Long2Fix(11)); //else if (masked == adobe::theme_normal_s) // atsu_set_attribute(style_nonauto, kATSUSizeTag, ::Long2Fix(13)); if (theme & adobe::theme_adornment_mono_s) atsu_set_attribute(style_nonauto, kATSUFontTag, get_atsui_font_id("Monaco")); ADOBE_REQUIRE_STATUS(::ATSUCreateTextLayoutWithTextPtr( static_cast<UniChar*>(&unibuffer[0]), 0, unibuffer.size(), unibuffer.size(), 1, &run_length, &style_nonauto, &layout_nonauto)); adobe::auto_resource< ::ATSUTextLayout > layout(layout_nonauto); ADOBE_REQUIRE_STATUS(::ATSUSetTransientFontMatching(layout_nonauto, true)); ATSUTextMeasurement before(0); ATSUTextMeasurement after(0); ATSUTextMeasurement ascent(0); ATSUTextMeasurement descent(0); ADOBE_REQUIRE_STATUS(::ATSUGetUnjustifiedBounds( layout_nonauto, 0, unibuffer.size(), &before, &after, &ascent, &descent)); before = ::Fix2Long(before); after = ::Fix2Long(after); ascent = ::Fix2Long(ascent); descent = ::Fix2Long(descent); result.vertical().length_m = ascent; result.horizontal().length_m = after - before; result.vertical().poi_m.push_back(ascent); return result; } /****************************************************************************************************/ adobe::extents_t measure(::ControlRef& control) { assert(control); adobe::extents_t result; ::Rect bounds = { 0 }; ::SInt16 best_baseline(0); ::GetBestControlRect(control, &bounds, &best_baseline); result.height() = bounds.bottom - bounds.top; result.width() = bounds.right - bounds.left; if (best_baseline) result.vertical().poi_m.push_back(result.height() + best_baseline); return result; } /****************************************************************************************************/ void theme_to_rec(const adobe::theme_t& style, ControlFontStyleRec& style_rec) { ControlFontStyleRec result = { 0 }; adobe::theme_t masked(style & adobe::theme_mask_s); if (style & adobe::theme_adornment_mono_s) { result.font = get_classic_font_id("Monaco"); result.flags |= static_cast<int>(kControlUseFontMask) | static_cast<int>(kControlUseSizeMask); switch (masked) { case adobe::theme_large_s: result.size = 14; break; case adobe::theme_small_s: result.size = 10; break; case adobe::theme_mini_s: result.size = 9; break; case adobe::theme_normal_s: default: result.size = 12; break; } } else if (masked) { ThemeFontID font_id(theme_to_ThemeFontID(style)); Str255 font_name; SInt16 font_size; Style font_style; ::GetThemeFont(font_id, smSystemScript, font_name, &font_size, &font_style); result.flags |= static_cast<int>(kControlUseFontMask) | static_cast<int>(kControlUseSizeMask) | static_cast<int>(kControlUseFaceMask); result.font = get_classic_font_id(font_name); result.size = font_size; result.style = font_style; } style_rec = result; } /****************************************************************************************************/ // REVISIT (fbrereto) : This can all get reduced void set_popup_with_text(ControlRef control, const std::string& text, unsigned long cur_time) { static unsigned long last_time(0); static unsigned long double_click_time(::GetDblTime()); static std::string selection_string; std::size_t new_index(1); MenuRef menu(::GetControlPopupMenuHandle(control)); std::size_t menu_item_count(::CountMenuItems(menu)); if (cur_time - last_time > double_click_time) selection_string.erase(selection_string.begin(), selection_string.end()); last_time = cur_time; selection_string.append(text.c_str()); for (; new_index <= menu_item_count; ++new_index) { ::CFStringRef cur_menu_item(0); ADOBE_REQUIRE_STATUS(::CopyMenuItemTextAsCFString(menu, static_cast< ::UInt16 >(new_index), &cur_menu_item)); adobe::auto_resource< ::CFStringRef > auto_string(cur_menu_item); std::string cur_name(cfstring_to_string(cur_menu_item)); for (std::string::iterator i(cur_name.begin()); i != cur_name.end(); ++i) *i = static_cast<std::string::value_type>(std::tolower(*i)); if (cur_name.find(selection_string) == 0) break; } if (new_index > menu_item_count) adobe::system_beep(); else if (new_index != static_cast<std::size_t>(get_value(control))) ::SetControl32BitValue(control, static_cast<long>(new_index)); } /****************************************************************************************************/ /// sets the keyboard focus for a control template <> static void set_focus< ::ControlRef >(::ControlRef& control, bool make_focused) { assert(control); ::ControlRef current_focus(0); ::WindowRef window(::GetControlOwner(control)); ADOBE_REQUIRE_STATUS(::GetKeyboardFocus(window, ¤t_focus)); if (make_focused && current_focus != control) ADOBE_REQUIRE_STATUS(::SetKeyboardFocus(window, control, kControlFocusNextPart)); else if (!make_focused && current_focus == control) ADOBE_REQUIRE_STATUS(::ClearKeyboardFocus(window)); } /****************************************************************************************************/ void set_bounds(::ControlRef control, const ::Rect& new_bounds) { assert(control); ::HIRect bounds = { { static_cast<float>(new_bounds.left), static_cast<float>(new_bounds.top) }, { static_cast<float>(new_bounds.right - new_bounds.left), static_cast<float>(new_bounds.bottom - new_bounds.top) } }; bounds.size.height = std::max(bounds.size.height, 0.0f); bounds.size.width = std::max(bounds.size.width, 0.0f); ADOBE_REQUIRE_STATUS(::HIViewSetFrame(control, &bounds)); } /****************************************************************************************************/ template <> void set_theme< ::ControlRef >(::ControlRef& control, adobe::theme_t theme) { assert(control); ::ControlFontStyleRec new_style = { 0 }; theme_to_rec(theme, new_style); set_widget_data(control, kControlEntireControl, kControlFontStyleTag, new_style, false); ::ControlSize control_size(kControlSizeNormal); switch ( theme & theme_mask_s ) { case theme_large_s: control_size = kControlSizeLarge; break; case theme_small_s: control_size = kControlSizeSmall; break; case theme_mini_s: control_size = kControlSizeMini; break; case theme_normal_s: default: break; } set_widget_data(control, kControlEntireControl, kControlSizeTag, control_size, false); } /****************************************************************************************************/ template <> void set_theme< ::TXNObject >(::TXNObject& hitextview, adobe::theme_t theme) { assert (hitextview); ControlFontStyleRec rec; std::vector<TXNTypeAttributes> attr; TXNTypeAttributes empty_attr = { 0 }; RGBColor black = { 0, 0, 0 }; theme_to_rec(theme, rec); if (rec.flags & kControlUseFontMask) { attr.push_back(empty_attr); attr.back().tag = kTXNQDFontFamilyIDAttribute; attr.back().size = kTXNQDFontFamilyIDAttributeSize; attr.back().data.dataValue = rec.font; } if (rec.flags & kControlUseSizeMask) { attr.push_back(empty_attr); attr.back().tag = kTXNQDFontSizeAttribute; attr.back().size = kTXNFontSizeAttributeSize; attr.back().data.dataValue = static_cast<UInt32>(::Long2Fix(rec.size)); } if (rec.flags & kControlUseFaceMask) { attr.push_back(empty_attr); attr.back().tag = kTXNQDFontStyleAttribute; attr.back().size = kTXNQDFontStyleAttributeSize; attr.back().data.dataValue = rec.style; } attr.push_back(empty_attr); attr.back().tag = kTXNQDFontColorAttribute; attr.back().size = kTXNQDFontColorAttributeSize; attr.back().data.dataPtr = &black; ::ADOBE_REQUIRE_STATUS(::TXNSetTypeAttributes(hitextview, attr.size(), &attr[0], kTXNStartOffset, kTXNEndOffset)); } /****************************************************************************************************/ template <> void set_active< ::ControlRef >(::ControlRef& control, bool make_active) { assert(control); make_active ? ::EnableControl(control) : ::DisableControl(control); } /****************************************************************************************************/ std::string convert_utf(::UniChar* buffer, std::size_t size) { std::string result; result.reserve(size * 2); adobe::to_utf8(buffer, buffer + size, std::back_inserter(result)); return result; } /****************************************************************************************************/ std::string convert_utf(UniChar* buffer) { std::size_t size(0); while (buffer[size] != ::UniChar(0)) ++size; return convert_utf(buffer, size); } /****************************************************************************************************/ adobe::modifiers_t convert_modifiers(::UInt32 os_modifiers) { adobe::modifiers_t result(adobe::modifiers_none_s); if (os_modifiers & cmdKey) result |= adobe::modifiers_any_command_s; if (os_modifiers & shiftKey) result |= adobe::modifiers_left_shift_s; if (os_modifiers & alphaLock) result |= adobe::modifiers_caps_lock_s; if (os_modifiers & optionKey) result |= adobe::modifiers_left_option_s; if (os_modifiers & controlKey) result |= adobe::modifiers_left_control_s; if (os_modifiers & rightShiftKey) result |= adobe::modifiers_right_shift_s; if (os_modifiers & rightOptionKey) result |= adobe::modifiers_right_option_s; if (os_modifiers & rightControlKey) result |= adobe::modifiers_right_control_s; return result; } /****************************************************************************************************/ } // namespace implementation /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/mac/ui_core_implementation.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ui_core_implementation.cpp 6 Jan 2006 18:35:21 -0000 1.7 --- ui_core_implementation.cpp 3 Feb 2006 18:20:45 -0000 1.8 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt [...8812 lines suppressed...] ! if (element.implementation().state_set_m.size() > 1) ! { ! WindowRef window(::GetControlOwner(ref)); ! element.implementation().mod_key_handler_m.set_user_data(&(element.implementation())); ! element.implementation().mod_key_handler_m.uninstall(); ! element.implementation().mod_key_handler_m.install(window); ! } ! ! return result; } *************** *** 5238,5242 **** ADOBE_VIEW_FOR_ELEMENT_AND_INSERT_BOILERPLATE_SPECIALIZATION(separator_t); ADOBE_VIEW_FOR_ELEMENT_AND_INSERT_BOILERPLATE_SPECIALIZATION(slider_t); - ADOBE_VIEW_FOR_ELEMENT_AND_INSERT_BOILERPLATE_SPECIALIZATION(bevel_button_t); /****************************************************************************************************/ --- 3731,3734 ---- |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:26
|
Update of /cvsroot/adobe-source/adobe-source/adobe/iterator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/iterator Modified Files: set_next.hpp Log Message: asl 1.0.13 Index: set_next.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/iterator/set_next.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** set_next.hpp 6 Jan 2006 18:35:21 -0000 1.1 --- set_next.hpp 3 Feb 2006 18:20:46 -0000 1.2 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ *************** *** 23,30 **** stuct set_next_fn<T> { ! void operator()(T x, T y) const ! { ! //... ! } }; */ --- 23,30 ---- stuct set_next_fn<T> { ! void operator()(T x, T y) const ! { ! //... ! } }; */ *************** *** 44,48 **** inline void set_next(I x, I y) { ! adobe::unsafe::set_next_fn<I>()(x, y); } --- 44,48 ---- inline void set_next(I x, I y) { ! adobe::unsafe::set_next_fn<I>()(x, y); } |
Update of /cvsroot/adobe-source/adobe-source/adobe/future In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future Modified Files: Jamfile.v2 assemblage.hpp closed_hash.hpp cmd_system.hpp count_minmax.hpp enum_ops.hpp file_slurp.hpp find_closest.hpp iomanip.hpp iomanip_asl_cel.hpp iomanip_fwd.hpp iomanip_pdf.hpp iomanip_xml.hpp manip.hpp memory.hpp menu_system.hpp ternary_function.hpp timer.hpp Added Files: modal_dialog_interface.hpp Log Message: asl 1.0.13 Index: assemblage.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/assemblage.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** assemblage.hpp 6 Jan 2006 18:35:20 -0000 1.6 --- assemblage.hpp 3 Feb 2006 18:20:44 -0000 1.7 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 30,62 **** { public: ! typedef boost::signals::connection connection_t; ! typedef boost::function<void ()> destruct_slot_t; private: ! typedef std::list<connection_t> connections_t; #if 0 ! typedef boost::signal<void ()> destruct_signal_t; #endif ! typedef std::vector<destruct_slot_t> destruct_signal_t; public: ! assemblage_t(); ! ~assemblage_t(); ! connection_t& hold_connection(const connection_t& connection); ! void signal_destruction(const destruct_slot_t& slot); ! template <typename T> ! void delete_on_destruction(T& x) ! { ! adobe::delete_ptr<T> deleter; ! signal_destruction(boost::bind(deleter,x)); ! } private: ! connections_t connections_m; ! destruct_signal_t destruct_signal_m; ! int group_m; }; --- 30,62 ---- { public: ! typedef boost::signals::connection connection_t; ! typedef boost::function<void ()> destruct_slot_t; private: ! typedef std::list<connection_t> connections_t; #if 0 ! typedef boost::signal<void ()> destruct_signal_t; #endif ! typedef std::vector<destruct_slot_t> destruct_signal_t; public: ! assemblage_t(); ! ~assemblage_t(); ! connection_t& hold_connection(const connection_t& connection); ! void signal_destruction(const destruct_slot_t& slot); ! template <typename T> ! void delete_on_destruction(T& x) ! { ! adobe::delete_ptr<T> deleter; ! signal_destruction(boost::bind(deleter,x)); ! } private: ! connections_t connections_m; ! destruct_signal_t destruct_signal_m; ! int group_m; }; *************** *** 71,85 **** struct equal_to_first : std::unary_function<PairType, bool> { ! equal_to_first(const typename PairType::first_type& first) : ! first_m(first) ! { } ! ! bool operator() (const PairType& pair) const ! { return pair.first == first_m; } private: ! typename PairType::first_type first_m; }; ! } // namespace --- 71,85 ---- struct equal_to_first : std::unary_function<PairType, bool> { ! equal_to_first(const typename PairType::first_type& first) : ! first_m(first) ! { } ! ! bool operator() (const PairType& pair) const ! { return pair.first == first_m; } private: ! typename PairType::first_type first_m; }; ! } // namespace Index: find_closest.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/find_closest.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** find_closest.hpp 6 Jan 2006 18:35:20 -0000 1.4 --- find_closest.hpp 3 Feb 2006 18:20:44 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 25,66 **** /* ! find_closest takes a range and a value, and returns the closest value in the sequence to the ! value passed, for some definition of "closest". By default it compares the cardinal difference ! between the values to find the closest, though the client can pass their own TernaryPredicate ! to override this functionality. ! Preconditions: ! - The sequence to be searched must be sorted according to the comparison method used in ! the supplied TernaryPredicate. ! Postconditions: ! - As long as the size of the sequence is greater than 0, the result will always be a valid ! value inside the sequence. (i.e., the only time the end of the sequence is returned is ! when the sequence is empty). ! Additional Concepts: ! - Subtractable : Subtraction yields a difference type; T - T -> D ! - TernaryPredicate : A TernanyPredicate is called with three arguments ! and returns true or false. */ /*************************************************************************************************/ ! template < typename T // T models Subtractable ! > struct closer_predicate : ternary_function<T, T, T, bool> { ! typedef ternary_function<T, T, T, bool> _super; ! typedef typename _super::first_argument_type first_argument_type; ! typedef typename _super::second_argument_type second_argument_type; ! typedef typename _super::third_argument_type third_argument_type; ! typedef typename _super::result_type result_type; ! result_type operator () (const first_argument_type& a, const second_argument_type& b, const third_argument_type& x) const ! { ! // precondition: a <= b ! return x - a < b - x; ! } }; --- 25,66 ---- /* ! find_closest takes a range and a value, and returns the closest value in the sequence to the ! value passed, for some definition of "closest". By default it compares the cardinal difference ! between the values to find the closest, though the client can pass their own TernaryPredicate ! to override this functionality. ! Preconditions: ! - The sequence to be searched must be sorted according to the comparison method used in ! the supplied TernaryPredicate. ! Postconditions: ! - As long as the size of the sequence is greater than 0, the result will always be a valid ! value inside the sequence. (i.e., the only time the end of the sequence is returned is ! when the sequence is empty). ! Additional Concepts: ! - Subtractable : Subtraction yields a difference type; T - T -> D ! - TernaryPredicate : A TernanyPredicate is called with three arguments ! and returns true or false. */ /*************************************************************************************************/ ! template < typename T // T models Subtractable ! > struct closer_predicate : ternary_function<T, T, T, bool> { ! typedef ternary_function<T, T, T, bool> _super; ! typedef typename _super::first_argument_type first_argument_type; ! typedef typename _super::second_argument_type second_argument_type; ! typedef typename _super::third_argument_type third_argument_type; ! typedef typename _super::result_type result_type; ! result_type operator () (const first_argument_type& a, const second_argument_type& b, const third_argument_type& x) const ! { ! // precondition: a <= b ! return x - a < b - x; ! } }; *************** *** 71,131 **** /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename D, // D models LessThanComparable ! typename T, // T models Subtractable ! typename C // C models TernaryPredicate ! > I find_closest(I first, D n, const T& value, C pred, std::forward_iterator_tag) { ! if (n < D(2)) return first; ! while (n != D(2)) ! { ! D third(n / D(3)); ! D new_n(n - third); ! I first_third(first); ! I last_third(first); ! std::advance(first_third, third); ! std::advance(last_third, new_n); ! if (!pred(*first_third, *last_third, value)) ! first = first_third; ! n = new_n; ! } ! I second(first); ! std::advance(second, 1); ! return pred(*first, *second, value) ? first : second; } /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename D, // D models LessThanComparable ! typename T, // T models Subtractable ! typename C // C models TernaryPredicate ! > I find_closest(I first, D n, const T& value, C pred, std::random_access_iterator_tag) { ! if (n < D(2)) return first; ! while (n != D(2)) ! { ! D third(n / D(3)); ! D new_n(n - third); ! if (!pred(*(first + third), *(first + new_n), value)) ! first += third; ! n = new_n; ! } ! I second(first + 1); ! return pred(*first, *second, value) ? first : second; } --- 71,131 ---- /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename D, // D models LessThanComparable ! typename T, // T models Subtractable ! typename C // C models TernaryPredicate ! > I find_closest(I first, D n, const T& value, C pred, std::forward_iterator_tag) { ! if (n < D(2)) return first; ! while (n != D(2)) ! { ! D third(n / D(3)); ! D new_n(n - third); ! I first_third(first); ! I last_third(first); ! std::advance(first_third, third); ! std::advance(last_third, new_n); ! if (!pred(*first_third, *last_third, value)) ! first = first_third; ! n = new_n; ! } ! I second(first); ! std::advance(second, 1); ! return pred(*first, *second, value) ? first : second; } /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename D, // D models LessThanComparable ! typename T, // T models Subtractable ! typename C // C models TernaryPredicate ! > I find_closest(I first, D n, const T& value, C pred, std::random_access_iterator_tag) { ! if (n < D(2)) return first; ! while (n != D(2)) ! { ! D third(n / D(3)); ! D new_n(n - third); ! if (!pred(*(first + third), *(first + new_n), value)) ! first += third; ! n = new_n; ! } ! I second(first + 1); ! return pred(*first, *second, value) ? first : second; } *************** *** 136,187 **** /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename D, // D models LessThanComparable ! typename T, // T models Subtractable ! typename C // C models TernaryPredicate ! > inline I find_closest(I first, D n, const T& value, C pred) { ! typedef typename std::iterator_traits<I>::iterator_category category; ! return implementation::find_closest(first, n, value, pred, category()); } /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename D, // D models LessThanComparable ! typename T // T models Subtractable ! > inline I find_closest(I first, D n, const T& value) { ! typedef typename std::iterator_traits<I>::iterator_category category; ! return implementation::find_closest(first, n, value, closer_predicate<T>(), category()); } /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename T, // T models Subtractable ! typename C // C models TernaryPredicate ! > inline I find_closest(I first, I last, const T& value, C pred) { ! typedef typename std::iterator_traits<I>::iterator_category category; ! return implementation::find_closest(first, std::distance(first, last), value, pred, category()); } /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename T // T models Subtractable ! > inline I find_closest(I first, I last, const T& value) { ! typedef typename std::iterator_traits<I>::iterator_category category; ! return implementation::find_closest(first, std::distance(first, last), value, closer_predicate<T>(), category()); } --- 136,187 ---- /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename D, // D models LessThanComparable ! typename T, // T models Subtractable ! typename C // C models TernaryPredicate ! > inline I find_closest(I first, D n, const T& value, C pred) { ! typedef typename std::iterator_traits<I>::iterator_category category; ! return implementation::find_closest(first, n, value, pred, category()); } /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename D, // D models LessThanComparable ! typename T // T models Subtractable ! > inline I find_closest(I first, D n, const T& value) { ! typedef typename std::iterator_traits<I>::iterator_category category; ! return implementation::find_closest(first, n, value, closer_predicate<T>(), category()); } /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename T, // T models Subtractable ! typename C // C models TernaryPredicate ! > inline I find_closest(I first, I last, const T& value, C pred) { ! typedef typename std::iterator_traits<I>::iterator_category category; ! return implementation::find_closest(first, std::distance(first, last), value, pred, category()); } /*************************************************************************************************/ ! template < typename I, // I models ForwardIterator ! typename T // T models Subtractable ! > inline I find_closest(I first, I last, const T& value) { ! typedef typename std::iterator_traits<I>::iterator_category category; ! return implementation::find_closest(first, std::distance(first, last), value, closer_predicate<T>(), category()); } Index: timer.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/timer.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** timer.hpp 6 Jan 2006 18:35:20 -0000 1.4 --- timer.hpp 3 Feb 2006 18:20:44 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 16,32 **** \ingroup asl_libraries ! \brief A class for measuring periods of elapsed time. Can also ! accrue split times for some basic statistical reporting. Comparisons between two <code>adobe::timer_t</code> considers only the last split time. \model_of ! - \ref concept_regular_type ! - \ref stldoc_LessThanComparable \rationale ! A class that measures elapsed time can be useful when debugging, optimizing, or comparing ! implementations. <code>adobe::timer_t</code> utilizes the most accurate timing API a ! platform has to offer to maximize accuracy, while keeping the public API generic. \example --- 16,32 ---- \ingroup asl_libraries ! \brief A class for measuring periods of elapsed time. Can also ! accrue split times for some basic statistical reporting. Comparisons between two <code>adobe::timer_t</code> considers only the last split time. \model_of ! - \ref concept_regular_type ! - \ref stldoc_LessThanComparable \rationale ! A class that measures elapsed time can be useful when debugging, optimizing, or comparing ! implementations. <code>adobe::timer_t</code> utilizes the most accurate timing API a ! platform has to offer to maximize accuracy, while keeping the public API generic. \example *************** *** 35,52 **** \par \code ! adobe::timer_t timer1; ! do_my_func(); ! timer1.split(); ! adobe::timer_t timer2; ! do_their_func(); ! timer2.split(); ! if (timer1 == timer2) ! std::cout << "Functions are equally fast" << std::endl; ! else if (timer1 < timer2) ! std::cout << "My function is faster" << std::endl; ! else ! std::cout << "Their function is faster" << std::endl; \endcode \par --- 35,52 ---- \par \code ! adobe::timer_t timer1; ! do_my_func(); ! timer1.split(); ! adobe::timer_t timer2; ! do_their_func(); ! timer2.split(); ! if (timer1 == timer2) ! std::cout << "Functions are equally fast" << std::endl; ! else if (timer1 < timer2) ! std::cout << "My function is faster" << std::endl; ! else ! std::cout << "Their function is faster" << std::endl; \endcode \par *************** *** 54,80 **** in order to gain a more accurate understanding of the cost of an implementation: \code ! adobe::timer_t timer1; ! adobe::timer_t timer2; ! for (std::size_t i(0); i < sample_count_k; ++i) ! { ! timer1.reset(); ! do_my_func(); ! timer1.accrue(); ! timer2.reset(); ! do_their_func(); ! timer2.accrue(); ! } ! double my_avg(timer1.accrued_average()); ! double their_avg(timer2.accrued_average()); ! if (my_avg == their_avg) ! std::cout << "Functions are equally fast" << std::endl; ! else if (my_avg < their_avg) ! std::cout << "My function is faster" << std::endl; ! else ! std::cout << "Their function is faster" << std::endl; \endcode \par --- 54,80 ---- in order to gain a more accurate understanding of the cost of an implementation: \code ! adobe::timer_t timer1; ! adobe::timer_t timer2; ! for (std::size_t i(0); i < sample_count_k; ++i) ! { ! timer1.reset(); ! do_my_func(); ! timer1.accrue(); ! timer2.reset(); ! do_their_func(); ! timer2.accrue(); ! } ! double my_avg(timer1.accrued_average()); ! double their_avg(timer2.accrued_average()); ! if (my_avg == their_avg) ! std::cout << "Functions are equally fast" << std::endl; ! else if (my_avg < their_avg) ! std::cout << "My function is faster" << std::endl; ! else ! std::cout << "Their function is faster" << std::endl; \endcode \par *************** *** 98,116 **** #if ADOBE_PLATFORM_MAC ! #include<Carbon/Carbon.h> #elif ADOBE_PLATFORM_WIN ! #ifndef WINDOWS_LEAN_AND_MEAN ! #define WINDOWS_LEAN_AND_MEAN ! #define ADOBE_UNDEFINE_WINDOWS_LEAN_AND_MEAN 1 ! #endif ! #include <windows.h> ! #if ADOBE_UNDEFINE_WINDOWS_LEAN_AND_MEAN ! #undef WINDOWS_LEAN_AND_MEAN ! #undef ADOBE_UNDEFINE_WINDOWS_LEAN_AND_MEAN ! #endif #elif defined(BOOST_HAS_THREADS) ! #include <boost/thread/xtime.hpp> #elif defined(BOOST_HAS_GETTIMEOFDAY) ! #include <sys/time.h> #endif --- 98,116 ---- #if ADOBE_PLATFORM_MAC ! #include<Carbon/Carbon.h> #elif ADOBE_PLATFORM_WIN ! #ifndef WINDOWS_LEAN_AND_MEAN ! #define WINDOWS_LEAN_AND_MEAN ! #define ADOBE_UNDEFINE_WINDOWS_LEAN_AND_MEAN 1 ! #endif ! #include <windows.h> ! #if ADOBE_UNDEFINE_WINDOWS_LEAN_AND_MEAN ! #undef WINDOWS_LEAN_AND_MEAN ! #undef ADOBE_UNDEFINE_WINDOWS_LEAN_AND_MEAN ! #endif #elif defined(BOOST_HAS_THREADS) ! #include <boost/thread/xtime.hpp> #elif defined(BOOST_HAS_GETTIMEOFDAY) ! #include <sys/time.h> #endif *************** *** 128,341 **** { #if ADOBE_PLATFORM_MAC ! typedef UnsignedWide value_type; #elif ADOBE_PLATFORM_WIN ! typedef LARGE_INTEGER value_type; #elif defined(BOOST_HAS_THREADS) ! typedef boost::xtime value_type; #elif defined(BOOST_HAS_GETTIMEOFDAY) ! typedef timeval value_type; #endif ! typedef std::vector<double> accumulator_type; public: ! typedef accumulator_type::size_type size_type; #ifndef ADOBE_NO_DOCUMENTATION ! timer_t() ! { #if ADOBE_PLATFORM_WIN ! (void)::QueryPerformanceFrequency(&frequency_m); #endif ! reset(); ! } ! timer_t(const timer_t& rhs) : ! epoch_m(rhs.epoch_m), ! split_m(rhs.split_m), ! time_set_m(rhs.time_set_m) #if ADOBE_PLATFORM_WIN ! , frequency_m(rhs.frequency_m) #endif ! { } ! timer_t& operator = (const timer_t& rhs) ! { ! epoch_m = rhs.epoch_m; ! split_m = rhs.split_m; ! time_set_m = rhs.time_set_m; #if ADOBE_PLATFORM_WIN ! frequency_m = rhs.frequency_m; #endif ! return *this; ! } #endif ! /*! ! Resets the epoch of the timer to now ! */ ! inline void reset() ! { #if ADOBE_PLATFORM_MAC ! ::Microseconds(&epoch_m); #elif ADOBE_PLATFORM_WIN ! (void)::QueryPerformanceCounter(&epoch_m); #elif defined(BOOST_HAS_THREADS) ! boost::xtime_get(&epoch_m, boost::TIME_UTC); #elif defined(BOOST_HAS_GETTIMEOFDAY) ! gettimeofday(&epoch_m, static_cast<struct timezone*>(0)); #endif ! } ! /*! ! Resets the split time accumulator ! */ ! inline void reset_accumulator() ! { time_set_m.clear(); } ! /*! ! \return ! The difference of time between the epoch and now, in milliseconds ! */ ! inline double split() ! { #if ADOBE_PLATFORM_MAC ! ::Microseconds(&split_m); #elif ADOBE_PLATFORM_WIN ! (void)::QueryPerformanceCounter(&split_m); #elif defined(BOOST_HAS_THREADS) ! boost::xtime_get(&split_m, boost::TIME_UTC); #elif defined(BOOST_HAS_GETTIMEOFDAY) ! gettimeofday(&split_m, static_cast<struct timezone*>(0)); #endif ! return last_split(); ! } ! /*! ! \return ! The difference of time between the epoch and the last split, in milliseconds ! */ ! ! inline double last_split() const ! { #if ADOBE_PLATFORM_MAC ! return (split_m.lo - epoch_m.lo) / double(1e3); #elif ADOBE_PLATFORM_WIN ! return (split_m.QuadPart - epoch_m.QuadPart) / static_cast<double>(frequency_m.QuadPart) * double(1e3); #elif defined(BOOST_HAS_THREADS) ! return ((split_m.sec - epoch_m.sec) * double(1e3) + (split_m.nsec - epoch_m.nsec) / double(1e6)); #elif defined(BOOST_HAS_GETTIMEOFDAY) ! return ((split_m.tv_sec - epoch_m.tv_sec) * double(1e3) + (split_m.tv_usec - epoch_m.tv_usec) / double(1e3)); #else ! return -1; #endif ! } ! /*! ! Grabs a new split time and stores it in the accumulator. ! */ ! inline void accrue() ! { time_set_m.push_back(split()); } ! /*! ! \return ! The smallest of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_min() const ! { return *adobe::min_element(time_set_m); } ! /*! ! \return ! The largest of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_max() const ! { return *adobe::max_element(time_set_m); } ! /*! ! \return ! The average of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_average() const ! { return empty() ? 0 : accrued_total() / size(); } ! /*! ! \return ! The median of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_median() const ! { ! if (empty()) return 0; ! adobe::sort(time_set_m); ! return (size() % 2 == 1) ? ! time_set_m[time_set_m.size() / 2] : ! (time_set_m[time_set_m.size() / 2] + ! time_set_m[time_set_m.size() / 2 - 1]) / 2; ! } ! /*! ! \return ! The summation of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_total() const ! { return adobe::accumulate(time_set_m, double(0)); } ! /*! ! \return ! The number of split times in the accumulator ! */ ! inline size_type size() const ! { return time_set_m.size(); } ! /*! ! \return ! Whether or not there are any split times in the accumulator ! */ ! inline bool empty() const ! { return time_set_m.empty(); } ! /*! ! An archaic utility function that takes a new split time and outputs it to a stream ! \param decoration An identifier to apply to the split time. ! \param s The stream to which output is written. Defaults to <code>std::cout</code> ! */ ! inline void report(const char* decoration, std::ostream& s = std::cout) ! { ! double time(split()); ! s << decoration << " took " << time << " milliseconds (" << time / 1e3 << " sec)" << std::endl; ! } private: #ifndef ADOBE_NO_DOCUMENTATION ! friend bool operator == (const timer_t& x, const timer_t& y); ! friend bool operator < (const timer_t& x, const timer_t& y); #endif ! value_type epoch_m; ! value_type split_m; ! mutable accumulator_type time_set_m; #if ADOBE_PLATFORM_WIN ! value_type frequency_m; #endif }; --- 128,341 ---- { #if ADOBE_PLATFORM_MAC ! typedef UnsignedWide value_type; #elif ADOBE_PLATFORM_WIN ! typedef LARGE_INTEGER value_type; #elif defined(BOOST_HAS_THREADS) ! typedef boost::xtime value_type; #elif defined(BOOST_HAS_GETTIMEOFDAY) ! typedef timeval value_type; #endif ! typedef std::vector<double> accumulator_type; public: ! typedef accumulator_type::size_type size_type; #ifndef ADOBE_NO_DOCUMENTATION ! timer_t() ! { #if ADOBE_PLATFORM_WIN ! (void)::QueryPerformanceFrequency(&frequency_m); #endif ! reset(); ! } ! timer_t(const timer_t& rhs) : ! epoch_m(rhs.epoch_m), ! split_m(rhs.split_m), ! time_set_m(rhs.time_set_m) #if ADOBE_PLATFORM_WIN ! , frequency_m(rhs.frequency_m) #endif ! { } ! timer_t& operator = (const timer_t& rhs) ! { ! epoch_m = rhs.epoch_m; ! split_m = rhs.split_m; ! time_set_m = rhs.time_set_m; #if ADOBE_PLATFORM_WIN ! frequency_m = rhs.frequency_m; #endif ! return *this; ! } #endif ! /*! ! Resets the epoch of the timer to now ! */ ! inline void reset() ! { #if ADOBE_PLATFORM_MAC ! ::Microseconds(&epoch_m); #elif ADOBE_PLATFORM_WIN ! (void)::QueryPerformanceCounter(&epoch_m); #elif defined(BOOST_HAS_THREADS) ! boost::xtime_get(&epoch_m, boost::TIME_UTC); #elif defined(BOOST_HAS_GETTIMEOFDAY) ! gettimeofday(&epoch_m, static_cast<struct timezone*>(0)); #endif ! } ! /*! ! Resets the split time accumulator ! */ ! inline void reset_accumulator() ! { time_set_m.clear(); } ! /*! ! \return ! The difference of time between the epoch and now, in milliseconds ! */ ! inline double split() ! { #if ADOBE_PLATFORM_MAC ! ::Microseconds(&split_m); #elif ADOBE_PLATFORM_WIN ! (void)::QueryPerformanceCounter(&split_m); #elif defined(BOOST_HAS_THREADS) ! boost::xtime_get(&split_m, boost::TIME_UTC); #elif defined(BOOST_HAS_GETTIMEOFDAY) ! gettimeofday(&split_m, static_cast<struct timezone*>(0)); #endif ! return last_split(); ! } ! /*! ! \return ! The difference of time between the epoch and the last split, in milliseconds ! */ ! ! inline double last_split() const ! { #if ADOBE_PLATFORM_MAC ! return (split_m.lo - epoch_m.lo) / double(1e3); #elif ADOBE_PLATFORM_WIN ! return (split_m.QuadPart - epoch_m.QuadPart) / static_cast<double>(frequency_m.QuadPart) * double(1e3); #elif defined(BOOST_HAS_THREADS) ! return ((split_m.sec - epoch_m.sec) * double(1e3) + (split_m.nsec - epoch_m.nsec) / double(1e6)); #elif defined(BOOST_HAS_GETTIMEOFDAY) ! return ((split_m.tv_sec - epoch_m.tv_sec) * double(1e3) + (split_m.tv_usec - epoch_m.tv_usec) / double(1e3)); #else ! return -1; #endif ! } ! /*! ! Grabs a new split time and stores it in the accumulator. ! */ ! inline void accrue() ! { time_set_m.push_back(split()); } ! /*! ! \return ! The smallest of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_min() const ! { return *adobe::min_element(time_set_m); } ! /*! ! \return ! The largest of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_max() const ! { return *adobe::max_element(time_set_m); } ! /*! ! \return ! The average of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_average() const ! { return empty() ? 0 : accrued_total() / size(); } ! /*! ! \return ! The median of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_median() const ! { ! if (empty()) return 0; ! adobe::sort(time_set_m); ! return (size() % 2 == 1) ? ! time_set_m[time_set_m.size() / 2] : ! (time_set_m[time_set_m.size() / 2] + ! time_set_m[time_set_m.size() / 2 - 1]) / 2; ! } ! /*! ! \return ! The summation of the split times in the accumulator, in milliseconds ! */ ! inline double accrued_total() const ! { return adobe::accumulate(time_set_m, double(0)); } ! /*! ! \return ! The number of split times in the accumulator ! */ ! inline size_type size() const ! { return time_set_m.size(); } ! /*! ! \return ! Whether or not there are any split times in the accumulator ! */ ! inline bool empty() const ! { return time_set_m.empty(); } ! /*! ! An archaic utility function that takes a new split time and outputs it to a stream ! \param decoration An identifier to apply to the split time. ! \param s The stream to which output is written. Defaults to <code>std::cout</code> ! */ ! inline void report(const char* decoration, std::ostream& s = std::cout) ! { ! double time(split()); ! s << decoration << " took " << time << " milliseconds (" << time / 1e3 << " sec)" << std::endl; ! } private: #ifndef ADOBE_NO_DOCUMENTATION ! friend bool operator == (const timer_t& x, const timer_t& y); ! friend bool operator < (const timer_t& x, const timer_t& y); #endif ! value_type epoch_m; ! value_type split_m; ! mutable accumulator_type time_set_m; #if ADOBE_PLATFORM_WIN ! value_type frequency_m; #endif }; Index: manip.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/manip.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** manip.hpp 6 Jan 2006 18:35:20 -0000 1.4 --- manip.hpp 3 Feb 2006 18:20:44 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 29,83 **** { public: ! manipulator_base() : ! error_m(std::ios_base::goodbit) ! { } protected: ! template <typename StreamType> ! std::ios_base::iostate handle_error(StreamType& strm) const ! { ! std::ios_base::iostate err(error_m); ! try { throw; } ! catch (std::bad_alloc&) ! { ! set_bad(); ! std::ios_base::iostate exception_mask(strm.exceptions()); ! ! if (exception_mask & std::ios_base::failbit && !(exception_mask & std::ios_base::badbit)) ! strm.setstate(err); ! else if (exception_mask & std::ios_base::badbit) ! { ! try { strm.setstate(err); } ! catch (std::ios_base::failure&) { } ! throw; ! } ! } ! catch (...) ! { ! set_fail(); ! std::ios_base::iostate exception_mask(strm.exceptions()); ! if ((exception_mask & std::ios_base::badbit) && (err & std::ios_base::badbit)) ! strm.setstate(err); ! else if (exception_mask & std::ios_base::failbit) ! { ! try { strm.setstate(err); } ! catch (std::ios_base::failure&) { } ! throw; ! } ! } ! return err; ! } ! void set_fail() const { error_m |= std::ios_base::failbit; } ! void set_bad() const { error_m |= std::ios_base::badbit; } ! mutable std::ios_base::iostate error_m; }; --- 29,83 ---- { public: ! manipulator_base() : ! error_m(std::ios_base::goodbit) ! { } protected: ! template <typename StreamType> ! std::ios_base::iostate handle_error(StreamType& strm) const ! { ! std::ios_base::iostate err(error_m); ! try { throw; } ! catch (std::bad_alloc&) ! { ! set_bad(); ! std::ios_base::iostate exception_mask(strm.exceptions()); ! ! if (exception_mask & std::ios_base::failbit && !(exception_mask & std::ios_base::badbit)) ! strm.setstate(err); ! else if (exception_mask & std::ios_base::badbit) ! { ! try { strm.setstate(err); } ! catch (std::ios_base::failure&) { } ! throw; ! } ! } ! catch (...) ! { ! set_fail(); ! std::ios_base::iostate exception_mask(strm.exceptions()); ! if ((exception_mask & std::ios_base::badbit) && (err & std::ios_base::badbit)) ! strm.setstate(err); ! else if (exception_mask & std::ios_base::failbit) ! { ! try { strm.setstate(err); } ! catch (std::ios_base::failure&) { } ! throw; ! } ! } ! return err; ! } ! void set_fail() const { error_m |= std::ios_base::failbit; } ! void set_bad() const { error_m |= std::ios_base::badbit; } ! mutable std::ios_base::iostate error_m; }; *************** *** 88,124 **** { public: ! typedef ArgumentType argument_type; ! typedef std::basic_ostream<charT, traits> stream_type; ! typedef stream_type& (*manip_func)(stream_type&, const ArgumentType&); ! basic_omanipulator(manip_func pf, const ArgumentType& arg) : ! pf_m(pf), arg_m(arg) ! { } ! void do_manip(stream_type& strm) const ! { ! if (error_m != std::ios_base::goodbit) ! strm.setstate(error_m); ! else ! { ! std::ios_base::iostate err(error_m); ! try ! { ! (*pf_m)(strm, arg_m); ! } ! catch (...) ! { ! err = handle_error(strm); ! } ! if (err) strm.setstate(err); ! } ! } private: ! manip_func pf_m; protected: ! argument_type arg_m; }; --- 88,124 ---- { public: ! typedef ArgumentType argument_type; ! typedef std::basic_ostream<charT, traits> stream_type; ! typedef stream_type& (*manip_func)(stream_type&, const ArgumentType&); ! basic_omanipulator(manip_func pf, const ArgumentType& arg) : ! pf_m(pf), arg_m(arg) ! { } ! void do_manip(stream_type& strm) const ! { ! if (error_m != std::ios_base::goodbit) ! strm.setstate(error_m); ! else ! { ! std::ios_base::iostate err(error_m); ! try ! { ! (*pf_m)(strm, arg_m); ! } ! catch (...) ! { ! err = handle_error(strm); ! } ! if (err) strm.setstate(err); ! } ! } private: ! manip_func pf_m; protected: ! argument_type arg_m; }; *************** *** 129,167 **** { public: ! typedef ArgumentType1 argument_type_1; ! typedef ArgumentType2 argument_type_2; ! typedef std::basic_ostream<charT, traits> stream_type; ! typedef stream_type& (*manip_func)(stream_type&, const ArgumentType1&, const ArgumentType2&); ! basic_omanipulator2(manip_func pf, const ArgumentType1& arg1, const ArgumentType2& arg2) : ! pf_m(pf), arg1_m(arg1) , arg2_m(arg2) ! { } ! void do_manip(stream_type& strm) const ! { ! if (error_m != std::ios_base::goodbit) ! strm.setstate(error_m); ! else ! { ! std::ios_base::iostate err(error_m); ! try ! { ! (*pf_m)(strm, arg1_m, arg2_m); ! } ! catch (...) ! { ! err = handle_error(strm); ! } ! if (err) strm.setstate(err); ! } ! } private: ! manip_func pf_m; protected: ! argument_type_1 arg1_m; ! argument_type_2 arg2_m; }; --- 129,167 ---- { public: ! typedef ArgumentType1 argument_type_1; ! typedef ArgumentType2 argument_type_2; ! typedef std::basic_ostream<charT, traits> stream_type; ! typedef stream_type& (*manip_func)(stream_type&, const ArgumentType1&, const ArgumentType2&); ! basic_omanipulator2(manip_func pf, const ArgumentType1& arg1, const ArgumentType2& arg2) : ! pf_m(pf), arg1_m(arg1) , arg2_m(arg2) ! { } ! void do_manip(stream_type& strm) const ! { ! if (error_m != std::ios_base::goodbit) ! strm.setstate(error_m); ! else ! { ! std::ios_base::iostate err(error_m); ! try ! { ! (*pf_m)(strm, arg1_m, arg2_m); ! } ! catch (...) ! { ! err = handle_error(strm); ! } ! if (err) strm.setstate(err); ! } ! } private: ! manip_func pf_m; protected: ! argument_type_1 arg1_m; ! argument_type_2 arg2_m; }; *************** *** 170,180 **** template <class ArgumentType, class charT, class traits> std::basic_ostream<charT, traits>& operator << (std::basic_ostream<charT, traits>& os, ! const adobe::basic_omanipulator<ArgumentType, charT, traits>& manip) ! { ! if (os.good()) ! manip.do_manip(os); ! return os; ! } /*************************************************************************************************/ --- 170,180 ---- template <class ArgumentType, class charT, class traits> std::basic_ostream<charT, traits>& operator << (std::basic_ostream<charT, traits>& os, ! const adobe::basic_omanipulator<ArgumentType, charT, traits>& manip) ! { ! if (os.good()) ! manip.do_manip(os); ! return os; ! } /*************************************************************************************************/ *************** *** 182,192 **** template <class ArgumentType1, class ArgumentType2, class charT, class traits> std::basic_ostream<charT, traits>& operator << (std::basic_ostream<charT, traits>& os, ! const adobe::basic_omanipulator2<ArgumentType1, ArgumentType2, charT, traits>& manip) ! { ! if (os.good()) ! manip.do_manip(os); ! return os; ! } /*************************************************************************************************/ --- 182,192 ---- template <class ArgumentType1, class ArgumentType2, class charT, class traits> std::basic_ostream<charT, traits>& operator << (std::basic_ostream<charT, traits>& os, ! const adobe::basic_omanipulator2<ArgumentType1, ArgumentType2, charT, traits>& manip) ! { ! if (os.good()) ! manip.do_manip(os); ! return os; ! } /*************************************************************************************************/ *************** *** 195,228 **** class basic_bounded_width : public basic_omanipulator<unsigned int, charT, traits> { ! typedef basic_omanipulator<unsigned int, charT, traits> inherited_t; public: ! typedef typename inherited_t::stream_type stream_type; ! typedef typename inherited_t::argument_type argument_type; ! basic_bounded_width(argument_type min, argument_type max) : ! basic_omanipulator<argument_type, charT, traits>(basic_bounded_width::fct, min), ! min_m(min), max_m(max) ! { } ! inherited_t& operator() (argument_type i) ! { ! inherited_t::arg_m = std::min(max_m, std::max(i, min_m)); ! return *this; ! } private: ! static stream_type& fct(stream_type& strm, const argument_type& i) ! { ! strm.width(i); ! return strm; ! } ! argument_type min_m; ! argument_type max_m; }; ! typedef basic_bounded_width<char, std::char_traits<char> > bounded_width; ! typedef basic_bounded_width<wchar_t, std::char_traits<wchar_t> > wbounded_width; /*************************************************************************************************/ --- 195,228 ---- class basic_bounded_width : public basic_omanipulator<unsigned int, charT, traits> { ! typedef basic_omanipulator<unsigned int, charT, traits> inherited_t; public: ! typedef typename inherited_t::stream_type stream_type; ! typedef typename inherited_t::argument_type argument_type; ! basic_bounded_width(argument_type min, argument_type max) : ! basic_omanipulator<argument_type, charT, traits>(basic_bounded_width::fct, min), ! min_m(min), max_m(max) ! { } ! inherited_t& operator() (argument_type i) ! { ! inherited_t::arg_m = std::min(max_m, std::max(i, min_m)); ! return *this; ! } private: ! static stream_type& fct(stream_type& strm, const argument_type& i) ! { ! strm.width(i); ! return strm; ! } ! argument_type min_m; ! argument_type max_m; }; ! typedef basic_bounded_width<char, std::char_traits<char> > bounded_width; ! typedef basic_bounded_width<wchar_t, std::char_traits<wchar_t> > wbounded_width; /*************************************************************************************************/ Index: enum_ops.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/enum_ops.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** enum_ops.hpp 6 Jan 2006 18:35:20 -0000 1.6 --- enum_ops.hpp 3 Feb 2006 18:20:44 -0000 1.7 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 17,56 **** /*! ! \defgroup enum_ops Enumeration Operations ! \ingroup asl_libraries ! ! \section Description Description ! ! \c enum_ops provides optional typesafe bitset and arithmetic ! operations for enumeration types. Without these typesafe operations, ! the compiler will promote the operand(s) to the appropriate integral ! type, and the result will be an integral type. When the typesafe ! operations have been defined for an enumeration type, \c E, the result ! will be of type \c E exactly when the operand(s) are of type \c E. ! ! \c ADOBE_DEFINE_BITSET_OPS(E) enables the bitset operations <code>~, ! |, &, ^, |=, &=, ^= </code> for enumeration type \c E. ! ! \c ADOBE_DEFINE_ARITHMETIC_OPS(E) enables the typesafe arithmetic ! operations <code>=, -, *, /, %, +=, *=, -=, /=, %=</code> for ! enumeration type \c E. ! ! \section Definition Definition ! ! Defined in \link enum_ops.hpp <code>adobe/enum_ops.hpp</code> \endlink ! ! \section Example Example ! ! The following is an example of code that will compile: ! \dontinclude enum_ops_example.cpp ! \skip start_of_example ! \until end_of_example ! ! The following is contains an example of code that will not compile ! since the typesafe operators have not been defined. ! ! \dontinclude enum_ops_example_fail.cpp ! \skip start_of_example ! \until end_of_example */ --- 17,56 ---- /*! ! \defgroup enum_ops Enumeration Operations ! \ingroup asl_libraries ! ! \section Description Description ! ! \c enum_ops provides optional typesafe bitset and arithmetic ! operations for enumeration types. Without these typesafe operations, ! the compiler will promote the operand(s) to the appropriate integral ! type, and the result will be an integral type. When the typesafe ! operations have been defined for an enumeration type, \c E, the result ! will be of type \c E exactly when the operand(s) are of type \c E. ! ! \c ADOBE_DEFINE_BITSET_OPS(E) enables the bitset operations <code>~, ! |, &, ^, |=, &=, ^= </code> for enumeration type \c E. ! ! \c ADOBE_DEFINE_ARITHMETIC_OPS(E) enables the typesafe arithmetic ! operations <code>=, -, *, /, %, +=, *=, -=, /=, %=</code> for ! enumeration type \c E. ! ! \section Definition Definition ! ! Defined in \link enum_ops.hpp <code>adobe/enum_ops.hpp</code> \endlink ! ! \section Example Example ! ! The following is an example of code that will compile: ! \dontinclude enum_ops_example.cpp ! \skip start_of_example ! \until end_of_example ! ! The following is contains an example of code that will not compile ! since the typesafe operators have not been defined. ! ! \dontinclude enum_ops_example_fail.cpp ! \skip start_of_example ! \until end_of_example */ *************** *** 65,80 **** /*************************************************************************************************/ #if !defined(ADOBE_NO_DOCUMENTATION) ! inline signed char promote_enum (signed char e) { return e; } ! inline unsigned char promote_enum (unsigned char e) { return e; } ! inline signed short promote_enum (signed short e) { return e; } ! inline unsigned short promote_enum (unsigned short e) { return e; } ! inline signed int promote_enum (signed int e) { return e; } ! inline unsigned int promote_enum (unsigned int e) { return e; } ! inline signed long promote_enum (signed long e) { return e; } ! inline unsigned long promote_enum (unsigned long e) { return e; } #ifdef BOOST_HAS_LONG_LONG ! inline signed long long promote_enum (signed long long e) { return e; } ! inline unsigned long long promote_enum (unsigned long long e) { return e; } #endif #endif --- 65,80 ---- /*************************************************************************************************/ #if !defined(ADOBE_NO_DOCUMENTATION) ! inline signed char promote_enum (signed char e) { return e; } ! inline unsigned char promote_enum (unsigned char e) { return e; } ! inline signed short promote_enum (signed short e) { return e; } ! inline unsigned short promote_enum (unsigned short e) { return e; } ! inline signed int promote_enum (signed int e) { return e; } ! inline unsigned int promote_enum (unsigned int e) { return e; } ! inline signed long promote_enum (signed long e) { return e; } ! inline unsigned long promote_enum (unsigned long e) { return e; } #ifdef BOOST_HAS_LONG_LONG ! inline signed long long promote_enum (signed long long e) { return e; } ! inline unsigned long long promote_enum (unsigned long long e) { return e; } #endif #endif *************** *** 89,184 **** /*************************************************************************************************/ ! #define ADOBE_DEFINE_BITSET_OPS(EnumType) \ ! inline EnumType operator~(EnumType a) \ ! { \ ! return EnumType(~adobe::implementation::promote_enum(a)); \ ! } \ ! \ ! inline EnumType operator|(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) | adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator&(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) & adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator^(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) ^ adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType& operator&=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs & rhs; \ ! } \ ! \ ! inline EnumType& operator|=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs | rhs; \ ! } \ ! \ ! inline EnumType& operator^=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs ^ rhs; \ } /*************************************************************************************************/ ! #define ADOBE_DEFINE_ARITHMETIC_OPS(EnumType) \ ! inline EnumType operator-(EnumType a) \ ! { \ ! return EnumType(-a); \ ! } \ ! \ ! inline EnumType operator+(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) + adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator-(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) - adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator*(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) * adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator/(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) / adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator%(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) % adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType& operator+=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs + rhs; \ ! } \ ! \ ! inline EnumType& operator-=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs - rhs; \ ! } \ ! \ ! inline EnumType& operator*=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs * rhs; \ ! } \ ! \ ! inline EnumType& operator/=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs / rhs; \ ! } \ ! \ ! inline EnumType& operator%=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs % rhs; \ } --- 89,184 ---- /*************************************************************************************************/ ! #define ADOBE_DEFINE_BITSET_OPS(EnumType) \ ! inline EnumType operator~(EnumType a) \ ! { \ ! return EnumType(~adobe::implementation::promote_enum(a)); \ ! } \ ! \ ! inline EnumType operator|(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) | adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator&(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) & adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator^(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) ^ adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType& operator&=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs & rhs; \ ! } \ ! \ ! inline EnumType& operator|=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs | rhs; \ ! } \ ! \ ! inline EnumType& operator^=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs ^ rhs; \ } /*************************************************************************************************/ ! #define ADOBE_DEFINE_ARITHMETIC_OPS(EnumType) \ ! inline EnumType operator-(EnumType a) \ ! { \ ! return EnumType(-a); \ ! } \ ! \ ! inline EnumType operator+(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) + adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator-(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) - adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator*(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) * adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator/(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) / adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType operator%(EnumType lhs, EnumType rhs) \ ! { \ ! return EnumType(adobe::implementation::promote_enum(lhs) % adobe::implementation::promote_enum(rhs)); \ ! } \ ! \ ! inline EnumType& operator+=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs + rhs; \ ! } \ ! \ ! inline EnumType& operator-=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs - rhs; \ ! } \ ! \ ! inline EnumType& operator*=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs * rhs; \ ! } \ ! \ ! inline EnumType& operator/=(EnumType& lhs, EnumType rhs) \ ! { \ ! return lhs = lhs / rhs; \ ! } \ ! \ ! inline EnumType& operator%=(EnumType& lhs, EnumType rhs) \ ! { ... [truncated message content] |
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/asl Modified Files: adam.dox adam_parser.dox algorithm.dox array_t.dox circular_queue.dox conversion.dox copy_on_write.dox dancing_links.dox dictionary_t.dox empty_t.dox eve.dox eve_evaluate.dox eve_parser.dox extents_t.dox forest.dox functional.dox istream.dox iterator.dox md5.dox name_t.dox numeric.dox once.dox regular_object.dox sha.dox static_table.dox string.dox table_index.dox typeinfo.dox unicode.dox value_t.dox virtual_machine_t.dox xstring.dox zuid.dox Added Files: cmath.dox Log Message: asl 1.0.13 Index: functional.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/functional.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functional.dox 2 Jun 2005 23:14:15 -0000 1.2 --- functional.dox 3 Feb 2006 18:20:42 -0000 1.3 *************** *** 5,10 **** /* ! REVISIT (sparent) : Documentation for delete_ptr moved to adobe/functional.hpp because doxygen ! 1.4.3 cannot handle the template specializations. */ --- 5,10 ---- /* ! REVISIT (sparent) : Documentation for delete_ptr moved to adobe/functional.hpp because doxygen ! 1.4.3 cannot handle the template specializations. */ *************** *** 46,50 **** \return ! An adobe::compare_members_t which can be used to make the comparison. */ --- 46,50 ---- \return ! An adobe::compare_members_t which can be used to make the comparison. */ *************** *** 59,63 **** \return ! An adobe::compare_members_t which can be used to make the comparison. */ --- 59,63 ---- \return ! An adobe::compare_members_t which can be used to make the comparison. */ *************** *** 78,82 **** \todo ! (sparent) Propose this addition back to Boost. */ --- 78,82 ---- \todo ! (sparent) Propose this addition back to Boost. */ *************** *** 90,94 **** \return ! An adobe::transform_member_t which can be used to make the transformation. */ --- 90,94 ---- \return ! An adobe::transform_member_t which can be used to make the transformation. */ Index: array_t.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/array_t.dox,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** array_t.dox 6 Oct 2005 20:43:16 -0000 1.4 --- array_t.dox 3 Feb 2006 18:20:42 -0000 1.5 *************** *** 8,21 **** \model_of ! - \ref concept_regular_type \note ! When copy-on-write semantics are not important, it is advised to use <code>std::vector<adobe::value_t></code> or another container type instead of array_t. \note ! \anchor _1 [1] Because an array_t is copy-on-write, modifications through an iterator are not supported except via back_insert_iterator. \tutorial ! A tutorial for \ref asl_tutorials_array_t is available. */ --- 8,21 ---- \model_of ! - \ref concept_regular_type \note ! When copy-on-write semantics are not important, it is advised to use <code>std::vector<adobe::value_t></code> or another container type instead of array_t. \note ! \anchor _1 [1] Because an array_t is copy-on-write, modifications through an iterator are not supported except via back_insert_iterator. \tutorial ! A tutorial for \ref asl_tutorials_array_t is available. */ *************** *** 87,94 **** \note ! Identical semantics to operator[](). \return ! A const_reference to the element specified. */ --- 87,94 ---- \note ! Identical semantics to operator[](). \return ! A const_reference to the element specified. */ *************** *** 99,106 **** \note ! Identical semantics to at(). \return ! A const_reference to the element specified. */ --- 99,106 ---- \note ! Identical semantics to at(). \return ! A const_reference to the element specified. */ *************** *** 112,119 **** \exception ! None. Guaranteed not to throw. ! \return ! true if <code>value</code> was assigned, false otherwise. */ --- 112,119 ---- \exception ! None. Guaranteed not to throw. ! \return ! true if <code>value</code> was assigned, false otherwise. */ *************** *** 122,126 **** \return ! A const_reference to the first element in the array. */ --- 122,126 ---- \return ! A const_reference to the first element in the array. */ *************** *** 129,133 **** \return ! A const_reference to the last element in the array. Note this returns a different element than end(). */ --- 129,133 ---- \return ! A const_reference to the last element in the array. Note this returns a different element than end(). */ *************** *** 136,143 **** \return ! A write_reference to the array. \note ! copy_on_write semantics mandate a copy of the internal implementation if it is being shared. */ --- 136,143 ---- \return ! A write_reference to the array. \note ! copy_on_write semantics mandate a copy of the internal implementation if it is being shared. */ *************** *** 148,152 **** \return ! A new array; a duplicate of this one with this value appended. */ --- 148,152 ---- \return ! A new array; a duplicate of this one with this value appended. */ *************** *** 155,159 **** \return ! <code>true</code> if the array is void of elements, <code>false</code> otherwise. */ --- 155,159 ---- \return ! <code>true</code> if the array is void of elements, <code>false</code> otherwise. */ *************** *** 162,166 **** \return ! A count of the number of elements in the array. */ --- 162,166 ---- \return ! A count of the number of elements in the array. */ *************** *** 169,173 **** \return ! Number of elements allowed to be added to the array before a memory reallocation is required. */ --- 169,173 ---- \return ! Number of elements allowed to be added to the array before a memory reallocation is required. */ *************** *** 205,209 **** \note ! This will not guarantee destruction of the elements formerly contained within the array, as other arrays may also be referring to them. */ --- 205,209 ---- \note ! This will not guarantee destruction of the elements formerly contained within the array, as other arrays may also be referring to them. */ *************** *** 212,216 **** \return ! An iterator to the first element in the array */ --- 212,216 ---- \return ! An iterator to the first element in the array */ *************** *** 219,223 **** \return ! An iterator to one past the last element in the array */ --- 219,223 ---- \return ! An iterator to one past the last element in the array */ *************** *** 226,230 **** \return ! An iterator to one past the last element in the array */ --- 226,230 ---- \return ! An iterator to one past the last element in the array */ *************** *** 233,237 **** \return ! An iterator to the first element in the array */ --- 233,237 ---- \return ! An iterator to the first element in the array */ *************** *** 240,244 **** \return ! An insert iterator into the array allowing for backside appending of new elements. */ --- 240,244 ---- \return ! An insert iterator into the array allowing for backside appending of new elements. */ *************** *** 249,256 **** \return ! <code>true</code> if this array and the argument refer to the same copy_on_write instance; <code>false</code> otherwise. \note ! This is not the same as <code>operator==</code>. This function will return <code>false</code> if the arrays are identical but do not refer to the same implementation instance. */ --- 249,256 ---- \return ! <code>true</code> if this array and the argument refer to the same copy_on_write instance; <code>false</code> otherwise. \note ! This is not the same as <code>operator==</code>. This function will return <code>false</code> if the arrays are identical but do not refer to the same implementation instance. */ *************** *** 259,263 **** \return ! <code>true</code> if this array is the only one referrring to its implementation instance (i.e., the implementation instance is currently not being shared). <code>false</code> otherwise. */ --- 259,263 ---- \return ! <code>true</code> if this array is the only one referrring to its implementation instance (i.e., the implementation instance is currently not being shared). <code>false</code> otherwise. */ *************** *** 271,274 **** \model_of ! - <a href="http://www.sgi.com/tech/stl/OutputIterator.html">OutputIterator</a> */ --- 271,274 ---- \model_of ! - <a href="http://www.sgi.com/tech/stl/OutputIterator.html">OutputIterator</a> */ Index: value_t.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/value_t.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** value_t.dox 28 Feb 2005 20:48:54 -0000 1.1 --- value_t.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 6,29 **** \model_of ! - \ref concept_regular_type \details \par Type Promotion ! \c adobe::value_t leverages <code>adobe::promote</code> while storing instance values. This is an exception to the discriminating union concept to which \c adobe::value_t adheres. \par Getting a Value ! \c adobe::value_t uses <code>get<>()</code> to get its instance value. It behaves like an explicit cast and an assignment: getting a value_t out will always succeed and simply returns the same value_t. \par Setting a Value ! \c adobe::value_t uses <code>set<>()</code> to set its instance value. It behaves like an explicit cast and an assignment: putting a value_t into a value_t simply assigns the values; it does not wrap them. \par How does adobe::value_t differ from boost::any? ! value_t differs from <a href="http://www.boost.org/doc/html/any.html"><code>boost::any</code></a> in several ways: ! - value_t models \ref stldoc_EqualityComparable, fully modeling a \ref concept_regular_type. ! - value_t supports type promotion. See <code>adobe::promote</code> for more details. ! - get<>() results are returned by reference, making value_t generally more efficient. \tutorial ! A tutorial for \ref asl_tutorials_value_t is available. */ --- 6,29 ---- \model_of ! - \ref concept_regular_type \details \par Type Promotion ! \c adobe::value_t leverages <code>adobe::promote</code> while storing instance values. This is an exception to the discriminating union concept to which \c adobe::value_t adheres. \par Getting a Value ! \c adobe::value_t uses <code>get<>()</code> to get its instance value. It behaves like an explicit cast and an assignment: getting a value_t out will always succeed and simply returns the same value_t. \par Setting a Value ! \c adobe::value_t uses <code>set<>()</code> to set its instance value. It behaves like an explicit cast and an assignment: putting a value_t into a value_t simply assigns the values; it does not wrap them. \par How does adobe::value_t differ from boost::any? ! value_t differs from <a href="http://www.boost.org/doc/html/any.html"><code>boost::any</code></a> in several ways: ! - value_t models \ref stldoc_EqualityComparable, fully modeling a \ref concept_regular_type. ! - value_t supports type promotion. See <code>adobe::promote</code> for more details. ! - get<>() results are returned by reference, making value_t generally more efficient. \tutorial ! A tutorial for \ref asl_tutorials_value_t is available. */ *************** *** 34,38 **** \note ! What is stored is a copy of <code>x</code> promoted to <code>promote<T>::type</code>. */ --- 34,38 ---- \note ! What is stored is a copy of <code>x</code> promoted to <code>promote<T>::type</code>. */ *************** *** 41,48 **** \return ! A refernce to a promoted type for <code>T</code> containing the <code>value_t</code>'s instance value. \exception ! adobe::bad_cast Thrown if <code>adobe::promote<T></code> does not match the stored instance type. */ --- 41,48 ---- \return ! A refernce to a promoted type for <code>T</code> containing the <code>value_t</code>'s instance value. \exception ! adobe::bad_cast Thrown if <code>adobe::promote<T></code> does not match the stored instance type. */ *************** *** 51,58 **** \return ! A refernce to a promoted type for <code>T</code> containing the <code>value_t</code>'s instance value. \exception ! adobe::bad_cast Thrown if <code>adobe::promote<T></code> does not match the stored instance type. */ --- 51,58 ---- \return ! A refernce to a promoted type for <code>T</code> containing the <code>value_t</code>'s instance value. \exception ! adobe::bad_cast Thrown if <code>adobe::promote<T></code> does not match the stored instance type. */ *************** *** 61,71 **** \param ! x Value that will be set to the value stored in the value_t. \return ! <code>true</code> if x was set successfully, <code>false</code> otherwise. \exception ! Undefined Will relay anything thrown by <code>x.operator=()</code>. */ --- 61,71 ---- \param ! x Value that will be set to the value stored in the value_t. \return ! <code>true</code> if x was set successfully, <code>false</code> otherwise. \exception ! Undefined Will relay anything thrown by <code>x.operator=()</code>. */ *************** *** 76,80 **** \return ! The value_t with its new value set. */ --- 76,80 ---- \return ! The value_t with its new value set. */ *************** *** 83,87 **** \return ! The information returned by <code>typeid()</code> for the instance value. */ --- 83,87 ---- \return ! The information returned by <code>typeid()</code> for the instance value. */ *************** *** 111,115 **** \return ! A reference to the instance value stored in this value_t. */ --- 111,115 ---- \return ! A reference to the instance value stored in this value_t. */ *************** *** 120,123 **** \return ! A reference to the instance value stored in this value_t. */ --- 120,123 ---- \return ! A reference to the instance value stored in this value_t. */ Index: eve.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/eve.dox,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** eve.dox 6 Oct 2005 20:43:16 -0000 1.5 --- eve.dox 3 Feb 2006 18:20:42 -0000 1.6 *************** *** 21,25 **** \note ! Locale support for direction is not implemented yet. */ --- 21,25 ---- \note ! Locale support for direction is not implemented yet. */ *************** *** 162,166 **** \sa ! \ref adobe::eve_t::evaluate_options_t */ --- 162,166 ---- \sa ! \ref adobe::eve_t::evaluate_options_t */ *************** *** 176,180 **** \sa ! \ref adobe::eve_t::evaluate_options_t */ --- 176,180 ---- \sa ! \ref adobe::eve_t::evaluate_options_t */ *************** *** 210,262 **** \par Available Parameter Keys <table width="100%" border="1"> ! <tr><th>Name</th><th>Possible Values</th><th>Default</th><th>Notes</th></tr> ! <tr> ! <td><code>child_horizontal</code></td> ! <td>Any of the adobe::eve_t::alignment_t enumeration labels as an adobe::name_t</td> ! <td><code>align_default</code></td> ! <td></td> ! </tr> ! <tr> ! <td><code>child_vertical</code></td> ! <td>Any of the adobe::eve_t::alignment_t enumeration labels as an adobe::name_t</td> ! <td><code>align_default</code></td> ! <td></td> ! </tr> ! <tr> ! <td><code>guide_mask</code></td> ! <td>array containing any of [ guide_baseline, guide_label ]</td> ! <td>empty (no suppression)</td> ! <td>Suppression of horizontal and/or vertical guides</td> ! </tr> ! <tr> ! <td><code>horizontal</code></td> ! <td>Any of the adobe::eve_t::alignment_t enumeration labels as an adobe::name_t</td> ! <td><code>align_default</code></td> ! <td></td> ! </tr> ! <tr> ! <td><code>indent</code></td> ! <td>integer</td> ! <td>0</td> ! <td></td> ! </tr> ! <tr> ! <td><code>placement</code></td> ! <td>Any of the adobe::eve_t::placement_t enumeration labels as an adobe::name_t</td> ! <td><code>place_leaf</code></td> ! <td></td> ! </tr> ! <tr> ! <td><code>spacing</code></td> ! <td>array of integers</td> ! <td><code>[ 0 ]</code></td> ! <td>A single value here will propagate for all needed spacing values</td> ! </tr> ! <tr> ! <td><code>vertical</code></td> ! <td>Any of the adobe::eve_t::alignment_t enumeration labels as an adobe::name_t</td> ! <td><code>align_default</code></td> ! <td></td> ! </tr> </table> */ --- 210,262 ---- \par Available Parameter Keys <table width="100%" border="1"> ! <tr><th>Name</th><th>Possible Values</th><th>Default</th><th>Notes</th></tr> ! <tr> ! <td><code>child_horizontal</code></td> ! <td>Any of the adobe::eve_t::alignment_t enumeration labels as an adobe::name_t</td> ! <td><code>align_default</code></td> ! <td></td> ! </tr> ! <tr> ! <td><code>child_vertical</code></td> ! <td>Any of the adobe::eve_t::alignment_t enumeration labels as an adobe::name_t</td> ! <td><code>align_default</code></td> ! <td></td> ! </tr> ! <tr> ! <td><code>guide_mask</code></td> ! <td>array containing any of [ guide_baseline, guide_label ]</td> ! <td>empty (no suppression)</td> ! <td>Suppression of horizontal and/or vertical guides</td> ! </tr> ! <tr> ! <td><code>horizontal</code></td> ! <td>Any of the adobe::eve_t::alignment_t enumeration labels as an adobe::name_t</td> ! <td><code>align_default</code></td> ! <td></td> ! </tr> ! <tr> ! <td><code>indent</code></td> ! <td>integer</td> ! <td>0</td> ! <td></td> ! </tr> ! <tr> ! <td><code>placement</code></td> ! <td>Any of the adobe::eve_t::placement_t enumeration labels as an adobe::name_t</td> ! <td><code>place_leaf</code></td> ! <td></td> ! </tr> ! <tr> ! <td><code>spacing</code></td> ! <td>array of integers</td> ! <td><code>[ 0 ]</code></td> ! <td>A single value here will propagate for all needed spacing values</td> ! </tr> ! <tr> ! <td><code>vertical</code></td> ! <td>Any of the adobe::eve_t::alignment_t enumeration labels as an adobe::name_t</td> ! <td><code>align_default</code></td> ! <td></td> ! </tr> </table> */ *************** *** 268,272 **** \sa ! \ref adobe::eve_t::signal_suite_t */ --- 268,272 ---- \sa ! \ref adobe::eve_t::signal_suite_t */ *************** *** 285,289 **** \todo ! (sparent) : We have a mechanism for defaulting container attributes. This needs to be extended to view attributes such as supressing guides. */ --- 285,289 ---- \todo ! (sparent) : We have a mechanism for defaulting container attributes. This needs to be extended to view attributes such as supressing guides. */ *************** *** 302,306 **** \sa ! \ref adobe::eve_t::placement_t */ --- 302,306 ---- \sa ! \ref adobe::eve_t::placement_t */ *************** *** 312,316 **** \sa ! \ref adobe::eve_t::calculate_data_t::slice_t */ --- 312,316 ---- \sa ! \ref adobe::eve_t::calculate_data_t::slice_t */ *************** *** 329,333 **** \sa ! \ref adobe::eve_t::signal_suite_t */ --- 329,333 ---- \sa ! \ref adobe::eve_t::signal_suite_t */ *************** *** 370,374 **** \note ! inset is not implemented yet. */ --- 370,374 ---- \note ! inset is not implemented yet. */ *************** *** 394,398 **** \sa ! \ref adobe::eve_t::alignment_t */ --- 394,398 ---- \sa ! \ref adobe::eve_t::alignment_t */ *************** *** 404,408 **** \sa ! \ref adobe::eve_t::alignment_t */ --- 404,408 ---- \sa ! \ref adobe::eve_t::alignment_t */ *************** *** 421,425 **** \todo ! (sparent) Currently only implemented cross stream */ --- 421,425 ---- \todo ! (sparent) Currently only implemented cross stream */ *************** *** 436,446 **** \par The place_data_t is the primary communication mechanism Eve uses to get solved layout information to the client. The place_data_t is similar to the calculate_data_t, except for the following: ! - data included is the "solved" result, not the data the client passed in (though the solution is based on the client's data) ! - data included is only pertinent to the laying-out of the widget into it's final resting place. \par This struct is used when calling the place signal inside the widget's related place signal. \sa ! \ref adobe::eve_t::signal_suite_t */ --- 436,446 ---- \par The place_data_t is the primary communication mechanism Eve uses to get solved layout information to the client. The place_data_t is similar to the calculate_data_t, except for the following: ! - data included is the "solved" result, not the data the client passed in (though the solution is based on the client's data) ! - data included is only pertinent to the laying-out of the widget into it's final resting place. \par This struct is used when calling the place signal inside the widget's related place signal. \sa ! \ref adobe::eve_t::signal_suite_t */ *************** *** 470,474 **** \sa ! \ref adobe::eve_t::evaluate_options_t */ --- 470,474 ---- \sa ! \ref adobe::eve_t::evaluate_options_t */ *************** *** 517,524 **** \par Place is the final callback signaled from the Eve engine to a widget. When this callback is made there are several guarantees for the client: ! - All parent views for this widget have already had their place callback signalled ! - All data provided in the place_data_t is the final geometric information for the widget. \par ! Note that this callback can be signalled multiple times- given a view re-layout (i.e. during a window resize event) the other callbacks will not be signalled- the layout will be adjusted internally in the Eve engine and only this callback will be signalled with updated placement information for the widget. */ --- 517,524 ---- \par Place is the final callback signaled from the Eve engine to a widget. When this callback is made there are several guarantees for the client: ! - All parent views for this widget have already had their place callback signalled ! - All data provided in the place_data_t is the final geometric information for the widget. \par ! Note that this callback can be signalled multiple times- given a view re-layout (i.e. during a window resize event) the other callbacks will not be signalled- the layout will be adjusted internally in the Eve engine and only this callback will be signalled with updated placement information for the widget. */ Index: name_t.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/name_t.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** name_t.dox 8 Aug 2005 16:37:10 -0000 1.2 --- name_t.dox 3 Feb 2006 18:20:42 -0000 1.3 *************** *** 8,14 **** \par Model Of: ! - \ref concept_regular_type ! - \ref stldoc_LessThanComparable ! - \ref concept_convertible_to_bool \par Rationale: --- 8,14 ---- \par Model Of: ! - \ref concept_regular_type ! - \ref stldoc_LessThanComparable ! - \ref concept_convertible_to_bool \par Rationale: *************** *** 58,62 **** \promotes_to ! adobe::name_t */ --- 58,62 ---- \promotes_to ! adobe::name_t */ *************** *** 81,88 **** \promotes_to ! adobe::name_t \rationale ! The primary purpose of const_once_name_t is to provide a name_t implementation that can be used in a multithreaded environment as a static variable. Because its construction does nothing to initialize the value of the name_t, such initialization must take place during a threadsafe intialization function (boost::call_once, for instance). */ --- 81,88 ---- \promotes_to ! adobe::name_t \rationale ! The primary purpose of const_once_name_t is to provide a name_t implementation that can be used in a multithreaded environment as a static variable. Because its construction does nothing to initialize the value of the name_t, such initialization must take place during a threadsafe intialization function (boost::call_once, for instance). */ Index: xstring.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/xstring.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xstring.dox 6 Oct 2005 20:43:16 -0000 1.3 --- xstring.dox 3 Feb 2006 18:20:42 -0000 1.4 *************** *** 13,25 **** The xstring grammar is based on the XML 1.1 grammar specification (http://www.w3.org/TR/2004/REC-xml11-20040204/) \verbatim ! S = (#x20 | #x09 | #x0D | #x0A)+ ! Char = [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] ! CharData = [^<&]* ! CharRef = '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' ! NameStartChar = ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | --- 13,25 ---- The xstring grammar is based on the XML 1.1 grammar specification (http://www.w3.org/TR/2004/REC-xml11-20040204/) \verbatim ! S = (#x20 | #x09 | #x0D | #x0A)+ ! Char = [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] ! CharData = [^<&]* ! CharRef = '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' ! NameStartChar = ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | *************** *** 27,57 **** [#x10000-#xEFFFF] ! NameChar = NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] ! Name = NameStartChar (NameChar)* ! EntityRef = '&' Name ';' ! Reference = EntityRef | CharRef ! AttValue = '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" ! Eq = S? '=' S? ! Attribute = Name Eq AttValue ! EmptyElemTag = '<' Name (S Attribute)* S? '/>' ! STag = '<' Name (S Attribute)* S? '>' ! ETag = '</' Name S? '>' ! content = CharData? ((element | Reference | Comment) CharData?)* ! element = EmptyElemTag | STag content ETag ! translation_unit = element* \endverbatim --- 27,57 ---- [#x10000-#xEFFFF] ! NameChar = NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] ! Name = NameStartChar (NameChar)* ! EntityRef = '&' Name ';' ! Reference = EntityRef | CharRef ! AttValue = '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" ! Eq = S? '=' S? ! Attribute = Name Eq AttValue ! EmptyElemTag = '<' Name (S Attribute)* S? '/>' ! STag = '<' Name (S Attribute)* S? '>' ! ETag = '</' Name S? '>' ! content = CharData? ((element | Reference | Comment) CharData?)* ! element = EmptyElemTag | STag content ETag ! translation_unit = element* \endverbatim *************** *** 62,83 **** The context of a string is a runtime evaluated collection of information about the state of the machine and the xstring that we currently care about. This context is gathered from several locations: ! -# the runtime context of the xstring system (which includes some defaults) ! -# the static attributes of the xstring definition The runtime context of the xstring system can be manipulated with the adobe::xstring_context_t class. The runtime context has several pieces of information set by default. These pieces are: ! - lang : defaults to 'en-us' ! - platform : defaults to one of several target platform tags: ! - "linux" ! - "bsd" ! - "solaris" ! - "irix" ! - "hpux" ! - "cygwin" ! - "windows" ! - "beos" ! - "macintosh" ! - "aix" ! - "amiga" ! - "unix" The static attributes of the xstring definition also provide context. Example: --- 62,83 ---- The context of a string is a runtime evaluated collection of information about the state of the machine and the xstring that we currently care about. This context is gathered from several locations: ! -# the runtime context of the xstring system (which includes some defaults) ! -# the static attributes of the xstring definition The runtime context of the xstring system can be manipulated with the adobe::xstring_context_t class. The runtime context has several pieces of information set by default. These pieces are: ! - lang : defaults to 'en-us' ! - platform : defaults to one of several target platform tags: ! - "linux" ! - "bsd" ! - "solaris" ! - "irix" ! - "hpux" ! - "cygwin" ! - "windows" ! - "beos" ! - "macintosh" ! - "aix" ! - "amiga" ! - "unix" The static attributes of the xstring definition also provide context. Example: *************** *** 125,131 **** And given the following code: \code ! std::string good_thing(adobe::xstring("<xstr id='a_good_thing'/>")); ! std::string bad_thing(adobe::xstring("<xstr id='a_bad_thing'/>")); ! std::string neutral_thing(adobe::xstring("<xstr id='a_neutral_thing'/>")); std::cout << "good marker: " << good_thing << std::endl; --- 125,131 ---- And given the following code: \code ! std::string good_thing(adobe::xstring("<xstr id='a_good_thing'/>")); ! std::string bad_thing(adobe::xstring("<xstr id='a_bad_thing'/>")); ! std::string neutral_thing(adobe::xstring("<xstr id='a_neutral_thing'/>")); std::cout << "good marker: " << good_thing << std::endl; *************** *** 176,182 **** Callback for the XML fragment parser. When the fragment parser finds a well formed element, it will signal a function with this signature with the following parameters: ! \param name The name of the element ! \param attribute_set A collection of attributes for the found element (could be empty) ! \param value The character data contained within the element (could be empty) \return A UTF8 buffer that is the value of this element. The value is dependent on the implementation of the callback (for example, see xml_element_echo). --- 176,182 ---- Callback for the XML fragment parser. When the fragment parser finds a well formed element, it will signal a function with this signature with the following parameters: ! \param name The name of the element ! \param attribute_set A collection of attributes for the found element (could be empty) ! \param value The character data contained within the element (could be empty) \return A UTF8 buffer that is the value of this element. The value is dependent on the implementation of the callback (for example, see xml_element_echo). *************** *** 190,194 **** Appends the current xstring glossary. Strings with identical contexts are stored on a first-in basis, and are not replaced by subsequent strings with the same context. ! \param stream Stream containing XML fragment to parse into the xstring glossary */ --- 190,194 ---- Appends the current xstring glossary. Strings with identical contexts are stored on a first-in basis, and are not replaced by subsequent strings with the same context. ! \param stream Stream containing XML fragment to parse into the xstring glossary */ *************** *** 199,205 **** Appends the current xstring glossary. Strings with identical contexts are stored on a first-in basis, and are not replaced by subsequent strings with the same context. ! \param stream Stream containing XML fragment to parse into the xstring glossary ! \param file Name of the file to parse (for better error reporting) ! \param line Starting line number in the file to parse (for better error reporting) */ #endif --- 199,205 ---- Appends the current xstring glossary. Strings with identical contexts are stored on a first-in basis, and are not replaced by subsequent strings with the same context. ! \param stream Stream containing XML fragment to parse into the xstring glossary ! \param file Name of the file to parse (for better error reporting) ! \param line Starting line number in the file to parse (for better error reporting) */ #endif *************** *** 212,216 **** \note ! This is available only for builds where <code>NDEBUG</code> is not defined */ --- 212,216 ---- \note ! This is available only for builds where <code>NDEBUG</code> is not defined */ *************** *** 219,224 **** \ingroup asl_xstring ! \param xstr 7-bit ASCII encoded xstring definition (an XML element fragment) to parse ! \param n size of the input buffer \return The glossary-obtained xstring value, or the default string if none is found in the glossary. This result will be a valid XML fragment --- 219,224 ---- \ingroup asl_xstring ! \param xstr 7-bit ASCII encoded xstring definition (an XML element fragment) to parse ! \param n size of the input buffer \return The glossary-obtained xstring value, or the default string if none is found in the glossary. This result will be a valid XML fragment *************** *** 231,235 **** \ingroup asl_xstring ! \param xstr utf-8 buffer of the xstring defintion to parse and look up \return The glossary-obtained xstring value, or the default string if none is found in the glossary. This result will be a valid XML fragment --- 231,235 ---- \ingroup asl_xstring ! \param xstr utf-8 buffer of the xstring defintion to parse and look up \return The glossary-obtained xstring value, or the default string if none is found in the glossary. This result will be a valid XML fragment *************** *** 242,248 **** \ingroup asl_xstring ! \param xstring 7-bit ASCII encoded xstring definition (an XML element fragment) to parse ! \param n size of the input buffer ! \param output Type that models OutputIterator; recieves the result of the xstring lookup. \return The glossary-obtained xstring value, or the default string if none is found in the glossary. This result will be a valid XML fragment --- 242,248 ---- \ingroup asl_xstring ! \param xstring 7-bit ASCII encoded xstring definition (an XML element fragment) to parse ! \param n size of the input buffer ! \param output Type that models OutputIterator; recieves the result of the xstring lookup. \return The glossary-obtained xstring value, or the default string if none is found in the glossary. This result will be a valid XML fragment *************** *** 255,260 **** \ingroup asl_xstring ! \param xstring Null-terminated 7-bit ASCII encoded xstring definition (an XML element fragment) to parse ! \param output Type that models OutputIterator; recieves the result of the xstring lookup. \return The glossary-obtained xstring value, or the default string if none is found in the glossary. This result will be a valid XML fragment --- 255,260 ---- \ingroup asl_xstring ! \param xstring Null-terminated 7-bit ASCII encoded xstring definition (an XML element fragment) to parse ! \param output Type that models OutputIterator; recieves the result of the xstring lookup. \return The glossary-obtained xstring value, or the default string if none is found in the glossary. This result will be a valid XML fragment *************** *** 269,275 **** Parses a fragment of XML, outputting the result to an OutputIterator instance. ! \param fragment utf-8 encoded fragment of XML to parse ! \param n Number of bytes in the fragment ! \param output OutputIterator implementation that receives the result of the parse \return The value of the parsed fragment --- 269,275 ---- Parses a fragment of XML, outputting the result to an OutputIterator instance. ! \param fragment utf-8 encoded fragment of XML to parse ! \param n Number of bytes in the fragment ! \param output OutputIterator implementation that receives the result of the parse \return The value of the parsed fragment *************** *** 282,287 **** Parses a fragment of XML, outputting the result to an OutputIterator instance. ! \param fragment utf-8 encoded fragment of XML to parse ! \param output OutputIterator implementation that receives the result of the parse \return The value of the parsed fragment --- 282,287 ---- Parses a fragment of XML, outputting the result to an OutputIterator instance. ! \param fragment utf-8 encoded fragment of XML to parse ! \param output OutputIterator implementation that receives the result of the parse \return The value of the parsed fragment *************** *** 294,299 **** Parses a fragment of XML, outputting the result to an OutputIterator instance. ! \param fragment Null-terminated 7-bit ASCII encoded fragment of XML to parse ! \param output OutputIterator implementation that receives the result of the parse \return The value of the parsed fragment --- 294,299 ---- Parses a fragment of XML, outputting the result to an OutputIterator instance. ! \param fragment Null-terminated 7-bit ASCII encoded fragment of XML to parse ! \param output OutputIterator implementation that receives the result of the parse \return The value of the parsed fragment *************** *** 365,375 **** \code { ! adobe::attribute_set_t attribute_set; ! attribute_set.push_back(std::make_pair(adobe::static_name_t("context"), adobe::static_name_t("some_view"))); ! adobe::xstring_context_t mycontext(attribute_set); ! // anything here is looked up with the context='some_view'; other attributes remain unchanged } // now our context is out scope and we go back to what we had before. --- 365,375 ---- \code { ! adobe::attribute_set_t attribute_set; ! attribute_set.push_back(std::make_pair(adobe::static_name_t("context"), adobe::static_name_t("some_view"))); ! adobe::xstring_context_t mycontext(attribute_set); ! // anything here is looked up with the context='some_view'; other attributes remain unchanged } // now our context is out scope and we go back to what we had before. *************** *** 379,385 **** \code { ! adobe::xstring_context_t mycontext(adobe::static_name_t("context"), adobe::static_name_t("some_view")); ! // anything here is looked up with the context='some_view'; other attributes remain unchanged } // now our context is out scope and we go back to what we had before. --- 379,385 ---- \code { ! adobe::xstring_context_t mycontext(adobe::static_name_t("context"), adobe::static_name_t("some_view")); ! // anything here is looked up with the context='some_view'; other attributes remain unchanged } // now our context is out scope and we go back to what we had before. *************** *** 389,399 **** \code { ! std::vector<std::pair<adobe::name_t, adobe::name_t> > my_set; ! // fill in my_set ... ! adobe::xstring_context_t mycontext(&my_set[0], &my_set[my_set.size()]); ! // anything here is looked up with a context affected by my_set } // now our context is out scope and we go back to what we had before. --- 389,399 ---- \code { ! std::vector<std::pair<adobe::name_t, adobe::name_t> > my_set; ! // fill in my_set ... ! adobe::xstring_context_t mycontext(&my_set[0], &my_set[my_set.size()]); ! // anything here is looked up with a context affected by my_set } // now our context is out scope and we go back to what we had before. Index: conversion.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/conversion.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** conversion.dox 28 Feb 2005 20:48:54 -0000 1.1 --- conversion.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 21,39 **** \note ! <code>char</code> is <i>not</i> specified to promote to <code>wchar_t</code> as standard behavior. Without knowing the source or destination character encodings there is not enough information to do this type promotion correctly. \see_also ! - <code>adobe::static_name_t</code> ! - <code>adobe::value_t</code> \section standard_promotions Standard Promotions ! - The following promote to <code>double</code>: ! - <code>short</code> ! - <code>unsigned short</code> ! - <code>int</code> ! - <code>unsigned int</code> ! - <code>long</code> ! - <code>unsigned long</code> ! - <code>float</code> */ --- 21,39 ---- \note ! <code>char</code> is <i>not</i> specified to promote to <code>wchar_t</code> as standard behavior. Without knowing the source or destination character encodings there is not enough information to do this type promotion correctly. \see_also ! - <code>adobe::static_name_t</code> ! - <code>adobe::value_t</code> \section standard_promotions Standard Promotions ! - The following promote to <code>double</code>: ! - <code>short</code> ! - <code>unsigned short</code> ! - <code>int</code> ! - <code>unsigned int</code> ! - <code>long</code> ! - <code>unsigned long</code> ! - <code>float</code> */ Index: dictionary_t.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/dictionary_t.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dictionary_t.dox 3 May 2005 23:50:23 -0000 1.2 --- dictionary_t.dox 3 Feb 2006 18:20:42 -0000 1.3 *************** *** 6,13 **** \model_of ! - \ref concept_regular_type \tutorial ! A tutorial for \ref asl_tutorials_dictionary_t is available. */ --- 6,13 ---- \model_of ! - \ref concept_regular_type \tutorial ! A tutorial for \ref asl_tutorials_dictionary_t is available. */ *************** *** 84,97 **** \note ! Identical semantics as operator[](). \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A reference to <code>key</code>'s associated value_t. \exception ! std::exception Thrown if the key cannot be found. */ --- 84,97 ---- \note ! Identical semantics as operator[](). \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A reference to <code>key</code>'s associated value_t. \exception ! std::exception Thrown if the key cannot be found. */ *************** *** 102,115 **** \note ! Identical semantics as at(). \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A reference to <code>key</code>'s associated value_t. \exception ! std::exception Thrown if the key cannot be found. */ --- 102,115 ---- \note ! Identical semantics as at(). \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A reference to <code>key</code>'s associated value_t. \exception ! std::exception Thrown if the key cannot be found. */ *************** *** 120,130 **** \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A reference to <code>key</code>'s associated value_t (if <code>key</code> exists). \exception ! std::exception Thrown if the key cannot be found or the type cannot be coerced to <code>T</code>. */ --- 120,130 ---- \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A reference to <code>key</code>'s associated value_t (if <code>key</code> exists). \exception ! std::exception Thrown if the key cannot be found or the type cannot be coerced to <code>T</code>. */ *************** *** 136,143 **** \complexity ! Same complexity as <code>dictionary_t::find()</code>. \exception ! None. Guaranteed not to throw. */ --- 136,143 ---- \complexity ! Same complexity as <code>dictionary_t::find()</code>. \exception ! None. Guaranteed not to throw. */ *************** *** 146,153 **** \return ! A writeable reference to the dictionary. \note ! copy_on_write semantics mandate a copy of the internal implementation if it is being shared. */ --- 146,153 ---- \return ! A writeable reference to the dictionary. \note ! copy_on_write semantics mandate a copy of the internal implementation if it is being shared. */ *************** *** 156,163 **** \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A new dictionary; a duplicate of this one with this key/value pair appended. */ --- 156,163 ---- \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A new dictionary; a duplicate of this one with this key/value pair appended. */ *************** *** 166,170 **** \return ! <code>true</code> if the dictionary is void of elements, <code>false</code> otherwise. */ --- 166,170 ---- \return ! <code>true</code> if the dictionary is void of elements, <code>false</code> otherwise. */ *************** *** 173,180 **** \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A count of the number of elements in the dictionary. */ --- 173,180 ---- \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! A count of the number of elements in the dictionary. */ *************** *** 183,187 **** \return ! Number of elements allowed to be added to the dictionary before a memory reallocation is required. */ --- 183,187 ---- \return ! Number of elements allowed to be added to the dictionary before a memory reallocation is required. */ *************** *** 192,202 **** \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! The number of elements erased. \exception ! None. Guaranteed not to throw. */ --- 192,202 ---- \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! The number of elements erased. \exception ! None. Guaranteed not to throw. */ *************** *** 207,211 **** \note ! This will not guarantee destruction of the elements formerly contained within the dictionary, as other dictionaries may also be referring to them. */ --- 207,211 ---- \note ! This will not guarantee destruction of the elements formerly contained within the dictionary, as other dictionaries may also be referring to them. */ *************** *** 214,218 **** \return ! A function object for value comparison. */ --- 214,218 ---- \return ! A function object for value comparison. */ *************** *** 221,225 **** \return ! A function object for key comparison. */ --- 221,225 ---- \return ! A function object for key comparison. */ *************** *** 230,237 **** \complexity ! Same complexity as <code>adobe::lower_bound</code>. \return ! An iterator to the key/value pair specified by name_t. <code>end()</code> if not found. */ --- 230,237 ---- \complexity ! Same complexity as <code>adobe::lower_bound</code>. \return ! An iterator to the key/value pair specified by name_t. <code>end()</code> if not found. */ *************** *** 248,252 **** \return ! An iterator to the start of the dictionary's key/value pairs. */ --- 248,252 ---- \return ! An iterator to the start of the dictionary's key/value pairs. */ *************** *** 255,259 **** \return ! An iterator to one past the last of the dictionary's key/value pairs. */ --- 255,259 ---- \return ! An iterator to one past the last of the dictionary's key/value pairs. */ *************** *** 262,266 **** \return ! An iterator to one past the last of the dictionary's key/value pairs. */ --- 262,266 ---- \return ! An iterator to one past the last of the dictionary's key/value pairs. */ *************** *** 269,273 **** \return ! An const_reverse_iterator to the start of the dictionary's key/value pairs. */ --- 269,273 ---- \return ! An const_reverse_iterator to the start of the dictionary's key/value pairs. */ *************** *** 278,285 **** \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! <code>false</code> if the insertion replaced a previous value associated with the key; <code>true</code> otherwise (i.e. the key is new). */ --- 278,285 ---- \complexity ! Same complexity as <code>dictionary_t::find()</code>. \return ! <code>false</code> if the insertion replaced a previous value associated with the key; <code>true</code> otherwise (i.e. the key is new). */ *************** *** 291,295 **** \complexity ! Same complexity as <code>dictionary_t::find()</code>. */ --- 291,295 ---- \complexity ! Same complexity as <code>dictionary_t::find()</code>. */ *************** *** 298,302 **** \return ! An insert_iterator */ --- 298,302 ---- \return ! An insert_iterator */ *************** *** 307,314 **** \return ! <code>true</code> if this dictionary and the argument refer to the same copy_on_write instance; <code>false</code> otherwise. \note ! This is not the same as <code>operator==</code>. This function will return <code>false</code> if the dictionaries are identical but do not refer to the same implementation instance. */ --- 307,314 ---- \return ! <code>true</code> if this dictionary and the argument refer to the same copy_on_write instance; <code>false</code> otherwise. \note ! This is not the same as <code>operator==</code>. This function will return <code>false</code> if the dictionaries are identical but do not refer to the same implementation instance. */ *************** *** 317,320 **** \return ! <code>true</code> if this dictionary is the only one referrring to its implementation instance (i.e., the implementation instance is currently not being shared). <code>false</code> otherwise. */ --- 317,320 ---- \return ! <code>true</code> if this dictionary is the only one referrring to its implementation instance (i.e., the implementation instance is currently not being shared). <code>false</code> otherwise. */ Index: iterator.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/iterator.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** iterator.dox 2 Dec 2005 02:52:55 -0000 1.3 --- iterator.dox 3 Feb 2006 18:20:42 -0000 1.4 *************** *** 11,22 **** \par Model Of: ! - \ref concept_regular_type ! - Iterator concept specified by C \par Types: ! - T: Value type of the sequence's elements; models \ref concept_regular_type ! - C: Iterator category ! - R: Return type of operator*(); models Reference Type of T ! - D: Difference type between iterators; models Signed Integer */ --- 11,22 ---- \par Model Of: ! - \ref concept_regular_type ! - Iterator concept specified by C \par Types: ! - T: Value type of the sequence's elements; models \ref concept_regular_type ! - C: Iterator category ! - R: Return type of operator*(); models Reference Type of T ! - D: Difference type between iterators; models Signed Integer */ *************** *** 35,47 **** \par Model Of: ! - \ref concept_regular_type ! - Random Access Iterator \par Types: ! - F: Models Unary Function ! - T: Value type of the sequence's elements; models \ref concept_regular_type ! - R: Return type of operator*(); models Reference Type of T ! - I: Index type; models Unsigned Integer ! - D: Difference type of I; models Signed Integer */ --- 35,47 ---- \par Model Of: ! - \ref concept_regular_type ! - Random Access Iterator \par Types: ! - F: Models Unary Function ! - T: Value type of the sequence's elements; models \ref concept_regular_type ! - R: Return type of operator*(); models Reference Type of T ! - I: Index type; models Unsigned Integer ! - D: Difference type of I; models Signed Integer */ Index: virtual_machine_t.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/virtual_machine_t.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** virtual_machine_t.dox 28 Feb 2005 20:48:54 -0000 1.1 --- virtual_machine_t.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 15,57 **** \par <table width="100%" cellspacing="1" cellpadding="1" border="1"> ! <tr><th>Unary Operation Name</th><th colspan="4">Parameter</th><th>Result</th></tr> ! <tr><td><code>.not</code></td><td colspan="4">boolean</td><td>logical not</td></tr> ! <tr><td><code>.unary_negate</code></td><td colspan="4">number</td><td>unary negation</td></tr> ! <tr><th>Binary Operation Name</th><th colspan="4">Parameters</th><th>Result</th></tr> ! <tr><td><code>.add</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 + number_1</td></tr> ! <tr><td><code>.subtract</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 - number_1</td></tr> ! <tr><td><code>.multiply</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 * number_1</td></tr> ! <tr><td><code>.modulus</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 \% number_1</td></tr> ! <tr><td><code>.divide</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 / number_1</td></tr> ! <tr><th>Predicate Operation Name</th><th colspan="4">Parameters</th><th>Result</th></tr> ! <tr><td><code>.less</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 < number_1</td></tr> ! <tr><td><code>.greater</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 > number_1</td></tr> ! <tr><td><code>.less_equal</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 <= number_1</td></tr> ! <tr><td><code>.greater_equal</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 >= number_1</td></tr> ! <tr><td><code>.equal</code><td colspan="2">value_0</td><td colspan="2">value_1</td><td>value_0 == value_1</td></tr> ! <tr><td><code>.not_equal</code><td colspan="2">value_0</td><td colspan="2">value_1</td><td>value_0 != value_1</td></tr> ! <tr><td><code>.and_op</code><td colspan="2">boolean</td><td colspan="2">expression</td><td>boolean && expression <a href="#op_1">[1]</a> <a href="#op_3">[3]</a></td></tr> ! <tr><td><code>.or_op</code><td colspan="2">boolean</td><td colspan="2">expression</td><td>boolean || expression <a href="#op_2">[2]</a> <a href="#op_3">[3]</a></td></tr> ! <tr><th>Misc. Operation Name</th><th colspan="4">Parameters</th><th>Result</th></tr> ! <tr><td><code>.array</code><td>number</td><td colspan="3"><code>number</code> unnamed argument(s)</td><td>an array_t containing the top <code>number</code> elements in the evaluation stack</td></tr> ! <tr><td><code>.dictionary</code><td>number</td><td colspan="3"><code>number</code> key/value pair(s) (named argument(s))</td><td>a dictionary_t containing the top <code>number</code> key/value pairs in the evaluation stack</td></tr> ! <tr><td><code>.ifelse</code><td>boolean</td><td colspan="2">expression_0</td><td>expression_1</td><td>evaluated expression_0 if boolean is true; evaluated expression_1 otherwise <a href="#op_4">[4]</a></td></tr> ! <tr><td><code>.index</code><td colspan="2">array</td><td colspan="2">number</td><td>evaluated array[number]</td></tr> ! <tr><td><code>.index</code><td colspan="2">dictionary</td><td colspan="2">name</td><td>evaluated dictionary[name]</td></tr> ! <tr><td><code>.function</code><td colspan="2">name</td><td colspan="2">dictionary of expressions</td><td>result of calling function name with argument dictionary</td></tr> ! <tr><td><code>.function</code><td colspan="2">name</td><td colspan="2">array of expressions</td><td>result of calling function name with argument array</td></tr> ! <tr><td><code>.variable</code><td colspan="4">name</td><td>evaluated value of name</td></tr> </table> \notes ! <a name="op_1">[1]</a> expression is evaluated only if boolean is true. \par ! <a name="op_2">[2]</a> expression is evaluated only if boolean is false. \par ! <a name="op_3">[3]</a> expression must yield a boolean. \par ! <a name="op_4">[4]</a> only the pertinent expression is evaluated. \section named_functions Named Functions --- 15,57 ---- \par <table width="100%" cellspacing="1" cellpadding="1" border="1"> ! <tr><th>Unary Operation Name</th><th colspan="4">Parameter</th><th>Result</th></tr> ! <tr><td><code>.not</code></td><td colspan="4">boolean</td><td>logical not</td></tr> ! <tr><td><code>.unary_negate</code></td><td colspan="4">number</td><td>unary negation</td></tr> ! <tr><th>Binary Operation Name</th><th colspan="4">Parameters</th><th>Result</th></tr> ! <tr><td><code>.add</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 + number_1</td></tr> ! <tr><td><code>.subtract</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 - number_1</td></tr> ! <tr><td><code>.multiply</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 * number_1</td></tr> ! <tr><td><code>.modulus</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 \% number_1</td></tr> ! <tr><td><code>.divide</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 / number_1</td></tr> ! <tr><th>Predicate Operation Name</th><th colspan="4">Parameters</th><th>Result</th></tr> ! <tr><td><code>.less</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 < number_1</td></tr> ! <tr><td><code>.greater</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 > number_1</td></tr> ! <tr><td><code>.less_equal</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 <= number_1</td></tr> ! <tr><td><code>.greater_equal</code><td colspan="2">number_0</td><td colspan="2">number_1</td><td>number_0 >= number_1</td></tr> ! <tr><td><code>.equal</code><td colspan="2">value_0</td>... [truncated message content] |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:25
|
Update of /cvsroot/adobe-source/adobe-source/adobe/future/widgets/headers/fltk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future/widgets/headers/fltk Modified Files: ui_core_implementation.hpp Log Message: asl 1.0.13 Index: ui_core_implementation.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/headers/fltk/ui_core_implementation.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_core_implementation.hpp 6 Jan 2006 18:35:21 -0000 1.5 --- ui_core_implementation.hpp 3 Feb 2006 18:20:44 -0000 1.6 *************** *** 1,6 **** /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 33,46 **** struct number_formatter_t::implementation_t { ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(); ! void set_format(const std::string& format); ! std::string get_format() const; ! std::string format(const value_t& x); ! value_t parse(const std::string& str, value_t the_type); ! std::string format_m; }; --- 33,46 ---- struct number_formatter_t::implementation_t { ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(); ! void set_format(const std::string& format); ! std::string get_format() const; ! std::string format(const value_t& x); ! value_t parse(const std::string& str, value_t the_type); ! std::string format_m; }; *************** *** 48,85 **** struct control_t : boost::equality_comparable<control_t> { ! control_t(); ! control_t(theme_t theme); ! control_t(const control_t& rhs); ! virtual ~control_t(); ! virtual extents_t best_bounds(); ! void set_bounds( ! const point_2d_t& position, ! const extents_t& geometry); ! void place( const point_2d_t& position, ! const extents_t& geometry); ! void set_name(const std::string& name); ! virtual void set_theme(theme_t theme); ! void adorn_theme(theme_t theme); ! void unadorn_theme(theme_t theme); ! void set_active(bool make_active); ! void enable(bool make_enabled); ! void set_visible(bool make_visible); ! void set_focused(bool make_focused); ! bool is_focused(); ! void signal_focus(const implementation::control_focus_proc_t& proc); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! static void callback_s(fltk::Widget* w, void* v); ! // ! // These member variables should only be accessed from ! // inside the ui_core_implementation. ! // ! fltk::Widget* control_m; ! theme_t theme_m; ! implementation::control_focus_proc_t focus_proc_m; ! extents_t geometry_m; ! point_2d_t position_m; ! std::string widget_type_m; }; --- 48,85 ---- struct control_t : boost::equality_comparable<control_t> { ! control_t(); ! control_t(theme_t theme); ! control_t(const control_t& rhs); ! virtual ~control_t(); ! virtual extents_t best_bounds(); ! void set_bounds( ! const point_2d_t& position, ! const extents_t& geometry); ! void place( const point_2d_t& position, ! const extents_t& geometry); ! void set_name(const std::string& name); ! virtual void set_theme(theme_t theme); ! void adorn_theme(theme_t theme); ! void unadorn_theme(theme_t theme); ! void set_active(bool make_active); ! void enable(bool make_enabled); ! void set_visible(bool make_visible); ! void set_focused(bool make_focused); ! bool is_focused(); ! void signal_focus(const implementation::control_focus_proc_t& proc); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! static void callback_s(fltk::Widget* w, void* v); ! // ! // These member variables should only be accessed from ! // inside the ui_core_implementation. ! // ! fltk::Widget* control_m; ! theme_t theme_m; ! implementation::control_focus_proc_t focus_proc_m; ! extents_t geometry_m; ! point_2d_t position_m; ! std::string widget_type_m; }; *************** *** 88,115 **** struct window_t::implementation_t : boost::equality_comparable<window_t::implementation_t> { ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! virtual ~implementation_t(); ! void initialize(const std::string& name, ! const fltk::Rectangle& bounds, ! window_style_t style, ! window_attributes_t attributes, ! window_modality_t modality); ! void set_bounds(const point_2d_t& position, ! const extents_t& geometry); ! void set_size(const point_2d_t& size); ! void reposition(window_reposition_t position); ! void set_visible(bool make_visible); ! void draw_controls(); ! void signal_resize_complete(const implementation::window_resize_complete_proc_t& proc); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::window_t::implementation_t); ! dictionary_t essentials() const; ! class notify_window* window_m; ! extents_t geometry_m; ! point_2d_t position_m; ! implementation::window_resize_complete_proc_t resize_complete_proc_m; }; --- 88,116 ---- struct window_t::implementation_t : boost::equality_comparable<window_t::implementation_t> { ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! virtual ~implementation_t(); ! void initialize(const std::string& name, ! const fltk::Rectangle& bounds, ! window_style_t style, ! window_attributes_t attributes, ! window_modality_t modality); ! extents_t measure() { return extents_t(); } ! void set_bounds(const point_2d_t& position, ! const extents_t& geometry); ! void set_size(const point_2d_t& size); ! void reposition(window_reposition_t position); ! void set_visible(bool make_visible); ! void draw_controls(); ! void signal_resize_complete(const implementation::window_resize_complete_proc_t& proc); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::window_t::implementation_t); ! dictionary_t essentials() const; ! class notify_window* window_m; ! extents_t geometry_m; ! point_2d_t position_m; ! implementation::window_resize_complete_proc_t resize_complete_proc_m; }; *************** *** 118,130 **** struct group_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! virtual extents_t best_bounds(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::group_t::implementation_t); }; --- 119,131 ---- struct group_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! virtual extents_t best_bounds(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::group_t::implementation_t); }; *************** *** 133,157 **** struct tab_group_t::implementation_t : control_t { ! typedef control_t _super; ! typedef std::vector<tab_group_t::tab_t> tab_set_t; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const tab_group_t::tab_t* first, ! const tab_group_t::tab_t* last); ! virtual extents_t best_bounds(); ! void set_value(const value_t& new_value); ! void signal_value_change(const implementation::tab_group_value_proc_t& proc); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::tab_group_t::implementation_t); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! int debounce_m; ! implementation::tab_group_value_proc_t value_proc_m; ! tab_set_t items_m; }; --- 134,158 ---- struct tab_group_t::implementation_t : control_t { ! typedef control_t _super; ! typedef std::vector<tab_group_t::tab_t> tab_set_t; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const tab_group_t::tab_t* first, ! const tab_group_t::tab_t* last); ! virtual extents_t best_bounds(); ! void set_value(const value_t& new_value); ! void signal_value_change(const implementation::tab_group_value_proc_t& proc); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::tab_group_t::implementation_t); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! int debounce_m; ! implementation::tab_group_value_proc_t value_proc_m; ! tab_set_t items_m; }; *************** *** 160,171 **** struct panel_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::panel_t::implementation_t); }; --- 161,172 ---- struct panel_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::panel_t::implementation_t); }; *************** *** 174,198 **** struct button_t::implementation_t : control_t { ! typedef control_t _super; ! typedef std::vector<state_descriptor_t> state_set_t; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const button_t::state_descriptor_t* first, ! const button_t::state_descriptor_t* last); ! void set_default(bool is_default); ! void set_cancel(bool is_cancel); ! void set_value(modifiers_t modifiers, const value_t& value); ! void set_contributing(modifiers_t modifiers, ! const dictionary_t& value); ! virtual void callback(); ! ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::button_t::implementation_t); ! virtual dictionary_t essentials() const; ! state_set_t state_set_m; }; --- 175,199 ---- struct button_t::implementation_t : control_t { ! typedef control_t _super; ! typedef std::vector<state_descriptor_t> state_set_t; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const button_t::state_descriptor_t* first, ! const button_t::state_descriptor_t* last); ! void set_default(bool is_default); ! void set_cancel(bool is_cancel); ! void set_value(modifiers_t modifiers, const value_t& value); ! void set_contributing(modifiers_t modifiers, ! const std::pair<dictionary_t, array_t>& value); ! virtual void callback(); ! ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::button_t::implementation_t); ! virtual dictionary_t essentials() const; ! state_set_t state_set_m; }; *************** *** 201,227 **** struct radio_button_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(const std::string& name, const adobe::value_t& value, ! adobe::theme_t theme); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! extents_t measure(); ! void enable(bool make_enabled); ! void set(const adobe::value_t& value); ! void monitor(const ! implementation::radio_button_hit_proc_t& proc); ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::radio_button_t::implementation_t); ! virtual dictionary_t essentials() const; ! implementation::radio_button_hit_proc_t hit_proc_m; ! adobe::value_t set_value_m; ! adobe::value_t last_m; }; --- 202,228 ---- struct radio_button_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(const std::string& name, const adobe::value_t& value, ! adobe::theme_t theme); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! extents_t measure(); ! void enable(bool make_enabled); ! void set(const adobe::value_t& value); ! void monitor(const ! implementation::radio_button_hit_proc_t& proc); ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::radio_button_t::implementation_t); ! virtual dictionary_t essentials() const; ! implementation::radio_button_hit_proc_t hit_proc_m; ! adobe::value_t set_value_m; ! adobe::value_t last_m; }; *************** *** 231,257 **** struct checkbox_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(const std::string& name, ! const adobe::value_t& true_value, ! const adobe::value_t& false_value, ! theme_t theme); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! virtual extents_t measure(); ! virtual void set(adobe::value_t new_value); ! void monitor(const implementation::checkbox_hit_proc_t& ! proc); ! virtual void callback(); ! virtual dictionary_t essentials() const; ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::checkbox_t::implementation_t); ! implementation::checkbox_hit_proc_t hit_proc_m; ! adobe::value_t true_value_m; ! adobe::value_t false_value_m; ! adobe::value_t current_value_m; }; --- 232,258 ---- struct checkbox_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(const std::string& name, ! const adobe::value_t& true_value, ! const adobe::value_t& false_value, ! theme_t theme); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! virtual extents_t measure(); ! virtual void set(adobe::value_t new_value); ! void monitor(const implementation::checkbox_hit_proc_t& ! proc); ! virtual void callback(); ! virtual dictionary_t essentials() const; ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::checkbox_t::implementation_t); ! implementation::checkbox_hit_proc_t hit_proc_m; ! adobe::value_t true_value_m; ! adobe::value_t false_value_m; ! adobe::value_t current_value_m; }; *************** *** 260,278 **** struct link_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds); ! void set_value(bool value); ! void signal_hit(const implementation::link_hit_proc_t& proc); ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::link_t::implementation_t); ! implementation::link_hit_proc_t hit_proc_m; ! guide_set_t prongs_m; ! bool value_m; }; --- 261,279 ---- struct link_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds); ! void set_value(bool value); ! void signal_hit(const implementation::link_hit_proc_t& proc); ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::link_t::implementation_t); ! implementation::link_hit_proc_t hit_proc_m; ! guide_set_t prongs_m; ! bool value_m; }; *************** *** 281,301 **** struct progress_bar_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! pb_style_t bar_style, ! bool is_vertical); ! virtual extents_t best_bounds(); ! void set_min_value(long min_value); ! void set_max_value(long max_value); ! void set_value(long value); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::progress_bar_t::implementation_t); ! bool is_vertical_m; ! pb_style_t bar_style_m; }; --- 282,302 ---- struct progress_bar_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! pb_style_t bar_style, ! bool is_vertical); ! virtual extents_t best_bounds(); ! void set_min_value(long min_value); ! void set_max_value(long max_value); ! void set_value(long value); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::progress_bar_t::implementation_t); ! bool is_vertical_m; ! pb_style_t bar_style_m; }; *************** *** 304,315 **** struct separator_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::separator_t::implementation_t); }; --- 305,316 ---- struct separator_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::separator_t::implementation_t); }; *************** *** 318,338 **** struct static_text_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! long best_height_given_width(long width); ! void set_name(const std::string& name); ! void signal_hit( ! const implementation::static_text_hit_proc_t& proc); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::static_text_t::implementation_t); ! implementation::static_text_hit_proc_t hit_proc_m; }; --- 319,339 ---- struct static_text_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! long best_height_given_width(long width); ! void set_name(const std::string& name); ! void signal_hit( ! const implementation::static_text_hit_proc_t& proc); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::static_text_t::implementation_t); ! implementation::static_text_hit_proc_t hit_proc_m; }; *************** *** 341,383 **** struct edit_text_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name, ! bool scrollable, ! bool password, ! long rows, ! long cols); ! virtual extents_t best_bounds(); ! virtual void set_bounds(const point_2d_t& position, ! const extents_t& geometry); ! void set_field_text(const std::string& text); ! void set_static_disabled(bool is_static_disabled); ! void set_selection(long start_char, long end_char); ! void signal_pre_edit( ! const implementation::edit_text_pre_edit_proc_t& p); ! void signal_post_edit( ! const implementation::edit_text_post_edit_proc_t& p); ! void signal_label_hit( ! const implementation::edit_text_label_hit_proc_t& p); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::edit_text_t::implementation_t); ! std::string field_text_m; ! std::string name_m; ! std::string static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! long rows_m; ! long cols_m; ! bool scrollable_m; ! bool password_m; ! implementation::edit_text_post_edit_proc_t post_edit_proc_m; ! implementation::edit_text_label_hit_proc_t label_hit_proc_m; }; --- 342,384 ---- struct edit_text_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name, ! bool scrollable, ! bool password, ! long rows, ! long cols); ! virtual extents_t best_bounds(); ! virtual void set_bounds(const point_2d_t& position, ! const extents_t& geometry); ! void set_field_text(const std::string& text); ! void set_static_disabled(bool is_static_disabled); ! void set_selection(long start_char, long end_char); ! void signal_pre_edit( ! const implementation::edit_text_pre_edit_proc_t& p); ! void signal_post_edit( ! const implementation::edit_text_post_edit_proc_t& p); ! void signal_label_hit( ! const implementation::edit_text_label_hit_proc_t& p); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::edit_text_t::implementation_t); ! std::string field_text_m; ! std::string name_m; ! std::string static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! long rows_m; ! long cols_m; ! bool scrollable_m; ! bool password_m; ! implementation::edit_text_post_edit_proc_t post_edit_proc_m; ! implementation::edit_text_label_hit_proc_t label_hit_proc_m; }; *************** *** 386,418 **** struct popup_t::implementation_t : control_t { ! typedef control_t _super; ! typedef std::pair<std::string, value_t> menu_item_t; ! typedef std::vector<menu_item_t> menu_items_t; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! virtual extents_t best_bounds(); ! void set_static_disabled(bool is_static_disabled); ! void add_menu_item(const std::string& name, ! const value_t& value); ! void clear_menu_items(); ! void set_current_menu_item(const value_t& item); ! void select_with_text(const std::string& text); ! void signal_value_change( ! const implementation::popup_value_proc_t& proc); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::popup_t::implementation_t); ! std::string name_m; ! std::string static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! implementation::popup_value_proc_t value_proc_m; ! menu_items_t menu_items_m; }; --- 387,421 ---- struct popup_t::implementation_t : control_t { ! typedef control_t _super; ! typedef std::pair<std::string, value_t> menu_item_t; ! typedef std::vector<menu_item_t> menu_items_t; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name); ! virtual extents_t best_bounds(); ! void set_bounds(const point_2d_t& position, ! const extents_t& geometry); ! void set_static_disabled(bool is_static_disabled); ! void add_menu_item(const std::string& name, ! const value_t& value); ! void clear_menu_items(); ! void set_current_menu_item(const value_t& item); ! void select_with_text(const std::string& text); ! void signal_value_change( ! const implementation::popup_value_proc_t& proc); ! virtual dictionary_t essentials() const; ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::popup_t::implementation_t); ! std::string name_m; ! std::string static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! implementation::popup_value_proc_t value_proc_m; ! menu_items_t menu_items_m; }; *************** *** 421,459 **** struct unit_edit_text_t::implementation_t : edit_text_t::implementation_t { ! typedef edit_text_t::implementation_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name, ! bool using_popup, ! long cols, ! long rows); ! popup_t& get_popup(); ! virtual extents_t best_bounds(); ! void set_bounds(const point_2d_t& position, ! const extents_t& geometry); ! void set_active(bool is_active); ! virtual void set_theme(theme_t theme); ! void add_popup_menu_item(const std::string& name, ! const value_t& value); ! void select_popup_with_text(const std::string& text); ! void signal_popup_value_change( ! const implementation::popup_value_proc_t& proc); ! virtual dictionary_t essentials() const; ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::unit_edit_text_t::implementation_t); ! popup_t popup_m; ! bool using_popup_m; ! // ! // REVISIT (ralpht): Currently we just make the popup and ! // edit widgets the same height and hope that we end ! // up with baseline alignment. We clearly won't, so ! // at some point it will become important to store the ! // heights and baselines of the edit and popup widgets ! // so that we can get baseline alignment. ! // }; --- 424,462 ---- struct unit_edit_text_t::implementation_t : edit_text_t::implementation_t { ! typedef edit_text_t::implementation_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name, ! bool using_popup, ! long cols, ! long rows); ! popup_t& get_popup(); ! virtual extents_t best_bounds(); ! void set_bounds(const point_2d_t& position, ! const extents_t& geometry); ! void set_active(bool is_active); ! virtual void set_theme(theme_t theme); ! void add_popup_menu_item(const std::string& name, ! const value_t& value); ! void select_popup_with_text(const std::string& text); ! void signal_popup_value_change( ! const implementation::popup_value_proc_t& proc); ! virtual dictionary_t essentials() const; ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::unit_edit_text_t::implementation_t); ! popup_t popup_m; ! bool using_popup_m; ! // ! // REVISIT (ralpht): Currently we just make the popup and ! // edit widgets the same height and hope that we end ! // up with baseline alignment. We clearly won't, so ! // at some point it will become important to store the ! // heights and baselines of the edit and popup widgets ! // so that we can get baseline alignment. ! // }; *************** *** 462,525 **** struct slider_t::implementation_t : control_t { ! typedef control_t _super; ! ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! ! void initialize(/*const fltk::Rectangle& bounds,*/ ! int zero, ! bool is_vertical, ! slider_style_t style, ! long num_tick_marks); ! virtual extents_t best_bounds(); ! void set_min_value(long min_value); ! void set_max_value(long max_value); ! void set_value(long value); ! void signal_value_change( ! const implementation::slider_value_proc_t& proc); ! virtual void callback(); ! ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::slider_t::implementation_t); ! ! implementation::slider_value_proc_t value_proc_m; ! bool is_vertical_m; ! slider_style_t style_m; ! long num_tick_marks_m; ! }; ! ! /****************************************************************************************************/ ! ! struct bevel_button_t::implementation_t : control_t ! { ! typedef control_t _super; ! typedef std::pair<std::string, value_t> menu_item_t; ! typedef std::vector<menu_item_t> menu_items_t; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(const fltk::Rectangle& bounds, ! const std::string& name, ! bool offset_contents, ! bool menu_points_right); ! void add_menu_item(const std::string& name, ! const value_t& value); ! void clear_menu_items(); ! void set_bevel_amount(bevel_button_bevel_amount_t amount); ! void set_current_menu_item(const value_t& item); ! void set_value(bool value); ! void signal_hit( ! const implementation::bevel_button_hit_proc_t& proc); ! void signal_value_change( ! const implementation::bevel_button_popup_value_proc_t& proc); ! virtual dictionary_t essentials() const; ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::bevel_button_t::implementation_t); ! implementation::bevel_button_hit_proc_t hit_proc_m; ! implementation::bevel_button_popup_value_proc_t value_proc_m; ! menu_items_t menu_items_m; ! bool offset_contents_m; ! bool menu_points_right_m; }; --- 465,492 ---- struct slider_t::implementation_t : control_t { ! typedef control_t _super; ! implementation_t(); ! implementation_t(const implementation_t& rhs); ! void initialize(/*const fltk::Rectangle& bounds,*/ ! int zero, ! bool is_vertical, ! slider_style_t style, ! long num_tick_marks); ! virtual extents_t best_bounds(); ! void set_min_value(long min_value); ! void set_max_value(long max_value); ! void set_value(long value); ! void signal_value_change( ! const implementation::slider_value_proc_t& proc); ! virtual void callback(); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::slider_t::implementation_t); ! implementation::slider_value_proc_t value_proc_m; ! bool is_vertical_m; ! slider_style_t style_m; ! long num_tick_marks_m; }; *************** *** 542,546 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::unit_edit_text_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::slider_t::implementation_t); - ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::bevel_button_t::implementation_t); /****************************************************************************************************/ --- 509,512 ---- |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:25
|
Update of /cvsroot/adobe-source/adobe-source/adobe/future/widgets/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future/widgets/resources Modified Files: resources.h Log Message: asl 1.0.13 Index: resources.h =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/resources/resources.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** resources.h 7 Jul 2005 22:00:06 -0000 1.1 --- resources.h 3 Feb 2006 18:20:45 -0000 1.2 *************** *** 1,6 **** /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ // --- 1,6 ---- /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ // *************** *** 13,17 **** /// The main application icon. // ! #define RES_APP_ICON 2 /****************************************************************************************************/ --- 13,17 ---- /// The main application icon. // ! #define RES_APP_ICON 2 /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:25
|
Update of /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future/widgets/sources Modified Files: client_assembler.cpp ui_core.cpp ui_core_common.cpp Log Message: asl 1.0.13 Index: ui_core_common.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/ui_core_common.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_core_common.cpp 6 Jan 2006 18:35:21 -0000 1.5 --- ui_core_common.cpp 3 Feb 2006 18:20:45 -0000 1.6 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 20,24 **** #ifdef BOOST_MSVC namespace std { ! using ::isspace; } // namespace std #endif --- 20,24 ---- #ifdef BOOST_MSVC namespace std { ! using ::isspace; } // namespace std #endif *************** *** 32,70 **** void align_slices(::adobe::extents_t::slice_t& slice_one, ::adobe::extents_t::slice_t slice_two) { ! // ! // Make sure that we have points of interest to align by. ! // ! // REVISIT (fbrereto) Are we sure we want to assert here? ! // ! assert(!slice_one.poi_m.empty()); ! assert(!slice_two.poi_m.empty()); ! // ! // The eventual point of interest (or baseline) is the maxiumum ! // of the two we have. ! // ! long poi = std::max(slice_one.poi_m[0], slice_two.poi_m[0]); ! // ! // The length of the slice is the maximum amount before the ! // point of interest (ascent above baseline) plus the maximum ! // amount after the point of interest (descent below the ! // baseline). ! // ! // The maximum before the point of interest is obviously the ! // the point of interest. ! // ! long length = poi + std::max( slice_one.length_m - slice_one.poi_m[0], ! slice_two.length_m - slice_two.poi_m[0]); ! // ! // Set our new values into the first slice. ! // ! slice_one.poi_m[0] = poi; ! slice_one.length_m = length; } --- 32,70 ---- void align_slices(::adobe::extents_t::slice_t& slice_one, ::adobe::extents_t::slice_t slice_two) { ! // ! // Make sure that we have points of interest to align by. ! // ! // REVISIT (fbrereto) Are we sure we want to assert here? ! // ! assert(!slice_one.poi_m.empty()); ! assert(!slice_two.poi_m.empty()); ! // ! // The eventual point of interest (or baseline) is the maxiumum ! // of the two we have. ! // ! long poi = std::max(slice_one.poi_m[0], slice_two.poi_m[0]); ! // ! // The length of the slice is the maximum amount before the ! // point of interest (ascent above baseline) plus the maximum ! // amount after the point of interest (descent below the ! // baseline). ! // ! // The maximum before the point of interest is obviously the ! // the point of interest. ! // ! long length = poi + std::max( slice_one.length_m - slice_one.poi_m[0], ! slice_two.length_m - slice_two.poi_m[0]); ! // ! // Set our new values into the first slice. ! // ! slice_one.poi_m[0] = poi; ! slice_one.length_m = length; } *************** *** 73,77 **** std::string localize(const std::string& str) { ! return adobe::xstring(str); } --- 73,97 ---- std::string localize(const std::string& str) { ! return adobe::xstring(str); ! } ! ! /****************************************************************************************************/ ! ! ui_core_error_handler_proc_t& ui_core_error_handler() ! { ! static ui_core_error_handler_proc_t ui_core_error_handler_proc_s; ! ! return ui_core_error_handler_proc_s; ! } ! ! /****************************************************************************************************/ ! ! void report_ui_element_error(const std::string& error) ! { ! ui_core_error_handler_proc_t& proc(ui_core_error_handler()); ! ! if (proc.empty()) return; ! ! proc(error); } Index: ui_core.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/ui_core.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_core.cpp 6 Jan 2006 18:35:21 -0000 1.5 --- ui_core.cpp 3 Feb 2006 18:20:45 -0000 1.6 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt [...1826 lines suppressed...] ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DEFINITION(adobe::unit_edit_text_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DEFINITION(adobe::slider_t); /****************************************************************************************************/ ! #define ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(type) \ ! type::implementation_t& type::implementation() \ ! { assert(object_m); return *object_m; } \ ! const type::implementation_t& type::implementation() const \ ! { assert(object_m); return *object_m; } ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(number_formatter_t); *************** *** 1011,1015 **** ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(unit_edit_text_t); ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(slider_t); - ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(bevel_button_t); /****************************************************************************************************/ --- 938,941 ---- Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/client_assembler.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** client_assembler.cpp 6 Jan 2006 18:35:21 -0000 1.6 --- client_assembler.cpp 3 Feb 2006 18:20:45 -0000 1.7 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt [...6402 lines suppressed...] ! adobe::virtual_machine_t evaluator; ! /* ! We set the initial parent to be the root of the main display, an ! empty eve iterator and the given dialog size. ! */ ! adobe::parse(stream, adobe::line_position_t(file_path, getline_proc), ! adobe::widget_node_t(dialog_size, adobe::eve_t::iterator(), adobe::get_main_display().root() ! #ifndef NDEBUG ! , adobe::ui_overlay_t::position_t() ! #endif ! ), ! bind_layout(boost::bind(&client_assembler, boost::ref(token), _1, _2, _3, factory), ! result->layout_sheet_m, evaluator)); ! ! result->contributing_m = sheet.contributing(); ! ! return result; } |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:25
|
Update of /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/fltk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future/widgets/sources/fltk Modified Files: display.cpp ui_core_implementation.cpp ui_overlay.cpp Added Files: os_utilities.cpp Log Message: asl 1.0.13 Index: display.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/fltk/display.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** display.cpp 7 Nov 2005 18:00:43 -0000 1.2 --- display.cpp 3 Feb 2006 18:20:45 -0000 1.3 *************** *** 1,7 **** /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License ! (see accompanying file LICENSE_1_0_0.txt or a copy at ! http://opensource.adobe.com/licenses.html) */ --- 1,7 ---- /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License ! (see accompanying file LICENSE_1_0_0.txt or a copy at ! http://opensource.adobe.com/licenses.html) */ *************** *** 21,37 **** struct view_wrap { ! explicit view_wrap(fltk::Widget* ref) : ref_m(ref) {} ! fltk::Widget* ref_m; }; fltk::Widget* unwrap(adobe::display_t::position_t& position) { ! return (boost::any_cast<view_wrap>(position)).ref_m; } adobe::display_t::position_t wrap(fltk::Widget* view) { ! return adobe::display_t::position_t(view_wrap(view)); } --- 21,37 ---- struct view_wrap { ! explicit view_wrap(fltk::Widget* ref) : ref_m(ref) {} ! fltk::Widget* ref_m; }; fltk::Widget* unwrap(adobe::display_t::position_t& position) { ! return (boost::any_cast<view_wrap>(position)).ref_m; } adobe::display_t::position_t wrap(fltk::Widget* view) { ! return adobe::display_t::position_t(view_wrap(view)); } *************** *** 50,60 **** display_t& get_main_display() { ! static display_t display_s; ! return display_s; } struct display_t::implementation_t { ! std::vector<fltk::Widget*> roots_m; }; --- 50,60 ---- display_t& get_main_display() { ! static display_t display_s; ! return display_s; } struct display_t::implementation_t { ! std::vector<fltk::Widget*> roots_m; }; *************** *** 65,85 **** /****************************************************************************************************/ display_t::display_t() : object_m(new implementation_t()) {} display_t::~display_t() { ! delete object_m; ! object_m = 0; } display_t::implementation_t& display_t::implementation() { ! return *object_m; } const display_t::implementation_t& display_t::implementation() const { ! return *object_m; } display_t::position_t display_t::root() { ! return display_t::position_t(root_token()); } void display_t::erase(position_t& position) {} --- 65,91 ---- /****************************************************************************************************/ + template <> + fltk::Widget* unwrap_display_token<fltk::Widget*, adobe::display_t::position_t>(adobe::display_t::position_t& position) + { return (boost::any_cast<view_wrap>(position)).ref_m; } + + /****************************************************************************************************/ + display_t::display_t() : object_m(new implementation_t()) {} display_t::~display_t() { ! delete object_m; ! object_m = 0; } display_t::implementation_t& display_t::implementation() { ! return *object_m; } const display_t::implementation_t& display_t::implementation() const { ! return *object_m; } display_t::position_t display_t::root() { ! return display_t::position_t(root_token()); } void display_t::erase(position_t& position) {} *************** *** 88,92 **** display_t::position_t display_t::insert(position_t& parent, DisplayElement& element) { ! return insert(parent, adobe::view_for_element<fltk::Widget*>(element)); } --- 94,98 ---- display_t::position_t display_t::insert(position_t& parent, DisplayElement& element) { ! return insert(parent, adobe::view_for_element<fltk::Widget*>(element)); } *************** *** 96,107 **** display_t::position_t display_t::insert<fltk::Widget*>(position_t& parent, fltk::Widget*& element) { ! if (parent.type() == typeid(view_wrap)) ! { ! fltk::Group* parent_view(static_cast<fltk::Group*>(unwrap(parent))); ! parent_view->add(element); ! } ! else if (parent.type() == typeid(root_token)) ! object_m->roots_m.push_back(element); ! return wrap(element); } --- 102,113 ---- display_t::position_t display_t::insert<fltk::Widget*>(position_t& parent, fltk::Widget*& element) { ! if (parent.type() == typeid(view_wrap)) ! { ! fltk::Group* parent_view(static_cast<fltk::Group*>(unwrap(parent))); ! parent_view->add(element); ! } ! else if (parent.type() == typeid(root_token)) ! object_m->roots_m.push_back(element); ! return wrap(element); } Index: ui_overlay.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/fltk/ui_overlay.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ui_overlay.cpp 7 Nov 2005 18:00:43 -0000 1.2 --- ui_overlay.cpp 3 Feb 2006 18:20:45 -0000 1.3 *************** *** 1,9 **** /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License ! (see accompanying file LICENSE_1_0_0.txt or a copy at ! http://opensource.adobe.com/licenses.html) ! This is just a stub for an actual ui_overlay. */ --- 1,9 ---- /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License ! (see accompanying file LICENSE_1_0_0.txt or a copy at ! http://opensource.adobe.com/licenses.html) ! This is just a stub for an actual ui_overlay. */ *************** *** 22,34 **** struct ui_overlay_t::implementation_t { ! int dummy; }; ui_overlay_t::ui_overlay_t() : ! object_m(new implementation_t()) { } ui_overlay_t::~ui_overlay_t() { ! delete object_m; } --- 22,34 ---- struct ui_overlay_t::implementation_t { ! int dummy; }; ui_overlay_t::ui_overlay_t() : ! object_m(new implementation_t()) { } ui_overlay_t::~ui_overlay_t() { ! delete object_m; } *************** *** 50,58 **** ui_overlay_t::implementation_t& ui_overlay_t::implementation() { ! return *object_m; } const ui_overlay_t::implementation_t& ui_overlay_t::implementation() const { ! return *object_m; } --- 50,58 ---- ui_overlay_t::implementation_t& ui_overlay_t::implementation() { ! return *object_m; } const ui_overlay_t::implementation_t& ui_overlay_t::implementation() const { ! return *object_m; } --- NEW FILE: os_utilities.cpp --- /* Copyright 2005-2006 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ // This file intentionally left blank /****************************************************************************************************/ Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/sources/fltk/ui_core_implementation.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ui_core_implementation.cpp 7 Nov 2005 18:00:43 -0000 1.3 --- ui_core_implementation.cpp 3 Feb 2006 18:20:45 -0000 1.4 *************** *** 1,8 **** /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License ! See accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html */ --- 1,8 ---- /* [...4021 lines suppressed...] } ! ADOBE_INSERT_BOILERPLATE_SPECIALIZATION(window_t); // --- 2094,2108 ---- template<> display_t::position_t insert<unit_edit_text_t>(display_t& display, ! display_t::position_t& parent, unit_edit_text_t& element) { ! fltk::Widget* edit(adobe::view_for_element<fltk::Widget*>(element)); ! fltk::Widget* popup(adobe::view_for_element<fltk::Widget*>(element.implementation().get_popup())); ! display_t::position_t result = display.insert<fltk::Widget*>(parent, edit); ! if (popup) display.insert<fltk::Widget*>(parent, popup); ! return result; } ! ADOBE_INSERT_BOILERPLATE_SPECIALIZATION(window_t); // |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:23
|
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/structure In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/structure Modified Files: indices.dox mainpage.dox news.dox preface.dox toc.dox Log Message: asl 1.0.13 Index: indices.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/structure/indices.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** indices.dox 7 Jul 2005 22:00:05 -0000 1.1 --- indices.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 1,6 **** /*! \page asl_indices Indices ! - <a href="annotated.html">Annotated Class List</a> ! - <a href="classes.html">Class Index</a> ! - <a href="functions.html">Member Index</a> ! - <a href="files.html">File Index</a> */ --- 1,6 ---- /*! \page asl_indices Indices ! - <a href="annotated.html">Annotated Class List</a> ! - <a href="classes.html">Class Index</a> ! - <a href="functions.html">Member Index</a> ! - <a href="files.html">File Index</a> */ Index: preface.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/structure/preface.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** preface.dox 17 Mar 2005 18:02:44 -0000 1.3 --- preface.dox 3 Feb 2006 18:20:43 -0000 1.4 *************** *** 18,24 **** \par This theme is recurrent throughout ASL and is reflected in many aspects, including: ! - The reliance on value semantics, rather than reference or pointer semantics, as the mechanism to control connections. ! - Stating the requirements of algorithms in terms of semantic concepts rather than interfaces. ! - Making connections explicit and using explicit data structure, notable in the lack of inheritance as a coupling mechanism. <i>It is a good start...</i> --- 18,24 ---- \par This theme is recurrent throughout ASL and is reflected in many aspects, including: ! - The reliance on value semantics, rather than reference or pointer semantics, as the mechanism to control connections. ! - Stating the requirements of algorithms in terms of semantic concepts rather than interfaces. ! - Making connections explicit and using explicit data structure, notable in the lack of inheritance as a coupling mechanism. <i>It is a good start...</i> *************** *** 66,80 **** \par I would be remiss without thanking a number of people for their efforts in putting together this library. Any ranking would be unfair, so I list them here in some kind of lexicographical order. ! - Boost - ASL relies heavily on the Boost libraries and freely borrows ideas and techniques pioneered by the many great Boost contributors. Feel free to borrow back. ! - Foster Brereton, who has been my wingman working on ASL and Eve before there was ASL. This release would not have happened without him. ! - Greg Gilley, my boss, who has provided shelter for the Software Technology Lab and the support necessary to make this happen. ! - Grant Munsey, who opened the doors at Adobe to open source. We hope you continue to get better. ! - Martin Newell, whose Boxes program sparked the idea that led to Eve and whose support gave me time to explore countless iterations of Adam. ! - The Photoshop team, especially Andrew Coven, Scott Byer, Joe Ault, and (ex-Photoshop member) Mark Hamburg. They have listened to me ramble incoherently for countless hours as I have struggled to form the ideas expressed here. ! - Bob Pierce, who authored each of the Adobe open source licenses. ! - Alex Stepanov who, more than anyone, has shaped how I think about software. Initially, through his work on the Standard Template Library. Now, as a personal friend and colleague he pushes me to learn more and to seek real problems and solutions. His constant pushing has transformed my code from a hack to less of a hack. It is a start. ! - Bjarne Stroustrup, the C++ Standards Committee, and the C++ community, who provided a language with which I can attempt to express my ideas. ! - Those that have taken the time to review and contribute to ASL including, Doug Ahmann, Bob Archer, Eric Berdahl, Florin Trofin, Tony Van Eerd, John Yen. ! - My wife, Tricia, for her loving support. \par --- 66,80 ---- \par I would be remiss without thanking a number of people for their efforts in putting together this library. Any ranking would be unfair, so I list them here in some kind of lexicographical order. ! - Boost - ASL relies heavily on the Boost libraries and freely borrows ideas and techniques pioneered by the many great Boost contributors. Feel free to borrow back. ! - Foster Brereton, who has been my wingman working on ASL and Eve before there was ASL. This release would not have happened without him. ! - Greg Gilley, my boss, who has provided shelter for the Software Technology Lab and the support necessary to make this happen. ! - Grant Munsey, who opened the doors at Adobe to open source. We hope you continue to get better. ! - Martin Newell, whose Boxes program sparked the idea that led to Eve and whose support gave me time to explore countless iterations of Adam. ! - The Photoshop team, especially Andrew Coven, Scott Byer, Joe Ault, and (ex-Photoshop member) Mark Hamburg. They have listened to me ramble incoherently for countless hours as I have struggled to form the ideas expressed here. ! - Bob Pierce, who authored each of the Adobe open source licenses. ! - Alex Stepanov who, more than anyone, has shaped how I think about software. Initially, through his work on the Standard Template Library. Now, as a personal friend and colleague he pushes me to learn more and to seek real problems and solutions. His constant pushing has transformed my code from a hack to less of a hack. It is a start. ! - Bjarne Stroustrup, the C++ Standards Committee, and the C++ community, who provided a language with which I can attempt to express my ideas. ! - Those that have taken the time to review and contribute to ASL including, Doug Ahmann, Bob Archer, Eric Berdahl, Florin Trofin, Tony Van Eerd, John Yen. ! - My wife, Tricia, for her loving support. \par Index: news.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/structure/news.dox,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** news.dox 9 Jan 2006 19:31:34 -0000 1.6 --- news.dox 3 Feb 2006 18:20:42 -0000 1.7 *************** *** 6,22 **** \page top_news Top News ! \par January 05, 2005 - ASL 1.0.12 Released Highlights of the 1.0.12 changes include: ! - The \ref asl_gil has been added. This library allows for writing generic imaging algorithms with performance comparable to hand-coding for a particular image type ! - Lubomir has been hard at work getting the GIL tutorial and design guide ready for release. We anticipate it within a couple weeks. ! - ASL now compiles against Boost 1.33.1 ! - IDE projects have been added for XCode 2.2 ! - Many improvements to Adobe Begin and Win32's ui_core ! - A significant overhaul of adobe::forest. ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. ! \par January 05, 2005 - In Memory of Grant Munsey \htmlonly <table><tr><td align='center' valign='top'> --- 6,38 ---- \page top_news Top News ! \par February 02, 2006 - ASL 1.0.13 Released ! Highlights of the 1.0.13 changes include: ! - Added a <code>adobe::nearest_cast</code> by Mark Ruzon ! - Added <a href="http://opensource.adobe.com/twiki/bin/view/AdobeSource/ModalDialogIntegrationKit"><code>handle_dialog</code></a>, a self-contained API used to manage a modal dialog instance ! - <code>adobe/cmath.hpp</code> has been augmented to include support for C99/TR1 extensions ! - Improvements to the function modeling engine (Adam) ! - A complete rewrite of the widgets library for the Mac ! - For more information and more changes see the \ref asl_release_notes ! \par ! Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. ! ! \par January 16, 2006 - GIL Tutorial and Design Guide Released ! \ref asl_gil \ref GILTutorial "tutorial" and \ref GILDesignGuide "design guide" is now available. Thanks to Lubomir Bourdev and Hailin Jin for all the work. ! \par ! Head over to <a href="http://opensource.adobe.com/gil">opensource.adobe.com/gil</a> for this extended documentation. ! ! \par January 05, 2006 - ASL 1.0.12 Released Highlights of the 1.0.12 changes include: ! - The \ref asl_gil has been added. This library allows for writing generic imaging algorithms with performance comparable to hand-coding for a particular image type ! - Lubomir has been hard at work getting the GIL tutorial and design guide ready for release. We anticipate it within a couple weeks. ! - ASL now compiles against Boost 1.33.1 ! - IDE projects have been added for XCode 2.2 ! - Many improvements to Adobe Begin and Win32's ui_core ! - A significant overhaul of adobe::forest. ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. ! \par January 05, 2006 - In Memory of Grant Munsey \htmlonly <table><tr><td align='center' valign='top'> *************** *** 33,41 **** \par December 01, 2005 - ASL 1.0.11 Released Highlights of the 1.0.11 changes include: ! - MSVC 8 IDE projects for ASL and Begin have been released to take advantage of the new IDE features ! - Many compiler compatibility fixes for MSVC and Darwin (GCC) ! - Project updates for compatibility with XCode 2.2 ! - Work in the Win32 ui_core to bring parity between it and the Mac implementation ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. --- 49,57 ---- \par December 01, 2005 - ASL 1.0.11 Released Highlights of the 1.0.11 changes include: ! - MSVC 8 IDE projects for ASL and Begin have been released to take advantage of the new IDE features ! - Many compiler compatibility fixes for MSVC and Darwin (GCC) ! - Project updates for compatibility with XCode 2.2 ! - Work in the Win32 ui_core to bring parity between it and the Mac implementation ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. *************** *** 48,69 **** http://opensource.adobe.com/twiki/bin/view/AdobeSource \par November 03, 2005 - ASL 1.0.10 Released Highlights of the 1.0.10 changes include: ! - Updates for compatibility with the upcoming MSVC 8 (Visual Studio 2005) release ! - Updates for compatibility with the upcoming Boost 1.33.1 release ! - Localization support integrated into Adobe Begin with a sample language glossary ! - Support for creating polymorphic regular objects as an alternative to object oriented programming (adobe::regular_object) ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. - \page previous_news Previous News \par October 06, 2005 - ASL 1.0.9 Released Highlights of the 1.0.9 changes include: ! - Added adobe::sha1_t, adobe::sha224_t, adobe::sha256_t, adobe::sha384_t, and adobe::sha512_t ! - Added adobe::dancing_links, an implementation of Knuth's Dancing Links Algorithm ! - BBv2 now builds a double-clickable Adobe Begin on MacOS X and Win32 - no IDE needed! ! - Updated Boost patch file; please re-patch your Boost distribution ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. --- 64,85 ---- http://opensource.adobe.com/twiki/bin/view/AdobeSource + \page previous_news Previous News \par November 03, 2005 - ASL 1.0.10 Released Highlights of the 1.0.10 changes include: ! - Updates for compatibility with the upcoming MSVC 8 (Visual Studio 2005) release ! - Updates for compatibility with the upcoming Boost 1.33.1 release ! - Localization support integrated into Adobe Begin with a sample language glossary ! - Support for creating polymorphic regular objects as an alternative to object oriented programming (adobe::regular_object) ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. \par October 06, 2005 - ASL 1.0.9 Released Highlights of the 1.0.9 changes include: ! - Added adobe::sha1_t, adobe::sha224_t, adobe::sha256_t, adobe::sha384_t, and adobe::sha512_t ! - Added adobe::dancing_links, an implementation of Knuth's Dancing Links Algorithm ! - BBv2 now builds a double-clickable Adobe Begin on MacOS X and Win32 - no IDE needed! ! - Updated Boost patch file; please re-patch your Boost distribution ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. *************** *** 71,80 **** \par September 01, 2005 - ASL 1.0.8 Released Highlights of the 1.0.8 changes include: ! - Updated ASL to use Boost 1.33.0 ! - 4x speed increase in the xstring engine, both in parsing and lookups ! - Rewrote enum_ops to follow its original intent ! - Releasing All-In-One scripts that download all ASL dependencies, perform the necessary setup, and build the libraries ! - Updated Boost patch file; please re-patch your Boost distribution ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. --- 87,96 ---- \par September 01, 2005 - ASL 1.0.8 Released Highlights of the 1.0.8 changes include: ! - Updated ASL to use Boost 1.33.0 ! - 4x speed increase in the xstring engine, both in parsing and lookups ! - Rewrote enum_ops to follow its original intent ! - Releasing All-In-One scripts that download all ASL dependencies, perform the necessary setup, and build the libraries ! - Updated Boost patch file; please re-patch your Boost distribution ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. *************** *** 82,90 **** \par August 04, 2005 - ASL 1.0.7 Released Highlights of the 1.0.7 changes include: ! - Dynamic visibility (hide/show) support in eve layout engine ! - adobe::index_iterator, adobe::any_iterator, adobe::reverse_fullorder_cursor, and adobe::filter_fullorder_cursor ! - adobe::const_once_name_t replaces adobe::once_name_t. ! - Updated Boost patch file; please re-patch your Boost distribution ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. --- 98,106 ---- \par August 04, 2005 - ASL 1.0.7 Released Highlights of the 1.0.7 changes include: ! - Dynamic visibility (hide/show) support in eve layout engine ! - adobe::index_iterator, adobe::any_iterator, adobe::reverse_fullorder_cursor, and adobe::filter_fullorder_cursor ! - adobe::const_once_name_t replaces adobe::once_name_t. ! - Updated Boost patch file; please re-patch your Boost distribution ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. *************** *** 92,100 **** \par July 07, 2005 - ASL 1.0.6 Released Highlights of the 1.0.6 changes include: ! - MacTel (Mac OS X on Intel) support ! - Automated building of libraries for IDE-based projects using BBv2 ! - Added <code>\<adobe/numeric.hpp\></code>, beginning similar support for <code>\<numeric\></code> as we have for <code>\<algorithm\></code> ! - Separation of the <code>adobe_widgets</code> UI library from Adobe Begin ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. --- 108,116 ---- \par July 07, 2005 - ASL 1.0.6 Released Highlights of the 1.0.6 changes include: ! - MacTel (Mac OS X on Intel) support ! - Automated building of libraries for IDE-based projects using BBv2 ! - Added <code>\<adobe/numeric.hpp\></code>, beginning similar support for <code>\<numeric\></code> as we have for <code>\<algorithm\></code> ! - Separation of the <code>adobe_widgets</code> UI library from Adobe Begin ! - For more information and more changes see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. *************** *** 102,108 **** \par June 03, 2005 - ASL 1.0.5 Released There were enough problems with the 1.0.4 release that a 1.0.5 release has been rolled. Among the changes: ! - Added adobe/test/xstr_test and adobe/test/md5, directories for testing those respective parts of ASL, which the Boost Build system was expecting ! - Added adobe/test/Jamfile.v2, without which none of the test binaries would have built via the Boost Build system ! - Much more - see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. --- 118,124 ---- \par June 03, 2005 - ASL 1.0.5 Released There were enough problems with the 1.0.4 release that a 1.0.5 release has been rolled. Among the changes: ! - Added adobe/test/xstr_test and adobe/test/md5, directories for testing those respective parts of ASL, which the Boost Build system was expecting ! - Added adobe/test/Jamfile.v2, without which none of the test binaries would have built via the Boost Build system ! - Much more - see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. *************** *** 110,119 **** \par June 02, 2005 - ASL 1.0.4 Released The Adobe Source Libraries 1.0.4 release contains a lot of bug fixes and changes: ! - We now support fully automated builds and regression tests using Boost Build version 2 project files. ! - Windows builds now fully supported. ! - Win32 Adobe Begin now has the Editor palette, allowing you to explore various aspects of the dialog you are viewing ! - Added an Adam smoke test application for command-line validity testing of Adam sheets ! - ZUID: UUID-like identifiers that do not contain personal information in them (like MAC addresses) ! - Much more - see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. --- 126,135 ---- \par June 02, 2005 - ASL 1.0.4 Released The Adobe Source Libraries 1.0.4 release contains a lot of bug fixes and changes: ! - We now support fully automated builds and regression tests using Boost Build version 2 project files. ! - Windows builds now fully supported. ! - Win32 Adobe Begin now has the Editor palette, allowing you to explore various aspects of the dialog you are viewing ! - Added an Adam smoke test application for command-line validity testing of Adam sheets ! - ZUID: UUID-like identifiers that do not contain personal information in them (like MAC addresses) ! - Much more - see the \ref asl_release_notes \par Head over to the <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a> section to grab it. *************** *** 132,138 **** \htmlonly <ul> ! <li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417"><img src="http://images.sourceforge.net/images/xml.png" border="0" alt="RSS Feed Available" width="36" height="14" style="vertical-align: middle"></a> Latest news</li> ! <li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&rss_fulltext=1"><img src="http://images.sourceforge.net/images/xml.png" border="0" alt="RSS Feed Available" width="36" height="14" style="vertical-align: middle"></a> Latest news (with full text)</li> ! <li><a href="http://sourceforge.net/export/rss2_projfiles.php?group_id=132417"><img src="http://images.sourceforge.net/images/xml.png" border="0" alt="RSS Feed Available" width="36" height="14" style="vertical-align: middle"></a> File releases</li> </ul> \endhtmlonly --- 148,154 ---- \htmlonly <ul> ! <li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417"><img src="http://images.sourceforge.net/images/xml.png" border="0" alt="RSS Feed Available" width="36" height="14" style="vertical-align: middle"></a> Latest news</li> ! <li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&rss_fulltext=1"><img src="http://images.sourceforge.net/images/xml.png" border="0" alt="RSS Feed Available" width="36" height="14" style="vertical-align: middle"></a> Latest news (with full text)</li> ! <li><a href="http://sourceforge.net/export/rss2_projfiles.php?group_id=132417"><img src="http://images.sourceforge.net/images/xml.png" border="0" alt="RSS Feed Available" width="36" height="14" style="vertical-align: middle"></a> File releases</li> </ul> \endhtmlonly *************** *** 143,149 **** \par February 25, 2005 - ASL 1.0.1 Preview Released We are happy to announce the release of the Adobe Open Source Libraries to the public. We have documentation and some tutorials available (\ref asl_home), as well as sources and binaries available for <a href="http://sourceforge.net/project/showfiles.php?group_id=132417&package_id=145420">download</a>. A good place to start is by reading the \ref asl_foreword and \ref asl_overview. - - \page opensource_news_dummy_page stub page - This stub page is included so Doxygen will include the following images: - \image html grant_munsey.jpg "Grant and his wife Sandy in 2000" */ --- 159,161 ---- Index: toc.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/structure/toc.dox,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** toc.dox 6 Jan 2006 18:35:20 -0000 1.7 --- toc.dox 3 Feb 2006 18:20:43 -0000 1.8 *************** *** 3,98 **** \if opensource_website - General ! - \ref asl_overview ! - \ref asl_foreword \endif - Language References ! - \ref adam_reference ! - \ref eve_reference ! - \ref expression_reference - \ref asl_concepts ! - \ref stldoc_Assignable ! - \ref stldoc_BackInsertionSequence ! - \ref concept_convertible_to_bool ! - \ref concept_convertible_to_function ! - \ref concept_convertible_to_range ! - \ref stldoc_DefaultConstructible ! - \ref stldoc_EqualityComparable ! - \ref stldoc_FrontInsertionSequence ! - \ref stldoc_LessThanComparable ! - \ref concept_regular_type ! - \ref stldoc_ReversibleContainer ! - \ref concept_transform_function - \ref asl_libraries ! - \ref adam_engine ! - \ref adamparser ! - \ref algorithm ! - \ref conversion ! - \ref enum_ops ! - \ref eve_engine ! - \ref eveparser ! - \ref asl_gil ! - \ref adobe_final ! - \ref forest_related ! - \ref adobe_functional ! - \ref adobe_iterator ! - \ref adobe_once ! - \ref regular_object_related ! - \ref adobe_sha ! - \ref adobe_string ! - \ref asl_thread_id ! - \ref asl_unicode ! - \ref asl_xstring ! - \ref widget_lib [Future] ! - \ref widget_reference ! \if opensource_website - \ref ui_core \endif ! - Functions ! - adobe::align_slices - Classes ! - adobe::array_t ! - adobe::array_t::back_insert_iterator ! - adobe::bad_cast ! - adobe::circular_queue ! - adobe::copy_on_write ! - adobe::counter_t ! - adobe::dancing_links ! - adobe::dictionary_t ! - adobe::empty_t ! - adobe::extents_t ! - adobe::extents_t::slice_t ! - adobe::extents_slices_t ! - adobe::line_position_t ! - adobe::md5_t ! - adobe::name_t ! - adobe::const_once_name_t ! - adobe::static_name_t ! - \ref adobe_sha ! - adobe::sha1_t ! - adobe::sha224_t ! - adobe::sha256_t ! - adobe::sha384_t ! - adobe::sha512_t ! - adobe::static_table ! - adobe::static_table_traits ! - adobe::stream_error_t ! - adobe::table_index ! - adobe::timer_t ! - adobe::value_t ! - adobe::value_t::transform ! - adobe::virtual_machine_t ! - adobe::virtual_machine_t::tracked_value_t ! - adobe::zuid_t - \ref asl_tutorials ! - General ! - \ref asl_tutorials_namespaces ! - \ref asl_tutorials_array_t ! - \ref asl_tutorials_dictionary_t ! - \ref asl_tutorials_eve ! - \ref asl_tutorials_forest ! - \ref asl_tutorials_value_t - Indices ! - <a href="annotated.html">Annotated Class List</a> ! - <a href="classes.html">Class Index</a> ! - <a href="functions.html">Member Index</a> ! - <a href="files.html">File Index</a> */ --- 3,99 ---- \if opensource_website - General ! - \ref asl_overview ! - \ref asl_foreword \endif - Language References ! - \ref adam_reference ! - \ref eve_reference ! - \ref expression_reference - \ref asl_concepts ! - \ref stldoc_Assignable ! - \ref stldoc_BackInsertionSequence ! - \ref concept_convertible_to_bool ! - \ref concept_convertible_to_function ! - \ref concept_convertible_to_range ! - \ref stldoc_DefaultConstructible ! - \ref stldoc_EqualityComparable ! - \ref stldoc_FrontInsertionSequence ! - \ref stldoc_LessThanComparable ! - \ref concept_regular_type ! - \ref stldoc_ReversibleContainer ! - \ref concept_transform_function - \ref asl_libraries ! - \ref adam_engine ! - \ref adamparser ! - \ref algorithm ! - \ref conversion ! - \ref cmath ! - \ref enum_ops ! - \ref eve_engine ! - \ref eveparser ! - \ref asl_gil ! - \ref adobe_final ! - \ref forest_related ! - \ref adobe_functional ! - \ref adobe_iterator ! - \ref adobe_once ! - \ref regular_object_related ! - \ref adobe_sha ! - \ref adobe_string ! - \ref asl_thread_id ! - \ref asl_unicode ! - \ref asl_xstring ! - \ref widget_lib [Future] ! - \ref widget_reference ! - \ref ui_core ! - Functions ! - adobe::align_slices - Classes ! - adobe::array_t ! - adobe::array_t::back_insert_iterator ! - adobe::bad_cast ! - adobe::circular_queue ! - adobe::copy_on_write ! - adobe::counter_t ! - adobe::dancing_links ! - adobe::dictionary_t ! - adobe::empty_t ! - adobe::extents_t ! - adobe::extents_t::slice_t ! - adobe::extents_slices_t ! - adobe::line_position_t ! - adobe::md5_t ! - adobe::name_t ! - adobe::const_once_name_t ! - adobe::static_name_t ! - \ref adobe_sha ! - adobe::sha1_t ! - adobe::sha224_t ! - adobe::sha256_t ! - adobe::sha384_t ! - adobe::sha512_t ! - adobe::static_table ! - adobe::static_table_traits ! - adobe::stream_error_t ! - adobe::table_index ! - adobe::timer_t ! - adobe::value_t ! - adobe::value_t::transform ! - adobe::virtual_machine_t ! - adobe::virtual_machine_t::tracked_value_t ! - adobe::zuid_t - \ref asl_tutorials ! - General ! - \ref asl_tutorials_namespaces ! - \ref asl_tutorials_array_t ! - \ref asl_tutorials_dictionary_t ! - \ref asl_tutorials_eve ! - \ref asl_tutorials_forest ! - \ref asl_tutorials_value_t - Indices ! - <a href="annotated.html">Annotated Class List</a> ! - <a href="classes.html">Class Index</a> ! - <a href="functions.html">Member Index</a> ! - <a href="files.html">File Index</a> */ Index: mainpage.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/structure/mainpage.dox,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mainpage.dox 2 Dec 2005 02:52:55 -0000 1.12 --- mainpage.dox 3 Feb 2006 18:20:42 -0000 1.13 *************** *** 20,42 **** <div align="center"> <form method=get action="http://search.yahoo.com/search"> ! <input type="hidden" name="fr" value="yscpb"/> ! <input type="hidden" name="vs" id="ysvs1" style="vertical-align: middle" value="opensource.adobe.com"/> ! <table align="center"> ! <tr> ! <td rowspan="2" valign="middle"> ! <a href="http://search.yahoo.com/"> ! <img src="http://us.i1.yimg.com/us.yimg.com/i/us/search/ysan/ysanlogo.gif" border="0" style="vertical-align: middle"/> ! </a> ! </td> ! <td> ! <input type="text" name="p" size="29"/> ! <input type="submit" value="Search"/> ! </td> ! <tr> ! <td> ! <font size="-2">Search opensource.adobe.com</font> ! </td> ! </tr> ! </table> </form> </div> --- 20,42 ---- <div align="center"> <form method=get action="http://search.yahoo.com/search"> ! <input type="hidden" name="fr" value="yscpb"/> ! <input type="hidden" name="vs" id="ysvs1" style="vertical-align: middle" value="opensource.adobe.com"/> ! <table align="center"> ! <tr> ! <td rowspan="2" valign="middle"> ! <a href="http://search.yahoo.com/"> ! <img src="http://us.i1.yimg.com/us.yimg.com/i/us/search/ysan/ysanlogo.gif" border="0" style="vertical-align: middle"/> ! </a> ! </td> ! <td> ! <input type="text" name="p" size="29"/> ! <input type="submit" value="Search"/> ! </td> ! <tr> ! <td> ! <font size="-2">Search opensource.adobe.com</font> ! </td> ! </tr> ! </table> </form> </div> |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:23
|
Update of /cvsroot/adobe-source/adobe-source/adobe/future/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future/source Modified Files: assemblage.cpp cmd_system.cpp iomanip.cpp iomanip_asl_cel.cpp iomanip_pdf.cpp iomanip_xml.cpp menu_system.cpp Added Files: modal_dialog_interface.cpp Log Message: asl 1.0.13 Index: cmd_system.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/source/cmd_system.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cmd_system.cpp 6 Jan 2006 18:35:21 -0000 1.2 --- cmd_system.cpp 3 Feb 2006 18:20:44 -0000 1.3 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 22,63 **** struct command_system_t::implementation_t { ! struct command_entry_t ! { ! typedef boost::signal<void (bool)> enable_callback_list_t; ! command_entry_t() : ! enabled_m(false) ! { } ! command_entry_t(const command_entry_t& rhs) : ! enabled_m(rhs.enabled_m) ! { } ! command_entry_t& operator = (const command_entry_t& rhs) ! { ! enabled_m = rhs.enabled_m; ! return *this; ! } ! command_proc_t proc_m; ! bool enabled_m; ! enable_callback_list_t enabled_callback_m; ! }; ! typedef std::map<adobe::name_t, command_entry_t> command_map_t; ! void insert_command(adobe::name_t name, const command_proc_t& proc); ! void remove_command(adobe::name_t name); ! void enable_command(adobe::name_t name, bool enabled); ! void do_command(adobe::name_t name); ! connection_t monitor_enabled(adobe::name_t name, const command_enabled_callback_t& callback); private: ! command_map_t command_map_m; }; --- 22,63 ---- struct command_system_t::implementation_t { ! struct command_entry_t ! { ! typedef boost::signal<void (bool)> enable_callback_list_t; ! command_entry_t() : ! enabled_m(false) ! { } ! command_entry_t(const command_entry_t& rhs) : ! enabled_m(rhs.enabled_m) ! { } ! command_entry_t& operator = (const command_entry_t& rhs) ! { ! enabled_m = rhs.enabled_m; ! return *this; ! } ! command_proc_t proc_m; ! bool enabled_m; ! enable_callback_list_t enabled_callback_m; ! }; ! typedef std::map<adobe::name_t, command_entry_t> command_map_t; ! void insert_command(adobe::name_t name, const command_proc_t& proc); ! void remove_command(adobe::name_t name); ! void enable_command(adobe::name_t name, bool enabled); ! void do_command(adobe::name_t name); ! connection_t monitor_enabled(adobe::name_t name, const command_enabled_callback_t& callback); private: ! command_map_t command_map_m; }; *************** *** 65,88 **** command_system_t::command_system_t() : ! object_m(new implementation_t()) ! { } command_system_t::~command_system_t() ! { delete object_m; } void command_system_t::insert_command(adobe::name_t name, const command_proc_t& proc) ! { object_m->insert_command(name, proc); } void command_system_t::remove_command(adobe::name_t name) ! { object_m->remove_command(name); } void command_system_t::enable_command(adobe::name_t name, bool enabled) ! { object_m->enable_command(name, enabled); } void command_system_t::do_command(adobe::name_t name) ! { object_m->do_command(name); } command_system_t::connection_t command_system_t::monitor_enabled(adobe::name_t name, const command_enabled_callback_t& callback) ! { return object_m->monitor_enabled(name, callback); } /****************************************************************************************************/ --- 65,88 ---- command_system_t::command_system_t() : ! object_m(new implementation_t()) ! { } command_system_t::~command_system_t() ! { delete object_m; } void command_system_t::insert_command(adobe::name_t name, const command_proc_t& proc) ! { object_m->insert_command(name, proc); } void command_system_t::remove_command(adobe::name_t name) ! { object_m->remove_command(name); } void command_system_t::enable_command(adobe::name_t name, bool enabled) ! { object_m->enable_command(name, enabled); } void command_system_t::do_command(adobe::name_t name) ! { object_m->do_command(name); } command_system_t::connection_t command_system_t::monitor_enabled(adobe::name_t name, const command_enabled_callback_t& callback) ! { return object_m->monitor_enabled(name, callback); } /****************************************************************************************************/ *************** *** 90,99 **** void command_system_t::implementation_t::insert_command(adobe::name_t name, const command_proc_t& proc) { ! if (command_map_m.find(name) != command_map_m.end()) ! throw std::runtime_error("A command by this name already exists"); ! command_entry_t& cmd(command_map_m[name]); ! cmd.proc_m = proc; } --- 90,99 ---- void command_system_t::implementation_t::insert_command(adobe::name_t name, const command_proc_t& proc) { ! if (command_map_m.find(name) != command_map_m.end()) ! throw std::runtime_error("A command by this name already exists"); ! command_entry_t& cmd(command_map_m[name]); ! cmd.proc_m = proc; } *************** *** 102,111 **** void command_system_t::implementation_t::remove_command(adobe::name_t name) { ! command_map_t::iterator item(command_map_m.find(name)); ! if (item == command_map_m.end()) ! throw std::runtime_error("A command by this name could not be found"); ! command_map_m.erase(item); } --- 102,111 ---- void command_system_t::implementation_t::remove_command(adobe::name_t name) { ! command_map_t::iterator item(command_map_m.find(name)); ! if (item == command_map_m.end()) ! throw std::runtime_error("A command by this name could not be found"); ! command_map_m.erase(item); } *************** *** 114,127 **** void command_system_t::implementation_t::enable_command(adobe::name_t name, bool enabled) { ! if (command_map_m.find(name) == command_map_m.end()) ! throw std::runtime_error("A command by this name could not be found"); ! command_entry_t& cmd(command_map_m[name]); ! if (cmd.enabled_m == enabled) return; ! cmd.enabled_m = enabled; ! cmd.enabled_callback_m(cmd.enabled_m); } --- 114,127 ---- void command_system_t::implementation_t::enable_command(adobe::name_t name, bool enabled) { ! if (command_map_m.find(name) == command_map_m.end()) ! throw std::runtime_error("A command by this name could not be found"); ! command_entry_t& cmd(command_map_m[name]); ! if (cmd.enabled_m == enabled) return; ! cmd.enabled_m = enabled; ! cmd.enabled_callback_m(cmd.enabled_m); } *************** *** 130,141 **** void command_system_t::implementation_t::do_command(adobe::name_t name) { ! if (command_map_m.find(name) == command_map_m.end()) ! throw std::runtime_error("A command by this name could not be found"); ! command_entry_t& cmd(command_map_m[name]); ! if (!cmd.enabled_m) return; ! cmd.proc_m(); } --- 130,141 ---- void command_system_t::implementation_t::do_command(adobe::name_t name) { ! if (command_map_m.find(name) == command_map_m.end()) ! throw std::runtime_error("A command by this name could not be found"); ! command_entry_t& cmd(command_map_m[name]); ! if (!cmd.enabled_m) return; ! cmd.proc_m(); } *************** *** 144,153 **** command_system_t::connection_t command_system_t::implementation_t::monitor_enabled(adobe::name_t name, const command_enabled_callback_t& callback) { ! if (command_map_m.find(name) == command_map_m.end()) ! throw std::runtime_error("A command by this name could not be found"); ! command_entry_t& cmd(command_map_m[name]); ! return cmd.enabled_callback_m.connect(callback); } --- 144,153 ---- command_system_t::connection_t command_system_t::implementation_t::monitor_enabled(adobe::name_t name, const command_enabled_callback_t& callback) { ! if (command_map_m.find(name) == command_map_m.end()) ! throw std::runtime_error("A command by this name could not be found"); ! command_entry_t& cmd(command_map_m[name]); ! return cmd.enabled_callback_m.connect(callback); } Index: menu_system.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/source/menu_system.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** menu_system.cpp 6 Jan 2006 18:35:21 -0000 1.2 --- menu_system.cpp 3 Feb 2006 18:20:44 -0000 1.3 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 24,45 **** /****************************************************************************************************/ ! const OSType app_creator_k ('adbe'); ! const OSType menu_system_tag_k ('mnsy'); /****************************************************************************************************/ ! #define ADOBE_DELETE_PTR_SPECIALIZATION(type, func) \ ! template<> \ ! struct delete_ptr<type> \ ! { \ ! void operator()(type x) const \ ! { if (x) func(x); } \ } /****************************************************************************************************/ ! ADOBE_DELETE_PTR_SPECIALIZATION(MenuRef, ::ReleaseMenu); ! ADOBE_DELETE_PTR_SPECIALIZATION(CFStringRef, ::CFRelease); ! ADOBE_DELETE_PTR_SPECIALIZATION(EventHandlerUPP, ::DisposeEventHandlerUPP); /****************************************************************************************************/ --- 24,45 ---- /****************************************************************************************************/ ! const OSType app_creator_k ('adbe'); ! const OSType menu_system_tag_k ('mnsy'); /****************************************************************************************************/ ! #define ADOBE_DELETE_PTR_SPECIALIZATION(type, func) \ ! template<> \ ! struct delete_ptr<type> \ ! { \ ! void operator()(type x) const \ ! { if (x) func(x); } \ } /****************************************************************************************************/ ! ADOBE_DELETE_PTR_SPECIALIZATION(MenuRef, ::ReleaseMenu); ! ADOBE_DELETE_PTR_SPECIALIZATION(CFStringRef, ::CFRelease); ! ADOBE_DELETE_PTR_SPECIALIZATION(EventHandlerUPP, ::DisposeEventHandlerUPP); /****************************************************************************************************/ *************** *** 48,122 **** { public: ! implementation_t(); ! ~implementation_t(); ! void insert_menu(adobe::name_t name); ! void insert_item(adobe::name_t parent_name, ! adobe::name_t name, ! boost::uint16_t cmd_key, ! modifier_set_t modifier_set); ! void insert_separator(adobe::name_t parent_name); ! void remove(adobe::name_t name); ! void enable_menu_item(adobe::name_t name, bool enabled, bool force = false); ! void mark_menu_item(adobe::name_t name, bool marked); ! connection_t monitor_menu_item(adobe::name_t name, const item_callback_t& callback); ! static void platform_initialization(); ! struct component_t ! { ! public: ! component_t() : ! enabled_m(false), ! command_id_m(next_menu_command()) ! { } ! component_t(const component_t& rhs) : ! name_m(rhs.name_m), ! ref_m(rhs.ref_m), ! enabled_m(rhs.enabled_m), ! //callback_set_m(rhs.callback_set_m), ! command_id_m(rhs.command_id_m) ! { } ! component_t& operator = (const component_t& rhs) ! { ! name_m = rhs.name_m; ! ref_m = rhs.ref_m; ! enabled_m = rhs.enabled_m; ! //callback_set_m = rhs.callback_set_m; ! const_cast<MenuCommand&>(command_id_m) = rhs.command_id_m; ! return *this; ! } ! adobe::name_t name_m; ! adobe::value_t ref_m; ! bool enabled_m; ! boost::signal<void ()> callback_signal_m; ! const MenuCommand command_id_m; ! private: ! ::MenuCommand next_menu_command() ! { ! static ::MenuCommand cur_cmd_m(1000000); ! return ++cur_cmd_m; ! } ! }; ! typedef std::list<component_t> component_set_t; ! typedef component_set_t::iterator component_iterator; ! adobe::auto_resource<MenuRef> old_root_m; ! adobe::auto_resource<MenuRef> root_m; ! component_set_t component_set_m; private: ! inline component_iterator find_iter(adobe::name_t name); ! component_t& find(adobe::name_t name); }; --- 48,122 ---- { public: ! implementation_t(); ! ~implementation_t(); ! void insert_menu(adobe::name_t name); ! void insert_item(adobe::name_t parent_name, ! adobe::name_t name, ! boost::uint16_t cmd_key, ! modifier_set_t modifier_set); ! void insert_separator(adobe::name_t parent_name); ! void remove(adobe::name_t name); ! void enable_menu_item(adobe::name_t name, bool enabled, bool force = false); ! void mark_menu_item(adobe::name_t name, bool marked); ! connection_t monitor_menu_item(adobe::name_t name, const item_callback_t& callback); ! static void platform_initialization(); ! struct component_t ! { ! public: ! component_t() : ! enabled_m(false), ! command_id_m(next_menu_command()) ! { } ! component_t(const component_t& rhs) : ! name_m(rhs.name_m), ! ref_m(rhs.ref_m), ! enabled_m(rhs.enabled_m), ! //callback_set_m(rhs.callback_set_m), ! command_id_m(rhs.command_id_m) ! { } ! component_t& operator = (const component_t& rhs) ! { ! name_m = rhs.name_m; ! ref_m = rhs.ref_m; ! enabled_m = rhs.enabled_m; ! //callback_set_m = rhs.callback_set_m; ! const_cast<MenuCommand&>(command_id_m) = rhs.command_id_m; ! return *this; ! } ! adobe::name_t name_m; ! adobe::value_t ref_m; ! bool enabled_m; ! boost::signal<void ()> callback_signal_m; ! const MenuCommand command_id_m; ! private: ! ::MenuCommand next_menu_command() ! { ! static ::MenuCommand cur_cmd_m(1000000); ! return ++cur_cmd_m; ! } ! }; ! typedef std::list<component_t> component_set_t; ! typedef component_set_t::iterator component_iterator; ! adobe::auto_resource<MenuRef> old_root_m; ! adobe::auto_resource<MenuRef> root_m; ! component_set_t component_set_m; private: ! inline component_iterator find_iter(adobe::name_t name); ! component_t& find(adobe::name_t name); }; *************** *** 133,154 **** std::string cfstring_to_string(CFStringRef x) { ! if (x == 0) return std::string(); ! const int pad(16); // must be at least one - seems like a good conservative size ! CFIndex max_size(::CFStringGetMaximumSizeForEncoding(::CFStringGetLength(x), ! kCFStringEncodingUTF8) + pad); ! std::vector<char> buffer(static_cast<std::size_t>(max_size)); #ifndef NDEBUG ! Boolean result = #endif ! ::CFStringGetCString(x, &buffer[0], max_size, kCFStringEncodingUTF8); #ifndef NDEBUG ! assert(result); #endif ! return std::string(&buffer[0]); } --- 133,154 ---- std::string cfstring_to_string(CFStringRef x) { ! if (x == 0) return std::string(); ! const int pad(16); // must be at least one - seems like a good conservative size ! CFIndex max_size(::CFStringGetMaximumSizeForEncoding(::CFStringGetLength(x), ! kCFStringEncodingUTF8) + pad); ! std::vector<char> buffer(static_cast<std::size_t>(max_size)); #ifndef NDEBUG ! Boolean result = #endif ! ::CFStringGetCString(x, &buffer[0], max_size, kCFStringEncodingUTF8); #ifndef NDEBUG ! assert(result); #endif ! return std::string(&buffer[0]); } *************** *** 157,166 **** adobe::auto_resource<CFStringRef> string_to_cfstring(const std::string& x) { ! adobe::auto_resource<CFStringRef> ! convertedString(::CFStringCreateWithCString( NULL, ! x.c_str(), ! kCFStringEncodingUTF8)); ! return convertedString; } --- 157,166 ---- adobe::auto_resource<CFStringRef> string_to_cfstring(const std::string& x) { ! adobe::auto_resource<CFStringRef> ! convertedString(::CFStringCreateWithCString( NULL, ! x.c_str(), ! kCFStringEncodingUTF8)); ! return convertedString; } *************** *** 170,209 **** try { ! HICommand command; ! adobe::auto_resource<MenuRef> root(::AcquireRootMenu()); ! adobe::menu_system_t::implementation_t* impl(0); ! UInt32 actual_size(0); ! ADOBE_REQUIRE_STATUS(::GetMenuItemProperty( root.get(), 0, ! adobe::app_creator_k, ! adobe::menu_system_tag_k, ! sizeof(impl), ! &actual_size, &impl)); ! assert(actual_size == sizeof(impl)); ! assert(impl); ! if( ::GetEventParameter( event, kEventParamDirectObject, ! typeHICommand, 0, sizeof( command ), 0, &command ) ) ! return eventNotHandledErr; ! adobe::menu_system_t::implementation_t::component_iterator item = ! adobe::find_if( impl->component_set_m, ! boost::bind(adobe::compare_members( ! &adobe::menu_system_t::implementation_t::component_t::command_id_m, ! std::equal_to< ::MenuCommand>()), ! command.commandID, ! _1)); ! if (item == impl->component_set_m.end()) ! return eventNotHandledErr; ! item->callback_signal_m(); ! return noErr; } catch( ... ) { ! return eventNotHandledErr; } --- 170,209 ---- try { ! HICommand command; ! adobe::auto_resource<MenuRef> root(::AcquireRootMenu()); ! adobe::menu_system_t::implementation_t* impl(0); ! UInt32 actual_size(0); ! ADOBE_REQUIRE_STATUS(::GetMenuItemProperty( root.get(), 0, ! adobe::app_creator_k, ! adobe::menu_system_tag_k, ! sizeof(impl), ! &actual_size, &impl)); ! assert(actual_size == sizeof(impl)); ! assert(impl); ! if( ::GetEventParameter( event, kEventParamDirectObject, ! typeHICommand, 0, sizeof( command ), 0, &command ) ) ! return eventNotHandledErr; ! adobe::menu_system_t::implementation_t::component_iterator item = ! adobe::find_if( impl->component_set_m, ! boost::bind(adobe::compare_members( ! &adobe::menu_system_t::implementation_t::component_t::command_id_m, ! std::equal_to< ::MenuCommand>()), ! command.commandID, ! _1)); ! if (item == impl->component_set_m.end()) ! return eventNotHandledErr; ! item->callback_signal_m(); ! return noErr; } catch( ... ) { ! return eventNotHandledErr; } *************** *** 212,218 **** ::MenuID next_menu_id() { ! static ::MenuID id(12345); ! return ++id; } --- 212,218 ---- ::MenuID next_menu_id() { ! static ::MenuID id(12345); ! return ++id; } *************** *** 228,261 **** menu_system_t::menu_system_t() : ! object_m(new implementation_t()) ! { implementation_t::platform_initialization(); } menu_system_t::~menu_system_t() ! { delete object_m; } void menu_system_t::insert_menu(adobe::name_t name) ! { object_m->insert_menu(name); } ! void menu_system_t::insert_item(adobe::name_t parent_name, ! adobe::name_t name, ! boost::uint16_t cmd_key, ! modifier_set_t modifier_set) ! { object_m->insert_item(parent_name, name, cmd_key, modifier_set); } void menu_system_t::insert_separator(adobe::name_t parent_name) ! { object_m->insert_separator(parent_name); } void menu_system_t::remove(adobe::name_t name) ! { object_m->remove(name); } void menu_system_t::enable_menu_item(adobe::name_t name, bool enabled) ! { object_m->enable_menu_item(name, enabled); } void menu_system_t::mark_menu_item(adobe::name_t name, bool marked) ! { object_m->mark_menu_item(name, marked); } ! menu_system_t::connection_t menu_system_t::monitor_menu_item( adobe::name_t name, ! const item_callback_t& callback) ! { return object_m->monitor_menu_item(name, callback); } /****************************************************************************************************/ --- 228,261 ---- menu_system_t::menu_system_t() : ! object_m(new implementation_t()) ! { implementation_t::platform_initialization(); } menu_system_t::~menu_system_t() ! { delete object_m; } void menu_system_t::insert_menu(adobe::name_t name) ! { object_m->insert_menu(name); } ! void menu_system_t::insert_item(adobe::name_t parent_name, ! adobe::name_t name, ! boost::uint16_t cmd_key, ! modifier_set_t modifier_set) ! { object_m->insert_item(parent_name, name, cmd_key, modifier_set); } void menu_system_t::insert_separator(adobe::name_t parent_name) ! { object_m->insert_separator(parent_name); } void menu_system_t::remove(adobe::name_t name) ! { object_m->remove(name); } void menu_system_t::enable_menu_item(adobe::name_t name, bool enabled) ! { object_m->enable_menu_item(name, enabled); } void menu_system_t::mark_menu_item(adobe::name_t name, bool marked) ! { object_m->mark_menu_item(name, marked); } ! menu_system_t::connection_t menu_system_t::monitor_menu_item( adobe::name_t name, ! const item_callback_t& callback) ! { return object_m->monitor_menu_item(name, callback); } /****************************************************************************************************/ *************** *** 268,290 **** menu_system_t::implementation_t::implementation_t() : ! old_root_m(::AcquireRootMenu()) { ! MenuRef new_root; ! menu_system_t::implementation_t* ptr(this); ! ADOBE_REQUIRE_STATUS(::CreateNewMenu(next_menu_id(), 0, &new_root)); ! ADOBE_REQUIRE_STATUS(::SetMenuItemProperty( new_root, 0, ! adobe::app_creator_k, ! adobe::menu_system_tag_k, ! sizeof(ptr), ! &ptr)); ! root_m.reset(new_root); ! ::SetRootMenu(new_root); ! ::InvalMenuBar(); ! ::DrawMenuBar(); } --- 268,290 ---- menu_system_t::implementation_t::implementation_t() : ! old_root_m(::AcquireRootMenu()) { ! MenuRef new_root; ! menu_system_t::implementation_t* ptr(this); ! ADOBE_REQUIRE_STATUS(::CreateNewMenu(next_menu_id(), 0, &new_root)); ! ADOBE_REQUIRE_STATUS(::SetMenuItemProperty( new_root, 0, ! adobe::app_creator_k, ! adobe::menu_system_tag_k, ! sizeof(ptr), ! &ptr)); ! root_m.reset(new_root); ! ::SetRootMenu(new_root); ! ::InvalMenuBar(); ! ::DrawMenuBar(); } *************** *** 293,300 **** menu_system_t::implementation_t::~implementation_t() { ! ::SetRootMenu(old_root_m.get()); ! ::InvalMenuBar(); ! ::DrawMenuBar(); } --- 293,300 ---- menu_system_t::implementation_t::~implementation_t() { ! ::SetRootMenu(old_root_m.get()); ! ::InvalMenuBar(); ! ::DrawMenuBar(); } *************** *** 303,316 **** void menu_system_t::implementation_t::platform_initialization() { ! static EventTypeSpec hi_event = { kEventClassCommand, kHICommandFromMenu }; ! static adobe::auto_resource<EventHandlerUPP> hi_handler( ::NewEventHandlerUPP( &::menu_command ) ); ! static bool init(false); ! if (!init) ! { ! ::InstallApplicationEventHandler( hi_handler.get(), 1, &hi_event, 0, 0 ); ! init = true; ! } } --- 303,316 ---- void menu_system_t::implementation_t::platform_initialization() { ! static EventTypeSpec hi_event = { kEventClassCommand, kHICommandFromMenu }; ! static adobe::auto_resource<EventHandlerUPP> hi_handler( ::NewEventHandlerUPP( &::menu_command ) ); ! static bool init(false); ! if (!init) ! { ! ::InstallApplicationEventHandler( hi_handler.get(), 1, &hi_event, 0, 0 ); ! init = true; ! } } *************** *** 319,325 **** inline menu_system_t::implementation_t::component_iterator menu_system_t::implementation_t::find_iter(adobe::name_t name) { ! return adobe::find_if(component_set_m, ! boost::bind(adobe::compare_members(&component_t::name_m, ! std::equal_to<adobe::name_t>()), name, _1)); } --- 319,325 ---- inline menu_system_t::implementation_t::component_iterator menu_system_t::implementation_t::find_iter(adobe::name_t name) { ! return adobe::find_if(component_set_m, ! boost::bind(adobe::compare_members(&component_t::name_m, ! std::equal_to<adobe::name_t>()), name, _1)); } *************** *** 328,336 **** menu_system_t::implementation_t::component_t& menu_system_t::implementation_t::find(adobe::name_t name) { ! component_iterator item(find_iter(name)); ! if (item == component_set_m.end()) throw std::runtime_error("Item not found."); ! return *item; } --- 328,336 ---- menu_system_t::implementation_t::component_t& menu_system_t::implementation_t::find(adobe::name_t name) { ! component_iterator item(find_iter(name)); ! if (item == component_set_m.end()) throw std::runtime_error("Item not found."); ! return *item; } *************** *** 339,396 **** void menu_system_t::implementation_t::insert_menu(adobe::name_t name) { ! MenuRef new_menu(0); ! ADOBE_REQUIRE_STATUS(::CreateNewMenu(next_menu_id(), 0, &new_menu)); ! ADOBE_REQUIRE_STATUS(::SetMenuTitleWithCFString(new_menu, string_to_cfstring(name.get()).get())); ! ::InsertMenu(new_menu, 0); ! component_set_m.push_back(component_t()); ! component_set_m.back().name_m = name; ! component_set_m.back().ref_m = adobe::value_t(new_menu); } /****************************************************************************************************/ ! void menu_system_t::implementation_t::insert_item( adobe::name_t parent_name, ! adobe::name_t name, ! boost::uint16_t cmd_key, ! modifier_set_t modifier_set) { ! component_t& parent(find(parent_name)); ! assert (parent.ref_m.type() == typeid(::MenuRef)); ! ::MenuRef parent_menu_ref(parent.ref_m.get< ::MenuRef>()); ! component_set_m.push_back(component_t()); ! component_set_m.back().name_m = name; ! UInt16 count(::CountMenuItems(parent_menu_ref) + 1); ! ADOBE_REQUIRE_STATUS(::InsertMenuItemTextWithCFString( ! parent_menu_ref, ! string_to_cfstring(name.get()).get(), ! count, ! kMenuItemAttrDisabled, ! component_set_m.back().command_id_m)); ! if (cmd_key != boost::uint16_t(0)) ! { ! ADOBE_REQUIRE_STATUS(::SetMenuItemCommandKey(parent_menu_ref, count, false, cmd_key)); ! if (modifier_set != modifier_none_k) ! { ! UInt8 os_modifier_set(kMenuNoModifiers); ! if (modifier_set & modifier_option_k) os_modifier_set |= kMenuOptionModifier; ! if (modifier_set & modifier_control_k) os_modifier_set |= kMenuControlModifier; ! if (modifier_set & modifier_shift_k) os_modifier_set |= kMenuShiftModifier; ! ADOBE_REQUIRE_STATUS(::SetMenuItemModifiers(parent_menu_ref, count, os_modifier_set)); ! } ! } } --- 339,396 ---- void menu_system_t::implementation_t::insert_menu(adobe::name_t name) { ! MenuRef new_menu(0); ! ADOBE_REQUIRE_STATUS(::CreateNewMenu(next_menu_id(), 0, &new_menu)); ! ADOBE_REQUIRE_STATUS(::SetMenuTitleWithCFString(new_menu, string_to_cfstring(name.get()).get())); ! ::InsertMenu(new_menu, 0); ! component_set_m.push_back(component_t()); ! component_set_m.back().name_m = name; ! component_set_m.back().ref_m = adobe::value_t(new_menu); } /****************************************************************************************************/ ! void menu_system_t::implementation_t::insert_item( adobe::name_t parent_name, ! adobe::name_t name, ! boost::uint16_t cmd_key, ! modifier_set_t modifier_set) { ! component_t& parent(find(parent_name)); ! assert (parent.ref_m.type() == typeid(::MenuRef)); ! ::MenuRef parent_menu_ref(parent.ref_m.get< ::MenuRef>()); ! component_set_m.push_back(component_t()); ! component_set_m.back().name_m = name; ! UInt16 count(::CountMenuItems(parent_menu_ref) + 1); ! ADOBE_REQUIRE_STATUS(::InsertMenuItemTextWithCFString( ! parent_menu_ref, ! string_to_cfstring(name.get()).get(), ! count, ! kMenuItemAttrDisabled, ! component_set_m.back().command_id_m)); ! if (cmd_key != boost::uint16_t(0)) ! { ! ADOBE_REQUIRE_STATUS(::SetMenuItemCommandKey(parent_menu_ref, count, false, cmd_key)); ! if (modifier_set != modifier_none_k) ! { ! UInt8 os_modifier_set(kMenuNoModifiers); ! if (modifier_set & modifier_option_k) os_modifier_set |= kMenuOptionModifier; ! if (modifier_set & modifier_control_k) os_modifier_set |= kMenuControlModifier; ! if (modifier_set & modifier_shift_k) os_modifier_set |= kMenuShiftModifier; ! ADOBE_REQUIRE_STATUS(::SetMenuItemModifiers(parent_menu_ref, count, os_modifier_set)); ! } ! } } *************** *** 399,414 **** void menu_system_t::implementation_t::insert_separator(adobe::name_t parent_name) { ! component_t& parent(find(parent_name)); ! assert (parent.ref_m.type() == typeid(::MenuRef)); ! ::MenuRef parent_menu_ref(parent.ref_m.get< ::MenuRef>()); ! ADOBE_REQUIRE_STATUS(::InsertMenuItemTextWithCFString( ! parent_menu_ref, ! CFSTR(""), ! 999999, ! kMenuItemAttrSeparator, ! 0)); } --- 399,414 ---- void menu_system_t::implementation_t::insert_separator(adobe::name_t parent_name) { ! component_t& parent(find(parent_name)); ! assert (parent.ref_m.type() == typeid(::MenuRef)); ! ::MenuRef parent_menu_ref(parent.ref_m.get< ::MenuRef>()); ! ADOBE_REQUIRE_STATUS(::InsertMenuItemTextWithCFString( ! parent_menu_ref, ! CFSTR(""), ! 999999, ! kMenuItemAttrSeparator, ! 0)); } *************** *** 417,434 **** void menu_system_t::implementation_t::remove(adobe::name_t name) { ! component_iterator item(find_iter(name)); ! if (item == component_set_m.end()) return; ! assert (::CountMenuItemsWithCommandID(0, item->command_id_m) > 0); ! MenuRef found_menu_ref(0); ! MenuItemIndex found_index(0); ! ADOBE_REQUIRE_STATUS(::GetIndMenuItemWithCommandID(0, item->command_id_m, 1, &found_menu_ref, &found_index)); ! ::DeleteMenuItem(found_menu_ref, found_index); ! component_set_m.erase(item); } --- 417,434 ---- void menu_system_t::implementation_t::remove(adobe::name_t name) { ! component_iterator item(find_iter(name)); ! if (item == component_set_m.end()) return; ! assert (::CountMenuItemsWithCommandID(0, item->command_id_m) > 0); ! MenuRef found_menu_ref(0); ! MenuItemIndex found_index(0); ! ADOBE_REQUIRE_STATUS(::GetIndMenuItemWithCommandID(0, item->command_id_m, 1, &found_menu_ref, &found_index)); ! ::DeleteMenuItem(found_menu_ref, found_index); ! component_set_m.erase(item); } *************** *** 437,458 **** void menu_system_t::implementation_t::enable_menu_item(adobe::name_t name, bool enabled, bool force) { ! component_t& item(find(name)); ! if (item.enabled_m == enabled && !force) return; ! item.enabled_m = enabled; ! MenuRef found_menu_ref(0); ! MenuItemIndex found_index(0); ! assert (::CountMenuItemsWithCommandID(0, item.command_id_m) > 0); ! ADOBE_REQUIRE_STATUS(::GetIndMenuItemWithCommandID(0, item.command_id_m, 1, &found_menu_ref, &found_index)); ! item.enabled_m ? ! ::EnableMenuItem(found_menu_ref, found_index) : ! ::DisableMenuItem(found_menu_ref, found_index); ! assert (IsMenuCommandEnabled(0, item.command_id_m) == item.enabled_m); } --- 437,458 ---- void menu_system_t::implementation_t::enable_menu_item(adobe::name_t name, bool enabled, bool force) { ! component_t& item(find(name)); ! if (item.enabled_m == enabled && !force) return; ! item.enabled_m = enabled; ! MenuRef found_menu_ref(0); ! MenuItemIndex found_index(0); ! assert (::CountMenuItemsWithCommandID(0, item.command_id_m) > 0); ! ADOBE_REQUIRE_STATUS(::GetIndMenuItemWithCommandID(0, item.command_id_m, 1, &found_menu_ref, &found_index)); ! item.enabled_m ? ! ::EnableMenuItem(found_menu_ref, found_index) : ! ::DisableMenuItem(found_menu_ref, found_index); ! assert (IsMenuCommandEnabled(0, item.command_id_m) == item.enabled_m); } *************** *** 461,474 **** void menu_system_t::implementation_t::mark_menu_item(adobe::name_t name, bool marked) { ! component_t& item(find(name)); ! MenuRef found_menu_ref(0); ! MenuItemIndex found_index(0); ! assert (::CountMenuItemsWithCommandID(0, item.command_id_m) > 0); ! ADOBE_REQUIRE_STATUS(::GetIndMenuItemWithCommandID(0, item.command_id_m, 1, &found_menu_ref, &found_index)); ! ::CheckMenuItem(found_menu_ref, found_index, marked); } --- 461,474 ---- void menu_system_t::implementation_t::mark_menu_item(adobe::name_t name, bool marked) { ! component_t& item(find(name)); ! MenuRef found_menu_ref(0); ! MenuItemIndex found_index(0); ! assert (::CountMenuItemsWithCommandID(0, item.command_id_m) > 0); ! ADOBE_REQUIRE_STATUS(::GetIndMenuItemWithCommandID(0, item.command_id_m, 1, &found_menu_ref, &found_index)); ! ::CheckMenuItem(found_menu_ref, found_index, marked); } *************** *** 477,483 **** menu_system_t::connection_t menu_system_t::implementation_t::monitor_menu_item(adobe::name_t name, const item_callback_t& callback) { ! component_t& item(find(name)); ! return item.callback_signal_m.connect(callback); } --- 477,483 ---- menu_system_t::connection_t menu_system_t::implementation_t::monitor_menu_item(adobe::name_t name, const item_callback_t& callback) { ! component_t& item(find(name)); ! return item.callback_signal_m.connect(callback); } Index: iomanip_asl_cel.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/source/iomanip_asl_cel.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** iomanip_asl_cel.cpp 6 Jan 2006 18:35:21 -0000 1.3 --- iomanip_asl_cel.cpp 3 Feb 2006 18:20:44 -0000 1.4 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 20,210 **** void asl_cel_format::begin_format(stream_type& os) ! { ! push_stack(os, new asl_cel_format_element(name_t("asl_cel"))); ! } /*************************************************************************************************/ void asl_cel_format::begin_bag(stream_type& os, const std::string& ident) ! { ! push_stack(os, new asl_cel_format_element(bag_name_g, ident)); ! } /*************************************************************************************************/ void asl_cel_format::begin_sequence(stream_type& os) ! { ! push_stack(os, new asl_cel_format_element(seq_name_g)); ! } /*************************************************************************************************/ void asl_cel_format::begin_atom(stream_type& os, const std::type_info& typeinfo) ! { ! push_stack(os, new asl_cel_format_element(atom_name_g, typeinfo)); ! } /*************************************************************************************************/ void asl_cel_format::stack_event(stream_type& os, bool is_push) ! { ! asl_cel_format_element* top(my_stack_top()); ! name_t self(top ? top->tag() : "ERROR"); ! name_t parent(stack_depth() >= 2 ? stack_n(1)->tag() : ""); ! name_t grandparent(stack_depth() >= 3 ? stack_n(2)->tag() : ""); ! if (is_push) ! { ! if (self == static_name_t("asl_cel")) ! { ! //os << "\n"; ! } ! else if (self == bag_name_g) ! { ! if (parent != atom_name_g) ! os << indents(depth()); ! os << "{\n"; ! up(); ! } ! else if (self == seq_name_g) ! { ! if (parent != bag_name_g) ! { ! if (parent != atom_name_g) ! os << indents(depth()); ! os << "[ "; ! } ! } ! else if (self == atom_name_g) ! { ! handle_atom(os, is_push); ! } ! } ! else ! { ! if (self == static_name_t("asl_cel")) ! { ! //os << "\n"; ! } ! else if (self == bag_name_g) ! { ! down(); ! os << indents(depth()) << "}"; ! if (parent != atom_name_g) ! { ! os << "\n"; ! } ! } ! else if (self == seq_name_g) ! { ! if (parent == bag_name_g) ! { ! os << "\n"; ! } ! else ! { ! os << "]"; ! if (parent != atom_name_g) ! { ! os << "\n"; ! } ! } ! } ! else if (self == atom_name_g) ! { ! handle_atom(os, is_push); ! } ! } ! } /*************************************************************************************************/ void asl_cel_format::handle_atom(stream_type& os, bool is_push) ! { ! asl_cel_format_element* top(my_stack_top()); ! name_t self(top ? top->tag() : "ERROR"); ! name_t parent(stack_depth() >= 2 ? stack_n(1)->tag() : ""); ! name_t grandparent(stack_depth() >= 3 ? stack_n(2)->tag() : ""); ! if (!top) ! return; ! const std::type_info& top_type(top->type()); ! if (is_push) ! { ! if (implementation::type_string(top_type)) ! { ! if (parent != seq_name_g) ! os << indents(depth()); ! if (parent == seq_name_g && grandparent == bag_name_g && my_stack_n(1)->num_out_m == 0) ! os << indents(depth()) << "@"; ! else ! os << "'"; ! } ! else if (implementation::type_name(top_type)) ! { ! if (parent == seq_name_g && grandparent == bag_name_g && my_stack_n(1)->num_out_m == 0) ! os << indents(depth()); ! else ! os << "@"; ! } ! else if (implementation::type_float(top_type)) ! { ! // For asl_cel, we want to output floating-point values in decimal-based ! // fixed-point notation (asl_cel doesn't support any other format) with ! // a very high precision for accceptable roundtrip values. ! os.setf(std::ios_base::dec, std::ios_base::basefield); ! os.setf(std::ios_base::fixed, std::ios_base::floatfield); ! os.precision(16); ! } ! // other data type format stuff goes here ! } ! else ! { ! if (parent == seq_name_g && grandparent == bag_name_g && my_stack_n(1)->num_out_m == 0) ! { } ! else ! { ! if (implementation::type_string(top_type)) ! { ! os << "'"; ! } ! else if (implementation::type_float(top_type)) ! { ! // For asl_cel, we want to output floating-point values in decimal-based ! // fixed-point notation (asl_cel doesn't support any other format) with ! // a very high precision for accceptable roundtrip values. ! os.setf(std::ios_base::dec, std::ios_base::basefield); ! os.setf(std::ios_base::fixed, std::ios_base::floatfield); ! os.precision(16); ! } ! // other data type format stuff goes here ! } ! if (parent == seq_name_g) ! { ! my_stack_n(1)->num_out_m++; ! os << " "; ! } ! else if (implementation::type_name(top_type)) ! { ! if (parent == seq_name_g && grandparent == bag_name_g && my_stack_n(1)->num_out_m == 0) ! { os << ": "; } ! else ! { /*os << " ";*/ } ! } ! else if (implementation::type_integer(top_type)) ! { /* do nothing */ } ! else ! os << "\n"; ! } } --- 20,210 ---- void asl_cel_format::begin_format(stream_type& os) ! { ! push_stack(os, new asl_cel_format_element(name_t("asl_cel"))); ! } /*************************************************************************************************/ void asl_cel_format::begin_bag(stream_type& os, const std::string& ident) ! { ! push_stack(os, new asl_cel_format_element(bag_name_g, ident)); ! } /*************************************************************************************************/ void asl_cel_format::begin_sequence(stream_type& os) ! { ! push_stack(os, new asl_cel_format_element(seq_name_g)); ! } /*************************************************************************************************/ void asl_cel_format::begin_atom(stream_type& os, const std::type_info& typeinfo) ! { ! push_stack(os, new asl_cel_format_element(atom_name_g, typeinfo)); ! } /*************************************************************************************************/ void asl_cel_format::stack_event(stream_type& os, bool is_push) ! { ! asl_cel_format_element* top(my_stack_top()); ! name_t self(top ? top->tag() : "ERROR"); ! name_t parent(stack_depth() >= 2 ? stack_n(1)->tag() : ""); ! name_t grandparent(stack_depth() >= 3 ? stack_n(2)->tag() : ""); ! if (is_push) ! { ! if (self == static_name_t("asl_cel")) ! { ! //os << "\n"; ! } ! else if (self == bag_name_g) ! { ! if (parent != atom_name_g) ! os << indents(depth()); ! os << "{\n"; ! up(); ! } ! else if (self == seq_name_g) ! { ! if (parent != bag_name_g) ! { ! if (parent != atom_name_g) ! os << indents(depth()); ! os << "[ "; ! } ! } ! else if (self == atom_name_g) ! { ! handle_atom(os, is_push); ! } ! } ! else ! { ! if (self == static_name_t("asl_cel")) ! { ! //os << "\n"; ! } ! else if (self == bag_name_g) ! { ! down(); ! os << indents(depth()) << "}"; ! if (parent != atom_name_g) ! { ! os << "\n"; ! } ! } ! else if (self == seq_name_g) ! { ! if (parent == bag_name_g) ! { ! os << "\n"; ! } ! else ! { ! os << "]"; ! if (parent != atom_name_g) ! { ! os << "\n"; ! } ! } ! } ! else if (self == atom_name_g) ! { ! handle_atom(os, is_push); ! } ! } ! } /*************************************************************************************************/ void asl_cel_format::handle_atom(stream_type& os, bool is_push) ! { ! asl_cel_format_element* top(my_stack_top()); ! name_t self(top ? top->tag() : "ERROR"); ! name_t parent(stack_depth() >= 2 ? stack_n(1)->tag() : ""); ! name_t grandparent(stack_depth() >= 3 ? stack_n(2)->tag() : ""); ! if (!top) ! return; ! const std::type_info& top_type(top->type()); ! if (is_push) ! { ! if (implementation::type_string(top_type)) ! { ! if (parent != seq_name_g) ! os << indents(depth()); ! if (parent == seq_name_g && grandparent == bag_name_g && my_stack_n(1)->num_out_m == 0) ! os << indents(depth()) << "@"; ! else ! os << "'"; ! } ! else if (implementation::type_name(top_type)) ! { ! if (parent == seq_name_g && grandparent == bag_name_g && my_stack_n(1)->num_out_m == 0) ! os << indents(depth()); ! else ! os << "@"; ! } ! else if (implementation::type_float(top_type)) ! { ! // For asl_cel, we want to output floating-point values in decimal-based ! // fixed-point notation (asl_cel doesn't support any other format) with ! // a very high precision for accceptable roundtrip values. ! os.setf(std::ios_base::dec, std::ios_base::basefield); ! os.setf(std::ios_base::fixed, std::ios_base::floatfield); ! os.precision(16); ! } ! // other data type format stuff goes here ! } ! else ! { ! if (parent == seq_name_g && grandparent == bag_name_g && my_stack_n(1)->num_out_m == 0) ! { } ! else ! { ! if (implementation::type_string(top_type)) ! { ! os << "'"; ! } ! else if (implementation::type_float(top_type)) ! { ! // For asl_cel, we want to output floating-point values in decimal-based ! // fixed-point notation (asl_cel doesn't support any other format) with ! // a very high precision for accceptable roundtrip values. ! os.setf(std::ios_base::dec, std::ios_base::basefield); ! os.setf(std::ios_base::fixed, std::ios_base::floatfield); ! os.precision(16); ! } ! // other data type format stuff goes here ! } ! if (parent == seq_name_g) ! { ! my_stack_n(1)->num_out_m++; ! os << " "; ! } ! else if (implementation::type_name(top_type)) ! { ! if (parent == seq_name_g && grandparent == bag_name_g && my_stack_n(1)->num_out_m == 0) ! { os << ": "; } ! else ! { /*os << " ";*/ } ! } ! else if (implementation::type_integer(top_type)) ! { /* do nothing */ } ! else ! os << "\n"; ! } } *************** *** 212,243 **** asl_cel_format_element* asl_cel_format::my_stack_top() ! { ! return my_stack_n(0); ! } /*************************************************************************************************/ asl_cel_format_element* asl_cel_format::my_stack_n(std::size_t n) ! { ! format_base::stack_element_type element(stack_n(n)); ! return dynamic_cast<asl_cel_format_element*>(element); ! } /*************************************************************************************************/ std::ostream& begin_asl_cel(std::ostream& os) ! { ! replace_pword<format_base, asl_cel_format>(os, format_base_idx()); ! os << begin_format; ! return os; ! } /*************************************************************************************************/ std::ostream& end_asl_cel(std::ostream& os) ! { ! os << end_format; ! return os; ! } /*************************************************************************************************/ --- 212,243 ---- asl_cel_format_element* asl_cel_format::my_stack_top() ! { ! return my_stack_n(0); ! } /*************************************************************************************************/ asl_cel_format_element* asl_cel_format::my_stack_n(std::size_t n) ! { ! format_base::stack_element_type element(stack_n(n)); ! return dynamic_cast<asl_cel_format_element*>(element); ! } /*************************************************************************************************/ std::ostream& begin_asl_cel(std::ostream& os) ! { ! replace_pword<format_base, asl_cel_format>(os, format_base_idx()); ! os << begin_format; ! return os; ! } /*************************************************************************************************/ std::ostream& end_asl_cel(std::ostream& os) ! { ! os << end_format; ! return os; ! } /*************************************************************************************************/ Index: assemblage.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/source/assemblage.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** assemblage.cpp 6 Jan 2006 18:35:21 -0000 1.4 --- assemblage.cpp 3 Feb 2006 18:20:44 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 24,43 **** assemblage_t::~assemblage_t() { ! // disconnect all our connections ! adobe::for_each(connections_m, boost::bind(&connection_t::disconnect, _1)); /* ! REVISIT (sparent) : This should be ! ! adobe::for_each_reverse(destruct_signal_m, adobe::apply()); */ ! for (destruct_signal_t::iterator last(destruct_signal_m.end()), ! first(destruct_signal_m.begin()); first != last; ) ! { ! --last; ! (*last)(); ! } } --- 24,43 ---- assemblage_t::~assemblage_t() { ! // disconnect all our connections ! adobe::for_each(connections_m, boost::bind(&connection_t::disconnect, _1)); /* ! REVISIT (sparent) : This should be ! ! adobe::for_each_reverse(destruct_signal_m, adobe::apply()); */ ! for (destruct_signal_t::iterator last(destruct_signal_m.end()), ! first(destruct_signal_m.begin()); first != last; ) ! { ! --last; ! (*last)(); ! } } *************** *** 46,52 **** assemblage_t::connection_t& assemblage_t::hold_connection(const connection_t& connection) { ! connections_m.push_front(connection); ! return *connections_m.begin(); } --- 46,52 ---- assemblage_t::connection_t& assemblage_t::hold_connection(const connection_t& connection) { ! connections_m.push_front(connection); ! return *connections_m.begin(); } *************** *** 55,59 **** void assemblage_t::signal_destruction(const destruct_slot_t& slot) { ! destruct_signal_m.push_back(slot); } --- 55,59 ---- void assemblage_t::signal_destruction(const destruct_slot_t& slot) { ! destruct_signal_m.push_back(slot); } --- NEW FILE: modal_dialog_interface.cpp --- /* Copyright 2005-2006 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #include <adobe/future/modal_dialog_interface.hpp> #include <adobe/adam_evaluate.hpp> #include <adobe/adam_parser.hpp> #include <adobe/future/widgets/headers/client_assembler.hpp> #include <adobe/future/widgets/headers/factory.hpp> #if ADOBE_PLATFORM_MAC #include <adobe/future/widgets/headers/mac/carbon_safe.hpp> #elif ADOBE_PLATFORM_WIN #define WINDOWS_LEAN_AND_MEAN 1 #include <windows.h> #include <adobe/future/widgets/headers/win32/event_dispatcher.hpp> #endif /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ std::string getline(std::istream& stream) { std::string result; result.reserve(128); while (true) { int c(stream.get()); if (c == EOF || c == '\n') { break; } else if (c == '\r') { c = stream.get(); if (c != '\n') stream.putback(c); break; } result += static_cast<char>(c); } return result; } /****************************************************************************************************/ std::string mdi_error_getline(std::istream& layout_definition, adobe::name_t, std::streampos line_start_position) { std::streampos old_pos(layout_definition.tellg()); layout_definition.clear(); layout_definition.seekg(line_start_position); std::string result(getline(layout_definition)); layout_definition.seekg(old_pos); return result; } /****************************************************************************************************/ struct mdi_implementation_t { typedef adobe::auto_ptr<eve_client::eve_client_holder> auto_view_t; adobe::dialog_result_t handle_dialog( const adobe::dictionary_t& input, const adobe::record_info_t& record, const adobe::dictionary_t& display_state, adobe::display_options_t display_options, std::istream& layout_definition, std::istream& sheet_definition); void end_dialog(adobe::name_t terminating_action); void latch_callback(adobe::name_t action, const adobe::value_t&); void monitor_result(const adobe::value_t& value); void monitor_record(const std::pair<adobe::dictionary_t, adobe::array_t>& record_info); void monitor_invariant(bool valid); adobe::sheet_t sheet_m; auto_view_t view_m; bool need_ui_m; adobe::dialog_result_t result_m; }; /****************************************************************************************************/ adobe::dialog_result_t mdi_implementation_t::handle_dialog( const adobe::dictionary_t& input, const adobe::record_info_t& record, const adobe::dictionary_t& display_state, adobe::display_options_t display_options, std::istream& layout_definition, std::istream& sheet_definition) { result_m = adobe::dialog_result_t(); // // Parse the Adam stream // adobe::parse( sheet_definition, adobe::line_position_t( "Adam sheet definition" ), adobe::bind_to_sheet( sheet_m ) ); // // Set up the sheet with initial inputs, etc. // for (adobe::dictionary_t::const_iterator first(input.begin()), last(input.end()); first != last; ++first) sheet_m.set(first->first, first->second); for (adobe::dictionary_t::const_iterator first(record.first.begin()), last(record.first.end()); first != last; ++first) sheet_m.set(first->first, first->second); if (!record.second.empty()) { std::vector<adobe::name_t> touch_set; for (adobe::array_t::const_iterator first(record.second.begin()), last(record.second.end()); first != last; ++first) touch_set.push_back(first->get<adobe::name_t>()); const adobe::name_t* touch_first(&touch_set[0]); sheet_m.touch(touch_first, touch_first + touch_set.size()); } need_ui_m = false; sheet_m.update(); // // Set up the callback functions now so the contributing mark is meaningful, then update again // sheet_m.monitor_invariant_dependent(adobe::static_name_t("result"), boost::bind(&mdi_implementation_t::monitor_invariant, boost::ref(*this), _1)); sheet_m.monitor_value(adobe::static_name_t("result"), boost::bind(&mdi_implementation_t::monitor_result, boost::ref(*this), _1)); sheet_m.monitor_contributing(adobe::static_name_t("result"), sheet_m.current_mark(), boost::bind(&mdi_implementation_t::monitor_record, boost::ref(*this), _1)); sheet_m.update(); if (display_options == dialog_never_display_s && need_ui_m) throw std::runtime_error("handle_dialog: Invalid command parameters and UI not permitted."); if ((display_options == dialog_no_display_s && need_ui_m) || display_options == dialog_display_s) { line_position_t::getline_proc_t getline_proc(new line_position_t::getline_proc_impl_t(boost::bind(&mdi_error_getline, boost::ref(layout_definition), _1, _2))); view_m.reset(eve_client::make_view( adobe::name_t( "eve definition" ), getline_proc, layout_definition, sheet_m, boost::bind(&mdi_implementation_t::latch_callback, boost::ref(*this), _1, _2), size_normal_s, default_factory ).release() ); // // Set up the view's sheet with display state values, etc. // for (adobe::dictionary_t::const_iterator first(display_state.begin()), last(display_state.end()); first != last; ++first) view_m->layout_sheet_m.set(first->first, first->second); sheet_m.update(); // // Show the GUI. // view_m->eve_m.evaluate(adobe::eve_t::evaluate_nested); view_m->show_window_m(); #... [truncated message content] |
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/tutorials In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/tutorials Modified Files: array_tutorial.dox dictionary_tutorial.dox eve_tutorial.dox forest_tutorial.dox namespaces_tutorial.dox value_tutorial.dox Log Message: asl 1.0.13 Index: value_tutorial.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/tutorials/value_tutorial.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** value_tutorial.dox 28 Feb 2005 20:51:26 -0000 1.1 --- value_tutorial.dox 3 Feb 2006 18:20:43 -0000 1.2 *************** *** 10,14 **** \par adobe::value_t is a pseudo-discriminated union. Before we can go any further we must first understand what a discriminated type is. Kevin Henney best describes discriminated types in his documentation of <a href="http://www.boost.org/doc/html/any.html#id447427">boost::any</a>: ! - <i>Discriminated types ... contain values of different types but do not attempt conversion between them, i.e. <code>5</code> is held strictly as an <code>int</code> and is not implicitly convertible either to <code>"5"</code> or to <code>5.0</code>. Their indifference to interpretation but awareness of type effectively makes them safe, generic containers of single values, with no scope for surprises from ambiguous conversions.</i> \par A discriminated union, then, is a type that can retain any one of a collection of discriminated types, but then only one at a time. In the case of adobe::value_t its storable type range is limited to any type modeling the \ref background_data_type_requirements. --- 10,14 ---- \par adobe::value_t is a pseudo-discriminated union. Before we can go any further we must first understand what a discriminated type is. Kevin Henney best describes discriminated types in his documentation of <a href="http://www.boost.org/doc/html/any.html#id447427">boost::any</a>: ! - <i>Discriminated types ... contain values of different types but do not attempt conversion between them, i.e. <code>5</code> is held strictly as an <code>int</code> and is not implicitly convertible either to <code>"5"</code> or to <code>5.0</code>. Their indifference to interpretation but awareness of type effectively makes them safe, generic containers of single values, with no scope for surprises from ambiguous conversions.</i> \par A discriminated union, then, is a type that can retain any one of a collection of discriminated types, but then only one at a time. In the case of adobe::value_t its storable type range is limited to any type modeling the \ref background_data_type_requirements. *************** *** 19,26 **** \par \code ! adobe::value_t my_int(5); ! adobe::value_t my_string(std::string("Hello, world!")); ! adobe::value_t my_whizzy_class(whizzy_class(/*...*/)); ! adobe::value_t my_some_other_regular_type(/*...*/); \endcode \par --- 19,26 ---- \par \code ! adobe::value_t my_int(5); ! adobe::value_t my_string(std::string("Hello, world!")); ! adobe::value_t my_whizzy_class(whizzy_class(/*...*/)); ! adobe::value_t my_some_other_regular_type(/*...*/); \endcode \par *************** *** 55,59 **** struct promote { ! typedef T type; // promote<T>::type is, by default, T }; \endcode --- 55,59 ---- struct promote { ! typedef T type; // promote<T>::type is, by default, T }; \endcode *************** *** 65,69 **** struct promote<int> { ! typedef double type; // promote<int>::type is now a double }; \endcode --- 65,69 ---- struct promote<int> { ! typedef double type; // promote<int>::type is now a double }; \endcode *************** *** 75,79 **** struct promote<double> { ! typedef int type; // Legal, but bad: possible data loss }; \endcode --- 75,79 ---- struct promote<double> { ! typedef int type; // Legal, but bad: possible data loss }; \endcode *************** *** 102,114 **** \par \code ! typedef std::vector<adobe::value_t> my_vector_value_type; ! my_vector_value_type my_vector_value; ! my_vector_value.push_back(adobe::value_t(5)); ! my_vector_value.push_back(adobe::value_t('A')); ! my_vector_value.push_back(adobe::value_t(std::string("hello, world!")); ! adobe::value_t my_vector_value_value(my_vector_value); \endcode --- 102,114 ---- \par \code ! typedef std::vector<adobe::value_t> my_vector_value_type; ! my_vector_value_type my_vector_value; ! my_vector_value.push_back(adobe::value_t(5)); ! my_vector_value.push_back(adobe::value_t('A')); ! my_vector_value.push_back(adobe::value_t(std::string("hello, world!")); ! adobe::value_t my_vector_value_value(my_vector_value); \endcode *************** *** 124,132 **** if (my_value.type() == typeid(std::string)) { ! // ... } else if (my_value.type() == typeid(double)) { ! // ... } \endcode --- 124,132 ---- if (my_value.type() == typeid(std::string)) { ! // ... } else if (my_value.type() == typeid(double)) { ! // ... } \endcode *************** *** 139,147 **** if (my_int_value.type() == typeid(int)) { ! // not here! } else if (my_int_value.type() == typeid(double)) { ! // you'll end up in here } \endcode --- 139,147 ---- if (my_int_value.type() == typeid(int)) { ! // not here! } else if (my_int_value.type() == typeid(double)) { ! // you'll end up in here } \endcode *************** *** 173,185 **** try { ! int x = my_value.get<int>(); } catch(const std::exception& err) { ! std::cerr << err.what() << std::endl; } catch(...) { ! std::cerr << "don't know what happened!" << std::endl; } \endcode --- 173,185 ---- try { ! int x = my_value.get<int>(); } catch(const std::exception& err) { ! std::cerr << err.what() << std::endl; } catch(...) { ! std::cerr << "don't know what happened!" << std::endl; } \endcode *************** *** 203,211 **** int main(/*...*/) { ! adobe::value_t my_value(std::string("Hello, world!"); ! std::cout << my_value << std::endl; // Prints "Hello, world!" ! return 0; } \endcode --- 203,211 ---- int main(/*...*/) { ! adobe::value_t my_value(std::string("Hello, world!"); ! std::cout << my_value << std::endl; // Prints "Hello, world!" ! return 0; } \endcode Index: forest_tutorial.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/tutorials/forest_tutorial.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** forest_tutorial.dox 28 Feb 2005 20:51:26 -0000 1.1 --- forest_tutorial.dox 3 Feb 2006 18:20:43 -0000 1.2 *************** *** 36,53 **** \par There are several types of iterators available to \c adobe::forest. They are: ! - <b><code>forest::iterator</code></b>: (also known as the fullorder iterator.) ! Visits the nodes by \<parent\>\<children\>\<children\>\<parent\>. ! Each node in the forest is visted twice. ! - <b><code>forest::preorder_iterator</code></b>: ! Visits the nodes by \<parent\>\<children\>. ! Each node in the forest is visted once. ! - <b><code>forest::postorder_iterator</code></b>: ! Visits the nodes by \<children\>\<parent\>. ! Each node in the forest is visted once. ! - <b><code>forest::child_iterator</code></b>: From any given node, \c child_iterator is ! a bidirectional iterator that walks a range of <i>siblings</i> (not the node's children) ! by "pivoting" on each node. There is a \c child_begin() and \c child_end() function to ! give you a range for the children of any node. Thus the \c child_iterator only applies ! to the first level of siblings, not to grandchildren or beyond. \par There are also \c reverse_ versions of the \c fullorder and \c child iterators, and \c const_ versions of the \c fullorder and \c child iterators. --- 36,53 ---- \par There are several types of iterators available to \c adobe::forest. They are: ! - <b><code>forest::iterator</code></b>: (also known as the fullorder iterator.) ! Visits the nodes by \<parent\>\<children\>\<children\>\<parent\>. ! Each node in the forest is visted twice. ! - <b><code>forest::preorder_iterator</code></b>: ! Visits the nodes by \<parent\>\<children\>. ! Each node in the forest is visted once. ! - <b><code>forest::postorder_iterator</code></b>: ! Visits the nodes by \<children\>\<parent\>. ! Each node in the forest is visted once. ! - <b><code>forest::child_iterator</code></b>: From any given node, \c child_iterator is ! a bidirectional iterator that walks a range of <i>siblings</i> (not the node's children) ! by "pivoting" on each node. There is a \c child_begin() and \c child_end() function to ! give you a range for the children of any node. Thus the \c child_iterator only applies ! to the first level of siblings, not to grandchildren or beyond. \par There are also \c reverse_ versions of the \c fullorder and \c child iterators, and \c const_ versions of the \c fullorder and \c child iterators. *************** *** 58,65 **** \par Consider the simple forest example above. Now let's say we wanted to insert a new node, <code>D</code>, somewhere around any given node in the tree (in this case we'll use node <code>A</code>). Given node \c A there are four distinct relationships \c D will have to \c A after insertion. The four possible relationships are: ! -# As the previous sibling to \c A. Note the iterator is pointing to \c A. ! -# As the next sibling to \c A. Note the iterator is pointing to \c forest::end(). ! -# As the first child of \c A, or the previous sibling of \c B. Note the iterator is pointing to \c B. ! -# As the last child of \c A, or the next sibling of \c C. Note the iterator is pointing to \c A. \par Observe that the last two relationships are similar to the first two. Consider this visual of the above situation: --- 58,65 ---- \par Consider the simple forest example above. Now let's say we wanted to insert a new node, <code>D</code>, somewhere around any given node in the tree (in this case we'll use node <code>A</code>). Given node \c A there are four distinct relationships \c D will have to \c A after insertion. The four possible relationships are: ! -# As the previous sibling to \c A. Note the iterator is pointing to \c A. ! -# As the next sibling to \c A. Note the iterator is pointing to \c forest::end(). ! -# As the first child of \c A, or the previous sibling of \c B. Note the iterator is pointing to \c B. ! -# As the last child of \c A, or the next sibling of \c C. Note the iterator is pointing to \c A. \par Observe that the last two relationships are similar to the first two. Consider this visual of the above situation: Index: namespaces_tutorial.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/tutorials/namespaces_tutorial.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** namespaces_tutorial.dox 3 May 2005 23:50:24 -0000 1.1 --- namespaces_tutorial.dox 3 Feb 2006 18:20:43 -0000 1.2 *************** *** 64,70 **** In specifying these guidelines the following goals were considered: ! - Any set of libraries, even those providing overlapping functionality, with different primary namespaces, should not conflict. ! - Any set of declarations with matching semantics should have matching names, including namespace. ! - The C++ standard should not be violated - rather issues with the standard should be addressed through the standard committee. Unfortunately, the first two of these goals often come into conflict. Part of the problem is the lack of function partial specialization support, however, in cases of general extensions to a library it is difficult to come up with _any_ set of rules which would satisfy the first goal. Here we have tried to provide a reasonable balance which handles most cases. --- 64,70 ---- In specifying these guidelines the following goals were considered: ! - Any set of libraries, even those providing overlapping functionality, with different primary namespaces, should not conflict. ! - Any set of declarations with matching semantics should have matching names, including namespace. ! - The C++ standard should not be violated - rather issues with the standard should be addressed through the standard committee. Unfortunately, the first two of these goals often come into conflict. Part of the problem is the lack of function partial specialization support, however, in cases of general extensions to a library it is difficult to come up with _any_ set of rules which would satisfy the first goal. Here we have tried to provide a reasonable balance which handles most cases. Index: array_tutorial.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/tutorials/array_tutorial.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** array_tutorial.dox 28 Feb 2005 20:51:26 -0000 1.1 --- array_tutorial.dox 3 Feb 2006 18:20:43 -0000 1.2 *************** *** 14,29 **** void foo(adobe::array_t param) // makes a copy of the array_t { ! std::cout << param[0].get<std::string>(); } int main(/*...*/) { ! adobe::array_t my_array; ! /* add elements of type adobe::value_t to my_array */ ! foo(my_array); ! return 0; } \endcode --- 14,29 ---- void foo(adobe::array_t param) // makes a copy of the array_t { ! std::cout << param[0].get<std::string>(); } int main(/*...*/) { ! adobe::array_t my_array; ! /* add elements of type adobe::value_t to my_array */ ! foo(my_array); ! return 0; } \endcode *************** *** 105,120 **** for (; first != last; ++first) { ! if (first->type() == typeid(std::string)) ! { ! std::cout << "Found a string: " << first->get<std::string>() << std::endl; ! } ! else if (first->type() == typeid(double)) ! { ! std::cout << "Found a number: " << first->get<double>() << std::endl; ! } ! else ! { ! std::cout << "I have no idea what we've found!" << std::endl; ! } } \endcode --- 105,120 ---- for (; first != last; ++first) { ! if (first->type() == typeid(std::string)) ! { ! std::cout << "Found a string: " << first->get<std::string>() << std::endl; ! } ! else if (first->type() == typeid(double)) ! { ! std::cout << "Found a number: " << first->get<double>() << std::endl; ! } ! else ! { ! std::cout << "I have no idea what we've found!" << std::endl; ! } } \endcode Index: eve_tutorial.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/tutorials/eve_tutorial.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** eve_tutorial.dox 17 Mar 2005 18:02:44 -0000 1.1 --- eve_tutorial.dox 3 Feb 2006 18:20:43 -0000 1.2 *************** *** 8,21 **** \par The following list of items is a good recommendation of stuff you should know before you attempt to work through this document: ! - boost::function ! - boost::bind ! - adobe::dictionary_t ! - Cursory reading of the \ref eve_engine (Engine) and \ref eveparser documentation \par For advanced implementations, the following might be of help <i>but are not required</i>: ! - adobe/future/assemblage.hpp ! - adobe/test/visual/headers/optional_connect.hpp \par ! The sample code found in the Adobe Begin implementation (especially <code>client_assembler.cpp</code>) shows a possible implementation using these techniques. Note that Adobe Begin is an experimental work in progress, and should be used loosely as an example only! \section tutorials_eve_overview Overview --- 8,21 ---- \par The following list of items is a good recommendation of stuff you should know before you attempt to work through this document: ! - boost::function ! - boost::bind ! - adobe::dictionary_t ! - Cursory reading of the \ref eve_engine (Engine) and \ref eveparser documentation \par For advanced implementations, the following might be of help <i>but are not required</i>: ! - adobe/future/assemblage.hpp ! - adobe/test/visual/headers/optional_connect.hpp \par ! The sample code found in the Adobe Begin implementation (especially <code>client_assembler.cpp</code>) shows a possible implementation using these techniques. Note that Adobe Begin is an experimental work in progress, and should be used loosely as an example only! \section tutorials_eve_overview Overview *************** *** 28,42 **** \par The easiest way to see what is happening in a design that includes Eve is to enumerate the steps involved in solving a layout: ! -# The client code specifies an Eve file for parsed, solved, and displayed. ! -# The client code creates an <code>eve_t</code> object that is the Eve Engine instance that will manage the widgets at runtime. ! -# The client code calls the Eve Parser with (among other parameters) an input stream and an assemblage callback. ! -# The Eve Parser parses the input stream, notifying the assemblage callback any time a valid widget definition is found. ! -# The assemblage callback, when it receives a hit from the Eve Parser for a valid widget, constructs a signal suite and passes it (among other parameters) to the <code>eve_t</code> instance for layout of this new widget. ! -# The assemblage receives a new marker for the new widget just created in the Eve Engine hierarchy, and passes it back to the Eve Parser for later use. ! -# When the Eve Parser is finished, the client code calls the <code>evaluate</code> with the <code>eve_t</code> instance to solve for the layout. ! -# During the course of solving the layout, the Eve Engine calls back to the client assemblage code via the signal suites passed in for every individual widget created in the Eve Engine heirarchy. ! -# Once a view solution has been computed, the final signal (place) is fired for each widget to notify the client code of the positioning of every widget. ! -# The client code goes out to the OS to create the OS-specific widgets, hierarchy, event handlers, etc. ! -# The rest of the application takes it from there: Eve's work is done. \section tutorials_eve_parser Parser --- 28,42 ---- \par The easiest way to see what is happening in a design that includes Eve is to enumerate the steps involved in solving a layout: ! -# The client code specifies an Eve file for parsed, solved, and displayed. ! -# The client code creates an <code>eve_t</code> object that is the Eve Engine instance that will manage the widgets at runtime. ! -# The client code calls the Eve Parser with (among other parameters) an input stream and an assemblage callback. ! -# The Eve Parser parses the input stream, notifying the assemblage callback any time a valid widget definition is found. ! -# The assemblage callback, when it receives a hit from the Eve Parser for a valid widget, constructs a signal suite and passes it (among other parameters) to the <code>eve_t</code> instance for layout of this new widget. ! -# The assemblage receives a new marker for the new widget just created in the Eve Engine hierarchy, and passes it back to the Eve Parser for later use. ! -# When the Eve Parser is finished, the client code calls the <code>evaluate</code> with the <code>eve_t</code> instance to solve for the layout. ! -# During the course of solving the layout, the Eve Engine calls back to the client assemblage code via the signal suites passed in for every individual widget created in the Eve Engine heirarchy. ! -# Once a view solution has been computed, the final signal (place) is fired for each widget to notify the client code of the positioning of every widget. ! -# The client code goes out to the OS to create the OS-specific widgets, hierarchy, event handlers, etc. ! -# The rest of the application takes it from there: Eve's work is done. \section tutorials_eve_parser Parser *************** *** 47,57 **** void parse_my_eve_file(const std::string& path_to_file) { ! std::ifstream stream(path_to_file.c_str()); ! adobe::line_position_t result_line(adobe::eve::parse( ! stream, ! adobe::line_position_t(path_to_file.c_str()), ! adobe::eve::position_t(), ! boost::bind(&client_assemble, _1, _3, ! boost::bind(adobe::eve::evaluate_arguments(), _4)))); } \endcode --- 47,57 ---- void parse_my_eve_file(const std::string& path_to_file) { ! std::ifstream stream(path_to_file.c_str()); ! adobe::line_position_t result_line(adobe::eve::parse( ! stream, ! adobe::line_position_t(path_to_file.c_str()), ! adobe::eve::position_t(), ! boost::bind(&client_assemble, _1, _3, ! boost::bind(adobe::eve::evaluate_arguments(), _4)))); } \endcode *************** *** 72,93 **** \par \code ! adobe::position_t client_assemble( const adobe::eve_t::position_t& parent, ! adobe::name_t widget_name, ! const adobe::dictionary_t& parameters) { ! adobe::eve_t::signal_suite_t signals; ! signals.eve_container_defaults_proc_m = widget_container_defaults(widget_name); ! signals.eve_calculate_proc_m = widget_calculate_proc(widget_name); ! signals.eve_calculate_vertical_proc_m = widget_calculate_vertical_proc(widget_name); ! signals.eve_place_proc_m = widget_place_proc(widget_name); ! return eve_g.add_view_element(parent.empty() ? ! boost::any_cast<adobe::eve::position_t>(parent) : ! adobe::eve_t::iterator(), ! adobe::eve_t::insert_element_t( ! widget_is_a_container(widget_name), ! parameters, ! signals)); } \endcode --- 72,93 ---- \par \code ! adobe::position_t client_assemble( const adobe::eve_t::position_t& parent, ! adobe::name_t widget_name, ! const adobe::dictionary_t& parameters) { ! adobe::eve_t::signal_suite_t signals; ! signals.eve_container_defaults_proc_m = widget_container_defaults(widget_name); ! signals.eve_calculate_proc_m = widget_calculate_proc(widget_name); ! signals.eve_calculate_vertical_proc_m = widget_calculate_vertical_proc(widget_name); ! signals.eve_place_proc_m = widget_place_proc(widget_name); ! return eve_g.add_view_element(parent.empty() ? ! boost::any_cast<adobe::eve::position_t>(parent) : ! adobe::eve_t::iterator(), ! adobe::eve_t::insert_element_t( ! widget_is_a_container(widget_name), ! parameters, ! signals)); } \endcode *************** *** 130,135 **** void my_push_button_calc_proc(adobe::eve_t::calculate_data_t& geometry) { ! geometry.slice_m[horizontal].length_m = 80; ! geometry.slice_m[vertical].length_m = 20; } \endcode --- 130,135 ---- void my_push_button_calc_proc(adobe::eve_t::calculate_data_t& geometry) { ! geometry.slice_m[horizontal].length_m = 80; ! geometry.slice_m[vertical].length_m = 20; } \endcode *************** *** 140,147 **** void my_push_button_calc_proc(adobe::eve_t::calculate_data_t& geometry, const adobe::dictionary_t& parameters) { ! std::string button_name(parameters[adobe::static_name_t("name")].get<std::string>()); ! geometry.slice_m[horizontal].length_m = measure_string_width(button_name); ! geometry.slice_m[vertical].length_m = 20; } \endcode --- 140,147 ---- void my_push_button_calc_proc(adobe::eve_t::calculate_data_t& geometry, const adobe::dictionary_t& parameters) { ! std::string button_name(parameters[adobe::static_name_t("name")].get<std::string>()); ! geometry.slice_m[horizontal].length_m = measure_string_width(button_name); ! geometry.slice_m[vertical].length_m = 20; } \endcode *************** *** 180,187 **** \par <code>evaluate</code> sets the engine in motion, at which point callbacks will start getting signalled. There are several passes Eve takes when solving the layout, and there are corresponding callbacks that get signalled in each one. It is important to know the order in which the callbacks are signalled for a given widget: ! - eve_container_defaults_proc_m (if the widget was specified as being a container by client_assemble) ! - eve_calculate_proc_m ! - eve_calculate_vertical_proc_m ! - eve_place_proc_m \par Each of these callbacks will return state to the Eve Engine, and will affect the parameters of subsequent callbacks to the same widget. You are guaranteed that each callback, if they are called, will be called in the order listed above for a given widget. You are not guaranteed that a callback will be called. The case in which Eve will call a callback is if it needs to. I know this sounds obvious, but there are cases when Eve will not require calling some of the callbacks. One case is in the process of resizing a dialog: all the views have already had their calculate callbacks signalled in a previous pass when the dialog was first laid out. Thus the calculate_proc will not get signalled when a dialog is resized. Neither will the container_defaults_proc. When the remaining two callbacks are called, however, you can be sure they will be signalled in the order listed above. --- 180,187 ---- \par <code>evaluate</code> sets the engine in motion, at which point callbacks will start getting signalled. There are several passes Eve takes when solving the layout, and there are corresponding callbacks that get signalled in each one. It is important to know the order in which the callbacks are signalled for a given widget: ! - eve_container_defaults_proc_m (if the widget was specified as being a container by client_assemble) ! - eve_calculate_proc_m ! - eve_calculate_vertical_proc_m ! - eve_place_proc_m \par Each of these callbacks will return state to the Eve Engine, and will affect the parameters of subsequent callbacks to the same widget. You are guaranteed that each callback, if they are called, will be called in the order listed above for a given widget. You are not guaranteed that a callback will be called. The case in which Eve will call a callback is if it needs to. I know this sounds obvious, but there are cases when Eve will not require calling some of the callbacks. One case is in the process of resizing a dialog: all the views have already had their calculate callbacks signalled in a previous pass when the dialog was first laid out. Thus the calculate_proc will not get signalled when a dialog is resized. Neither will the container_defaults_proc. When the remaining two callbacks are called, however, you can be sure they will be signalled in the order listed above. Index: dictionary_tutorial.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/tutorials/dictionary_tutorial.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dictionary_tutorial.dox 6 Jan 2006 18:35:20 -0000 1.2 --- dictionary_tutorial.dox 3 Feb 2006 18:20:43 -0000 1.3 *************** *** 14,29 **** void foo(adobe::dictionary_t param) // makes a copy of the dictionary_t { ! std::cout << param[adobe::name_t("my_key")].get<std::string>(); } int main(/*...*/) { ! adobe::dictionary_t my_dictionary; ! /* add key/value pairs to my_dictionary */ ! foo(my_dictionary); ! return 0; } \endcode --- 14,29 ---- void foo(adobe::dictionary_t param) // makes a copy of the dictionary_t { ! std::cout << param[adobe::name_t("my_key")].get<std::string>(); } int main(/*...*/) { ! adobe::dictionary_t my_dictionary; ! /* add key/value pairs to my_dictionary */ ! foo(my_dictionary); ! return 0; } \endcode *************** *** 96,111 **** for (; first != last; ++first) { ! if (first->second.type() == typeid(std::string)) ! { ! std::cout << "Found a string: " << first->second.get<std::string>() << std::endl; ! } ! else if (first->second.type() == typeid(double)) ! { ! std::cout << "Found a number: " << first->second.get<double>() << std::endl; ! } ! else ! { ! std::cout << "I have no idea what we've found!" << std::endl; ! } } \endcode --- 96,111 ---- for (; first != last; ++first) { ! if (first->second.type() == typeid(std::string)) ! { ! std::cout << "Found a string: " << first->second.get<std::string>() << std::endl; ! } ! else if (first->second.type() == typeid(double)) ! { ! std::cout << "Found a number: " << first->second.get<double>() << std::endl; ! } ! else ! { ! std::cout << "I have no idea what we've found!" << std::endl; ! } } \endcode |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:23
|
Update of /cvsroot/adobe-source/adobe-source/adobe/future/widgets/headers/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future/widgets/headers/mac Modified Files: carbon_safe.hpp metrics.hpp ui_core_implementation.hpp Added Files: metric_extractor.hpp os_utilities.hpp Log Message: asl 1.0.13 Index: carbon_safe.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/headers/mac/carbon_safe.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** carbon_safe.hpp 6 Jan 2006 18:35:21 -0000 1.4 --- carbon_safe.hpp 3 Feb 2006 18:20:44 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 20,24 **** #ifdef __MWERKS__ ! #pragma warn_implicitconv off #endif --- 20,24 ---- #ifdef __MWERKS__ ! #pragma warn_implicitconv off #endif *************** *** 26,42 **** #ifdef __MWERKS__ ! #pragma warn_implicitconv reset #endif /* ! REVISIT (sparent) : Apple insists that you include the entire Carbon/Carbon.h framework to ! use any of Carbon. This header file #defines check which conflicts with boost. The work- ! around is to undef check here. ! ! (In an unbelieveable set of circumstances, I wrote the check macro!) */ #ifdef check ! #undef check #endif --- 26,42 ---- #ifdef __MWERKS__ ! #pragma warn_implicitconv reset #endif /* ! REVISIT (sparent) : Apple insists that you include the entire Carbon/Carbon.h framework to ! use any of Carbon. This header file #defines check which conflicts with boost. The work- ! around is to undef check here. ! ! (In an unbelieveable set of circumstances, I wrote the check macro!) */ #ifdef check ! #undef check #endif *************** *** 50,95 **** { public: ! os_exception(long status, const char* file, long line) throw() ! { ! try ! { ! std::stringstream t; ! t << status; ! format(t.str().c_str(), file, line); ! } ! catch (...) ! { } ! } ! os_exception(const char* status, const char* file, long line) throw() ! { ! format(status, file, line); ! } ! os_exception(const std::string& status, const char* file, long line) throw() ! { ! format(status.c_str(), file, line); ! } ! ~os_exception() throw() {} ! const char* what () const throw() ! { return what_m.c_str(); } private: ! void format(const char* status, const char* file, long line) ! { ! try ! { ! std::stringstream t; ! t << "Error: " << status << " (" << file << ", line " << line << ")"; ! what_m.assign(t.str()); ! } ! catch (...) ! { } ! } ! std::string what_m; }; --- 50,95 ---- { public: ! os_exception(long status, const char* file, long line) throw() ! { ! try ! { ! std::stringstream t; ! t << status; ! format(t.str().c_str(), file, line); ! } ! catch (...) ! { } ! } ! os_exception(const char* status, const char* file, long line) throw() ! { ! format(status, file, line); ! } ! os_exception(const std::string& status, const char* file, long line) throw() ! { ! format(status.c_str(), file, line); ! } ! ~os_exception() throw() {} ! const char* what () const throw() ! { return what_m.c_str(); } private: ! void format(const char* status, const char* file, long line) ! { ! try ! { ! std::stringstream t; ! t << "Error: " << status << " (" << file << ", line " << line << ")"; ! what_m.assign(t.str()); ! } ! catch (...) ! { } ! } ! std::string what_m; }; *************** *** 101,120 **** // REVISIT (fbrereto) : Turn this back on when we have an interface to handle ! // errors on the callback side of the OS event loop #if 0 inline void ADOBE_REQUIRE_STATUS_impl(long status, char* file, long line) { ! if (status != 0) throw adobe::os_exception(status, file, line); } #else inline void ADOBE_REQUIRE_STATUS_impl(long status, char*, long) { ! if (status != 0) ::SysBeep(10); } #endif /*************************************************************************************************/ ! #define ADOBE_REQUIRE_STATUS(x) adobe::implementation::ADOBE_REQUIRE_STATUS_impl((x), __FILE__, __LINE__) /****************************************************************************************************/ --- 101,120 ---- // REVISIT (fbrereto) : Turn this back on when we have an interface to handle ! // errors on the callback side of the OS event loop #if 0 inline void ADOBE_REQUIRE_STATUS_impl(long status, char* file, long line) { ! if (status != 0) throw adobe::os_exception(status, file, line); } #else inline void ADOBE_REQUIRE_STATUS_impl(long status, char*, long) { ! if (status != 0) ::SysBeep(10); } #endif /*************************************************************************************************/ ! #define ADOBE_REQUIRE_STATUS(x) adobe::implementation::ADOBE_REQUIRE_STATUS_impl((x), __FILE__, __LINE__) /****************************************************************************************************/ Index: metrics.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/headers/mac/metrics.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** metrics.hpp 6 Jan 2006 18:35:21 -0000 1.4 --- metrics.hpp 3 Feb 2006 18:20:44 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 24,28 **** /****************************************************************************************************/ ! adobe::dictionary_t widget_metrics(const std::string& xstr, const adobe::dictionary_t& context); /****************************************************************************************************/ --- 24,29 ---- /****************************************************************************************************/ ! adobe::dictionary_t widget_metrics( const std::string& xstr, ! const adobe::dictionary_t& context = adobe::dictionary_t()); /****************************************************************************************************/ --- NEW FILE: metric_extractor.hpp --- /* Copyright 2005-2006 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #ifndef ADOBE_METRICS_EXTRACTOR_MAC_HPP #define ADOBE_METRICS_EXTRACTOR_MAC_HPP /****************************************************************************************************/ #include <adobe/config.hpp> #include <adobe/dictionary_fwd.hpp> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ /*! \defgroup widget_metrics_mac Mac Widget Metrics \ingroup widget_lib \section widget_metrics_mac_parameters Parameters The following is a list of metrics one can supply for a widget on the Mac. All values are in unit pixels. All values default to 0. <table width="100%" border="1"> <tr><th width="10%">Name</th><th width="30%">Structure</th><th>Notes</th></tr> <tr> <td><code>size</code></td> <td><code>[ width, height ]</code></td> <td>Base size of the widget</td> </tr> <tr> <td><code>adjust_position</code></td> <td><code>[ left, top ]</code></td> <td>Number of pixels to push the widget. Positive values move the widget away from the origin of the window.</td> </tr> <tr> <td><code>adjust_size</code></td> <td><code>[ width, height ]</code></td> <td>Adjustments made to the base size of the widget. The adjusted size is passed to the OS so the resulting widget is the base size originally intended.</td> </tr> <tr> <td><code>adjust_baseline</code></td> <td><code>value</code></td> <td>Adjustment of the baseline. Positive values move the baseline away from the origin of the window.</td> </tr> <tr> <td><code>outset</code></td> <td><code>[ left, top, right, bottom ]</code></td> <td>Amount of outset for a given edge of the widget. These amounts affect the base size and position of the widget when the bounds of the widget are set. See \ref widget_metrics_mac_pipeline_placement.</td> </tr> <tr> <td><code>frame</code></td> <td><code>[ left, top, right, bottom ]</code></td> <td>Amount of frame for a given edge of the widget.</td> </tr> <tr> <td><code>inset</code></td> <td><code>[ left, top, right, bottom ]</code></td> <td>Amount of inset for a given edge of the widget.</td> </tr> <tr> <td><code>spacing</code></td> <td><code>value</code></td> <td>If there is text in the widget, this is the spacing needed between the widget's visual element and the text for the widget. Example: <code>check_box</code> has a nonzero spacing, but <code>button</code> has a spacing of 0 (because the text overlays the visual element).</td> </tr> </table> \section widget_metrics_mac_pipelines Metrics Pipelines \subsection widget_metrics_mac_pipeline_measurement Measurement Pipeline -# All the possible text strings for the widget are measured. The largest width, height and baseline are preserved on a per-element basis (i.e., it is possible for one piece of text to contribute the max width and another to contribute the max height) -# The base height of the widget is set to <code>size.height - adjust_size.height</code> -# The base width of the widget is set to <code>size.width - adjust_size.width</code> -# If text width is nonzero then <code>text_width + spacing</code> is added to the base width of the widget -# If there is a valid text baseline value the baseline of the result is set to <code>text_baseline + adjust_baseline</code> -# The <code>outset.left</code> is added to the resultant left outset -# The <code>outset.left + outset.right</code> is <i>subtracted</i> from the resultant right outset -# The <code>outset.top</code> is added to the resultant top outset -# The <code>outset.top + outset.bottom</code> is <i>subtracted</i> from the resultant bottom outset -# Resultant frame is set from <code>frame</code> -# Resultant inset is set from <code>inset</code> -# The resultant extents is returned \subsection widget_metrics_mac_pipeline_placement Placement Pipeline -# <code>adjust_position.left - extents.outset.left</code> is added to the left position of the widget -# <code>adjust_position.top - extents.outset.top</code> is added to the top position of the widget -# The height of the widget is increased by <code>adjust_size.height + extents.outset.top + extents.outset.bottom</code> -# The width of the widget is increased by <code>adjust_size.width + extents.outset.left + extents.outset.right</code> -# The bounds of the widget are set */ /*! \ingroup widget_lib \brief Utility class to access widget metrics for the Macintosh. metric_extractor_t is a struct that allows for easy access to the metrics found in a parsed and evaluated xstr definition from the mac metrics library. See \ref widget_metrics_mac for more information on the dictionary format describing the metrics for a given widget. */ struct metric_extractor_t { /// indices used to access elements for a compound (array-based) metric enum array_index_t { /// first element index_left = 0, /// second element index_top = 1, /// third element index_right = 2, /// fourth element index_bottom = 3, /// same as index_left index_width = index_left, /// same as index_top index_height = index_top }; /// \param dictionary the dictionary containing the widget metrics. /// Internally the dictionary is stored by value. explicit metric_extractor_t(const adobe::dictionary_t& dictionary = adobe::dictionary_t()) : dictionary_m(dictionary) { } /// Obtains a singleton metric /// \param tag the name of the metric we are interested in getting /// \return the value of the metric; 0 if the metric does not exist long operator () (const name_t& tag) const { long result(0); dictionary_m.get(tag, result); return result; } /// Obtains a singleton metric from a compound (array-based) metric /// \param tag the name of the metric we are interested in getting /// \param index the index inside the compound metric to fetch /// \return the value of the metric; 0 if the metric does not exist long operator () (const name_t& tag, array_index_t index) const { adobe::array_t array_result; long result(0); dictionary_m.get(tag, array_result); array_result.get(std::size_t(index), result); return result; } /// If this extractor hasn't been setup yet then this function returns /// true, otherwise it returns false. /// \return does this extractor have metrics available. bool empty() const { return dictionary_m.empty(); } private: adobe::dictionary_t dictionary_m; }; /****************************************************************************************************/ } /****************************************************************************************************/ #endif /****************************************************************************************************/ Index: ui_core_implementation.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/headers/mac/ui_core_implementation.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ui_core_implementation.hpp 6 Jan 2006 18:35:21 -0000 1.6 --- ui_core_implementation.hpp 3 Feb 2006 18:20:44 -0000 1.7 *************** *** 1,11 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! #ifndef ADOBE_UI_CORE_IMPLEMENTATION_HPP #define ADOBE_UI_CORE_IMPLEMENTATION_HPP [...1775 lines suppressed...] /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::window_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::group_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::tab_group_t::implementation_t); *************** *** 804,808 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::unit_edit_text_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::slider_t::implementation_t); - ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::bevel_button_t::implementation_t); /****************************************************************************************************/ --- 1044,1047 ---- --- NEW FILE: os_utilities.hpp --- /* Copyright 2005-2006 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #ifndef ADOBE_UI_CORE_OS_UTILITIES_HPP #define ADOBE_UI_CORE_OS_UTILITIES_HPP /****************************************************************************************************/ #include <adobe/config.hpp> #include <adobe/istream.hpp> #include <adobe/future/memory.hpp> #include <adobe/unicode.hpp> #include "carbon_safe.hpp" #include "ui_core.hpp" #include "ui_core_common.hpp" #include "metrics.hpp" #include "metric_extractor.hpp" #include <boost/noncopyable.hpp> #include <stdexcept> /****************************************************************************************************/ inline bool operator == (const ::EventTypeSpec& x, const ::EventTypeSpec& y) { return x.eventClass == y.eventClass && x.eventKind == y.eventKind; } /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ #define ADOBE_DELETE_PTR_SPECIALIZATION(type, func) \ template<> \ struct delete_ptr<type> \ { \ void operator()(type x) const \ { if (x) func(x); } \ }; /****************************************************************************************************/ //ADOBE_DELETE_PTR_SPECIALIZATION(::CGrafPtr, ::DisposePort) //ADOBE_DELETE_PTR_SPECIALIZATION(::MouseTrackingRef, ::ReleaseMouseTrackingRegion) //ADOBE_DELETE_PTR_SPECIALIZATION(::RgnHandle, ::DisposeRgn) ADOBE_DELETE_PTR_SPECIALIZATION(::ATSUStyle, ::ATSUDisposeStyle) ADOBE_DELETE_PTR_SPECIALIZATION(::ATSUTextLayout, ::ATSUDisposeTextLayout) ADOBE_DELETE_PTR_SPECIALIZATION(::CFBundleRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::CFLocaleRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::CFMutableDictionaryRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::CFNumberFormatterRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::CFStringRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::CFURLRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::CGDataProviderRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::CGImageRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::ControlEditTextValidationUPP, ::DisposeControlEditTextValidationUPP) ADOBE_DELETE_PTR_SPECIALIZATION(::EventHandlerRef, ::RemoveEventHandler) ADOBE_DELETE_PTR_SPECIALIZATION(::EventHandlerUPP, ::DisposeEventHandlerUPP) ADOBE_DELETE_PTR_SPECIALIZATION(::EventLoopTimerRef, ::RemoveEventLoopTimer) ADOBE_DELETE_PTR_SPECIALIZATION(::Handle, ::DisposeHandle) ADOBE_DELETE_PTR_SPECIALIZATION(::WindowRef, ::ReleaseWindow) /****************************************************************************************************/ namespace implementation { /****************************************************************************************************/ extern adobe::static_name_t k_attribute_theme; extern adobe::static_name_t k_attribute_theme_large; extern adobe::static_name_t k_attribute_theme_normal; extern adobe::static_name_t k_attribute_theme_small; extern adobe::static_name_t k_attribute_theme_mini; extern adobe::static_name_t k_metric_gap; extern adobe::static_name_t k_metric_size; extern adobe::static_name_t k_metric_adjust_position; extern adobe::static_name_t k_metric_adjust_size; extern adobe::static_name_t k_metric_adjust_baseline; extern adobe::static_name_t k_metric_outset; extern adobe::static_name_t k_metric_frame; extern adobe::static_name_t k_metric_inset; extern adobe::static_name_t k_metric_spacing; /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ std::string cfstring_to_string(::CFStringRef x); /****************************************************************************************************/ inline std::string cfstring_to_string(const adobe::auto_resource< ::CFStringRef >& x) { return cfstring_to_string(x.get()); } /****************************************************************************************************/ inline adobe::auto_resource< ::CFStringRef > string_to_cfstring(const std::string& x) { adobe::auto_resource< ::CFStringRef > converted(::CFStringCreateWithCString( NULL, x.c_str(), kCFStringEncodingUTF8)); return converted; } /****************************************************************************************************/ inline adobe::auto_resource< ::CFStringRef > localize_to_cfstring(const std::string& x) { return string_to_cfstring(adobe::localize(x)); } /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ template <typename T> struct event_param_type; template <> struct event_param_type< ::UInt32 > { static const ::EventParamType value = typeUInt32; }; template <> struct event_param_type< ::HICommand > { static const ::EventParamType value = typeHICommand; }; template <> struct event_param_type< ::ControlPartCode > { static const ::EventParamType value = typeControlPartCode; }; /****************************************************************************************************/ template < ::EventParamName name, typename T> void get_event_parameter(::EventRef the_event, T& value) { ::EventParamType actual_type; ::UInt32 actual_size; ::ADOBE_REQUIRE_STATUS(::GetEventParameter( the_event, name, event_param_type<T>::value, &actual_type, sizeof(T), &actual_size, &value)); if (actual_type != event_param_type<T>::value) throw std::runtime_error("get_event_parameter differing types"); if (actual_size != sizeof(T)) throw std::runtime_error("get_event_parameter differing sizes"); } /****************************************************************************************************/ template <typename T> bool get_widget_data(::ControlRef widget, ::ControlPartCode part, ::ResType tag, T& data, bool throwing = true) { ::Size t_size(sizeof(T)); ::Size actual_size(0); ::OSStatus result(::GetControlData(widget, part, tag, t_size, &data, &actual_size)); if (!throwing) return result == noErr; ::ADOBE_REQUIRE_STATUS(result); assert(t_size == actual_size); return true; } /****************************************************************************************************/ inline unsigned long get_current_tick_time() { return ::EventTimeToTicks(::GetLastUserEventTime()); } /****************************************************************************************************/ template <typename Widget> inline boost::uint32_t get_value(const Widget& widget) { return get_value< ::ControlRef >(widget.control_m); } /****************************************************************************************************/ template <> inline boost::uint32_t get_value< ::ControlRef >(const ::ControlRef& control) { if (!control) return 0; return ::GetControl32BitValue(control); } /****************************************************************************************************/ template <typename T> void get_bounds(const T& widget, ::Rect& bounds, bool absolute = false); /****************************************************************************************************/ template <> void get_bounds< ::ControlRef >(const ::ControlRef& control, ::Rect& bounds, bool absolute); /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /// The field text is text that relates to (e.g. a popup) or is (e.g. an edit text) the value of the /// widget. This is different from the label, as the field text corresponds directly to the value this /// widget helps manage. If a widget has no field text (e.g. a checkbox) this function is undefined. template <typename T> std::string get_field_text(T&); /****************************************************************************************************/ template <> std::string get_field_text< ::ControlRef >(::ControlRef& control); /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ std::string get_name(const ::ControlRef& control); /****************************************************************************************************/ std::string get_name(const ::WindowRef& window); /****************************************************************************************************/ /// The name is text that decorates the widget, but is not related to the value of the /// widget itself. For widgets that have no extra-text decorations, this function is undefined. /// Note that a static text widget is a name by definition. template <typename Widget> std::string get_name(const Widget& widget) { return get_name(widget.control_m); } /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ inline ::ATSUFontID get_atsui_font_id(const char* font_name, std::size_t name_length) { ::ATSUFontID atsui_font_id; ::ADOBE_REQUIRE_STATUS(::ATSUFindFontFromName( font_name, name_length, static_cast<unsigned long>(kFontNoName), kFontNoPlatformCode, kFontNoScriptCode, kFontNoLanguageCode, &atsui_font_id)); return atsui_font_id; } /****************************************************************************************************/ inline ::ATSUFontID get_atsui_font_id(const char* font_name) { return get_atsui_font_id(font_name, std::strlen(font_name)); } /****************************************************************************************************/ ::FMFontFamily get_classic_font_id(const char* font_name, std::size_t name_length); /****************************************************************************************************/ inline ::FMFontFamily get_classic_font_id(const char* font_name) { return get_classic_font_id(font_name, std::strlen(font_name)); } /****************************************************************************************************/ inline ::FMFontFamily get_classic_font_id(Str255 font_name) { const char* first(reinterpret_cast<char*>(&font_name[1])); const char* last(first + font_name[0]); std::string font_name_c(first, last); return get_classic_font_id(font_name_c.c_str(), font_name_c.size()); } /****************************************************************************************************/ inline ::ThemeFontID theme_to_ThemeFontID(const adobe::theme_t& style) { adobe::theme_t masked(style & adobe::theme_mask_s); ::ThemeFontID font_id(kThemeSystemFont); switch (masked) { case adobe::theme_mini_s: font_id = kThemeMiniSystemFont; break; case adobe::theme_small_s: font_id = kThemeSmallSystemFont; break; case adobe::theme_large_s: case adobe::theme_normal_s: default: font_id = kThemeSystemFont; break; } return font_id; } /****************************************************************************************************/ template <typename T> void atsu_set_attribute(::ATSUStyle style, ::ATSUAttributeTag tag, T value) { ::ByteCount size = sizeof(value); ::ATSUAttributeValuePtr ptr = &value; ADOBE_REQUIRE_STATUS(::ATSUSetAttributes(style, 1, &tag, &size, &ptr)); } /****************************************************************************************************/ adobe::extents_t get_text_dimensions(const std::string& text, adobe::theme_t theme); /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ void theme_to_rec(const adobe::theme_t& style, ControlFontStyleRec& style_rec); /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ template <typename T> bool set_widget_data(::ControlRef widget, ::ControlPartCode part, ::ResType tag, const T& data, bool throwing = true) { ::OSStatus result(::SetControlData(widget, part, tag, sizeof(T), &data)); if (!throwing) return result == noErr; ::ADOBE_REQUIRE_STATUS(result); return true; } /****************************************************************************************************/ void set_popup_with_text(ControlRef control, const std::string& text, unsigned long cur_time); /****************************************************************************************************/ /// selects the text within a widget from [ start_pos, end_pos ] (note: inclusive end!) template <typename T> void set_selection(T& control, std::size_t start_pos, std::size_t end_pos); /****************************************************************************************************/ template <> inline void set_selection< ::TXNObject >( ::TXNObject& control, std::size_t start_pos, std::size_t end_pos) { ::ADOBE_REQUIRE_STATUS(::TXNSetSelection(control, start_pos, end_pos)); } /****************************************************************************************************/ template <typename Widget> void set_focus(Widget& widget, bool make_focused) { set_focus< ::ControlRef >(widget.control_m, make_focused); } /****************************************************************************************************/ template <> void set_focus< ::ControlRef >(::ControlRef& control, bool make_focused); /****************************************************************************************************/ template <typename T> void set_refresh(T& widget); /****************************************************************************************************/ template <> inline void set_refresh< ::ControlRef >(::ControlRef& control) { assert(control); ADOBE_REQUIRE_STATUS(::HIViewSetNeedsDisplay(control, true)); } /****************************************************************************************************/ void set_bounds(::ControlRef control, const ::Rect& new_bounds); /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ template <typename Widget> inline const std::string& widget_tag(const Widget&) { static const std::string value_s("<xstr id='metric_unknown'/>{ }</xstr>"); return value_s; } template <typename Widget> inline adobe::dictionary_t extra_widget_context(const Widget&) { return adobe::dictionary_t(); } #define ADOBE_WIDGET_TAG_BOILERPLATE(widgettype, static_tag) \ namespace implementation { \ template <> inline const std::string& widget_tag< widgettype >(const widgettype&) \ { static const std::string value_s(static_tag); return value_s; } \ } // namespace implementation /****************************************************************************************************/ inline adobe::dictionary_t dictionary_union(const adobe::dictionary_t& src1, const adobe::dictionary_t& src2) { if (src1.empty()) return src2; else if (src2.empty()) return src1; adobe::dictionary_t dst; adobe::set_union(src1, src2, dst.inserter(), adobe::compare_members(&adobe::dictionary_t::value_type::first)); return dst; } /****************************************************************************************************/ template <typename Widget> void set_metric_extractor(Widget& w) { // REVISIT (fbrereto) : If metrics can be changed at runtime for this // widget specifically this shortcut will have to go. if (!w.metrics_m.empty()) return; adobe::static_name_t attribute_theme_value("unknown"); adobe::dictionary_t context; switch (w.theme_m & adobe::theme_mask_s) { case adobe::theme_large_s: attribute_theme_value = k_attribute_theme_large; break; case adobe::theme_normal_s: attribute_theme_value = k_attribute_theme_normal; break; case adobe::theme_small_s: attribute_theme_value = k_attribute_theme_small; break; case adobe::theme_mini_s: attribute_theme_value = k_attribute_theme_mini; break; default: break; } adobe::dictionary_t::write_reference context_write(context.write()); context_write[k_attribute_theme] = adobe::value_t(attribute_theme_value); w.metrics_m = adobe::metric_extractor_t(widget_metrics(widget_tag(w), dictionary_union(extra_widget_context(w), context))); } /****************************************************************************************************/ template <typename Widget> void shed_fudges(const Widget& control, adobe::point_2d_t& position, adobe::extents_t& extents) { extents.height() += control.metrics_m(k_metric_adjust_size, adobe::metric_extractor_t::index_height); extents.width() += control.metrics_m(k_metric_adjust_size, adobe::metric_extractor_t::index_width); long fudge_left(control.metrics_m(k_metric_adjust_position, adobe::metric_extractor_t::index_left)); long fudge_top(control.metrics_m(k_metric_adjust_position, adobe::metric_extractor_t::index_top)); position.x_m += fudge_left; position.y_m += fudge_top; /* NOTE (fbrereto) : All Eve containers need to expand themselves to compensate for the the case when their children have outsets. If this does not happen, you will see visual clipping of the children's visual outset artifacts. */ float left_shift(fudge_left - extents.horizontal().outset_m.first); float top_shift(fudge_top - extents.vertical().outset_m.first); ADOBE_REQUIRE_STATUS(::HIViewSetBoundsOrigin(control.control_m, left_shift, top_shift)); } /****************************************************************************************************/ template <typename Widget> adobe::extents_t apply_fudges(Widget& w, const adobe::extents_t& dimensions) { adobe::extents_t result(dimensions); set_metric_extractor(w); result.height() -= w.metrics_m(k_metric_adjust_size, adobe::metric_extractor_t::index_height); result.width() -= w.metrics_m(k_metric_adjust_size, adobe::metric_extractor_t::index_width); // frame inset and outsets are directly transcribed result.horizontal().outset_m.first += w.metrics_m(k_metric_outset, adobe::metric_extractor_t::index_left); result.horizontal().outset_m.second += w.metrics_m(k_metric_outset, adobe::metric_extractor_t::index_right); result.vertical().outset_m.first += w.metrics_m(k_metric_outset, adobe::metric_extractor_t::index_top); result.vertical().outset_m.second += w.metrics_m(k_metric_outset, adobe::metric_extractor_t::index_bottom); result.horizontal().frame_m.first += w.metrics_m(k_metric_frame, adobe::metric_extractor_t::index_left); result.horizontal().frame_m.second += w.metrics_m(k_metric_frame, adobe::metric_extractor_t::index_right); result.vertical().frame_m.first += w.metrics_m(k_metric_frame, adobe::metric_extractor_t::index_top); result.vertical().frame_m.second += w.metrics_m(k_metric_frame, adobe::metric_extractor_t::index_bottom); result.horizontal().inset_m.first += w.metrics_m(k_metric_inset, adobe::metric_extractor_t::index_left); result.horizontal().inset_m.second += w.metrics_m(k_metric_inset, adobe::metric_extractor_t::index_right); result.vertical().inset_m.first += w.metrics_m(k_metric_inset, adobe::metric_extractor_t::index_top); result.vertical().inset_m.second += w.metrics_m(k_metric_inset, adobe::metric_extractor_t::index_bottom); if (!result.vertical().poi_m.empty()) { // REVISIT (fbrereto) It will not always be safe to assume the first vertical poi is the baseline. result.vertical().poi_m[0] += w.metrics_m(adobe::implementation::k_metric_adjust_baseline); } return result; } /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ adobe::extents_t measure(::ControlRef& control); /****************************************************************************************************/ template <typename Widget> adobe::extents_t measure(Widget& widget) { return apply_fudges(widget, measure(widget.control_m)); } /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ template <typename Widget> void set_bounds(Widget& widget, const point_2d_t& pos, const extents_t& ext) { assert(widget.control_m); point_2d_t position(pos); extents_t extents(ext); implementation::shed_fudges(widget, position, extents); ::Rect new_bounds = { static_cast<short>(position.y_m), static_cast<short>(position.x_m), static_cast<short>(position.y_m + extents.height()), static_cast<short>(position.x_m + extents.width()) }; set_bounds(widget.control_m, new_bounds); } /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ inline void set_name(::ControlRef& control, const std::string& name) { assert(control); ADOBE_REQUIRE_STATUS(::SetControlTitleWithCFString(control, localize_to_cfstring(name).get())); } /****************************************************************************************************/ /// See comment in adobe::implementation::get_name about the differences between names and field texts template <typename Widget> void set_name(Widget& widget, const std::string& name) { set_name(widget.control_m, name); } /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /// See comment in adobe::implementation::get_field_text about the differences between names and field texts template <typename T> void set_field_text(T&, const std::string& name); /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ template <typename Widget> void set_theme(Widget& widget, adobe::theme_t theme) { assert(widget.control_m); widget.theme_m = theme; set_theme(widget.control_m, theme); } /****************************************************************************************************/ template <> void set_theme< ::ControlRef >(::ControlRef& control, adobe::theme_t theme); /****************************************************************************************************/ template <> void set_theme< ::TXNObject >(::TXNObject& hitextview, adobe::theme_t theme); /****************************************************************************************************/ template <typename Widget> void adorn_theme(Widget& widget, theme_t theme) { theme_t current(widget.theme_m); // wipe base from current if new base specified if (theme & theme_mask_s) current &= ~theme_mask_s; current |= theme; // logical OR the two themes together set_theme(widget, current); } /****************************************************************************************************/ template <typename Widget> void unadorn_theme(Widget& widget, theme_t theme) { theme_t current(widget.theme_m); current &= ~theme; // If no base is specified now, default to normal if (!(current & theme_mask_s)) current |= theme_normal_s; set_theme(widget, current); } /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ template <typename T> void set_active(T&, bool make_active); /****************************************************************************************************/ template <> void set_active< ::ControlRef >(::ControlRef& control, bool make_active); /****************************************************************************************************/ template <typename T> void set_visible(T&, bool make_visible); /****************************************************************************************************/ template <> inline void set_visible< ::ControlRef >(::ControlRef& control, bool make_visible) { assert(control); ADOBE_REQUIRE_STATUS(::HIViewSetVisible(control, make_visible)); } /****************************************************************************************************/ template <typename T> void set_focused(T&, bool make_focused); /****************************************************************************************************/ template <> inline void set_focused< ::ControlRef >(::ControlRef& control, bool make_focused) { assert(control); set_focus(control, make_focused); } /****************************************************************************************************/ // REVISIT (fbrereto) is_focused needs to go away -- use a cached result of signal_focus instead template <typename T> bool is_focused(T&); /****************************************************************************************************/ template <> inline bool is_focused< ::ControlRef >(::ControlRef& control) { assert(control); ::ControlRef cur_focus; ADOBE_REQUIRE_STATUS(::GetKeyboardFocus(::GetControlOwner(control), &cur_focus)); return cur_focus == control; } /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ std::string convert_utf(::UniChar* buffer, std::size_t size); /****************************************************************************************************/ std::string convert_utf(UniChar* buffer); /****************************************************************************************************/ adobe::modifiers_t convert_modifiers(::UInt32 os_modifiers); /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ template <typename Target> ::EventTargetRef get_event_target(Target target); template <> inline ::EventTargetRef get_event_target< ::WindowRef >(::WindowRef target) { return ::GetWindowEventTarget(target); } template <> inline ::EventTargetRef get_event_target< ::ControlRef >(::ControlRef target) { return ::GetControlEventTarget(target); } #if 0 template <> inline ::EventTargetRef get_event_target< ::MenuRef >(::MenuRef target) { return ::GetMenuEventTarget(target); } #endif /****************************************************************************************************/ template <typename UserDataType> struct event_handler : boost::noncopyable { typedef UserDataType user_data_type; typedef typename adobe::auto_resource< ::EventHandlerRef > auto_ref_t; typedef typename adobe::auto_resource< ::EventHandlerUPP > auto_upp_t; typedef typename std::vector< ::EventTypeSpec > event_type_set_t; event_handler() : upp_m(::NewEventHandlerUPP(do_handle)), installed_m(false) { } virtual ~event_handler() { } void set_user_data(const user_data_type& data) { user_data_m = data; } template <typename Target> void install(Target& target) { if (is_installed()) return; if (event_type_set_m.empty()) throw std::runtime_error("No events specified for handler"); ::EventHandlerRef handler_ref(0); ::ADOBE_REQUIRE_STATUS(::InstallEventHandler( get_event_target(target), upp_m.get(), event_type_set_m.size(), &event_type_set_m[0], this, &handler_ref)); ref_m.reset(handler_ref); installed_m = true; } void uninstall() { if (!is_installed()) return; ref_m.reset(0); upp_m.reset(0); installed_m = false; } bool is_installed() const { return installed_m; } void insert_event(::UInt32 event_class, ::UInt32 event_kind) { ::EventTypeSpec event = { event_class, event_kind }; event_type_set_t::iterator pos(std::find(event_type_set_m.begin(), event_type_set_m.end(), event)); if (pos == event_type_set_m.end()) { event_type_set_m.push_back(event); if (is_installed()) ::ADOBE_REQUIRE_STATUS(::AddEventTypesToHandler( ref_m.get(), 1, &event)); } } void erase_event(::UInt32 event_class, ::UInt32 event_kind) { ::EventTypeSpec event = { event_class, event_kind }; event_type_set_t::iterator pos(adobe::find(event_type_set_m, event)); if (pos != event_type_set_m.end()) { event_type_set_m.erase(pos); if (is_installed()) ::ADOBE_REQUIRE_STATUS(::RemoveEventTypesFromHandler( ref_m.get(), 1, &event)); } } static pascal ::OSStatus do_handle( ::EventHandlerCallRef call_ref, ::EventRef event, void* data) try { event_handler<user_data_type>& myself(*reinterpret_cast<event_handler<user_data_type>*>(data)); return myself.handle_event(call_ref, event); } catch (const adobe::stream_error_t& err) { adobe::report_ui_element_error(adobe::format_stream_error(err)); return eventNotHandledErr; } catch (const std::exception& err) { adobe::report_ui_element_error(std::string("Exception: ") + err.what()); return eventNotHandledErr; } catch (...) { adobe::report_ui_element_error("Exception: Unknown"); return eventNotHandledErr; } virtual ::OSStatus handle_event( ::EventHandlerCallRef next, ::EventRef event) = 0; user_data_type user_data_m; private: auto_ref_t ref_m; auto_upp_t upp_m; event_type_set_t event_type_set_m; bool installed_m; }; /****************************************************************************************************/ } // namespace implementation /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:22
|
Update of /cvsroot/adobe-source/adobe-source/adobe/future/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/future/widgets Modified Files: Jamfile.v2 Log Message: asl 1.0.13 Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/future/widgets/Jamfile.v2,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Jamfile.v2 6 Jan 2006 18:35:21 -0000 1.6 --- Jamfile.v2 3 Feb 2006 18:20:44 -0000 1.7 *************** *** 12,17 **** COMMON_SOURCES = client_assembler - ui_core ui_core_common ; --- 12,17 ---- COMMON_SOURCES = client_assembler ui_core_common + ui_core ; *************** *** 22,25 **** --- 22,26 ---- display ui_overlay + ui_core_implementation ; *************** *** 39,43 **** # Directory name for Windows specific sources and headers # ! PLATFORM_DIRECTORIES_NAME = win ; --- 40,44 ---- # Directory name for Windows specific sources and headers # ! PLATFORM_DIRECTORIES_NAME = win32 ; *************** *** 83,87 **** # Additional sources that only exist for MacOS # ! PLATFORM_SOURCES = metrics ; # --- 84,90 ---- # Additional sources that only exist for MacOS # ! PLATFORM_SOURCES = ! metrics ! ; # *************** *** 127,135 **** lib adobe_widgets : ! [ obj ui_core_implementation ! : $(SOURCE_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME)/ui_core_implementation.cpp ! : $(PLATFORM_SETTINGS) ! $(INCLUDE) ! <toolset>darwin:<cxxflags>"-Wno-deprecated-declarations" ] $(SOURCE_DIRECTORY)/$(COMMON_SOURCES).cpp --- 130,138 ---- lib adobe_widgets : ! [ obj os_utilities ! : $(SOURCE_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME)/os_utilities.cpp ! : $(PLATFORM_SETTINGS) ! $(INCLUDE) ! <toolset>darwin:<cxxflags>"-Wno-deprecated-declarations" ] $(SOURCE_DIRECTORY)/$(COMMON_SOURCES).cpp |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:22
|
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/widget_lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/widget_lib Modified Files: widget_reference.dox Log Message: asl 1.0.13 Index: widget_reference.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/widget_lib/widget_reference.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** widget_reference.dox 3 May 2005 23:50:24 -0000 1.1 --- widget_reference.dox 3 Feb 2006 18:20:43 -0000 1.2 *************** *** 13,49 **** \section wr_toc Table of Contents ! -# \ref wr_overview ! -# \ref wr_views_reference ! -# \ref wr_view_common_attributes ! -# \ref wr_view_classes ! -# bevel_button ! -# \ref wr_bevel_button "button_beveled" ! -# \ref wr_bevel_button "checkbox_beveled" ! -# \ref wr_bevel_button "radio_button_beveled" [...1653 lines suppressed...] ! <tr> ! <td><code>items[]</code></td> ! <td><code>dictionary</code></td> ! <td><i>required</i></td> ! <td>tab specification</td> ! </tr> ! <tr> ! <td><code>items[].name</code></td> ! <td><code>string</code></td> ! <td><i>required</i></td> ! <td>name of the tab</td> ! </tr> ! <tr> ! <td><code>items[].value</code></td> ! <td><i>any</i></td> ! <td><i>n/a</i></td> ! <td>value of the tab</td> ! </tr> </table> */ |
Update of /cvsroot/adobe-source/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe Modified Files: Jamfile.v2 adam.hpp adam_evaluate.hpp adam_parser.hpp algorithm.hpp array.hpp array_fwd.hpp circular_queue.hpp cmath.hpp config.hpp conversion.hpp copy_on_write.hpp counter.hpp dancing_links.hpp dictionary.hpp dictionary_fwd.hpp empty.hpp eve.hpp eve_evaluate.hpp eve_parser.hpp extents.hpp final.hpp forest.hpp functional.hpp istream.hpp istream_fwd.hpp iterator.hpp md5.hpp mismatch.hpp name.hpp name_fwd.hpp numeric.hpp once.hpp regular_object.hpp sha.hpp static_table.hpp string.hpp table_index.hpp thread_id.hpp typeinfo.hpp unicode.hpp value.hpp value_fwd.hpp virtual_machine.hpp xstring.hpp zuid.hpp Added Files: basic_sheet.hpp Log Message: asl 1.0.13 Index: copy_on_write.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/copy_on_write.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** copy_on_write.hpp 6 Jan 2006 18:35:02 -0000 1.7 --- copy_on_write.hpp 3 Feb 2006 18:20:41 -0000 1.8 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 32,88 **** { public: ! typedef T value_type; ! ! explicit copy_on_write(const value_type& x = value_type()) : ! object_m(new implementation_t(x)) ! { } ! copy_on_write(const copy_on_write& x) : ! object_m(x.object_m) ! { ! object_m->ref_count_m.increment(); ! } ! ~copy_on_write() ! { ! if (object_m->ref_count_m.decrement()) delete object_m; ! } ! copy_on_write& operator = (const copy_on_write& x) ! { ! x.object_m->ref_count_m.increment(); ! if (object_m->ref_count_m.decrement()) delete object_m; ! object_m = x.object_m; ! return *this; ! } ! value_type& write() ! { ! if (!object_m->ref_count_m.is_one()) ! { ! implementation_t* temp = new implementation_t(object_m->value_m); ! object_m->ref_count_m.decrement(); ! object_m = temp; ! } ! return object_m->value_m; ! } ! ! operator const value_type& () const ! { return object_m->value_m; } ! const value_type& operator*() const { return object_m->value_m; } ! const value_type* operator->() const { return &object_m->value_m; } ! bool unique_instance() const { return object_m->ref_count_m.is_one(); } ! bool identity(const copy_on_write<T>& x) const { return object_m == x.object_m; } ! private: ! friend inline void swap(copy_on_write& x, copy_on_write& y) ! { adobe::adl_swap(x.object_m, y.object_m); } #if !defined(ADOBE_NO_DOCUMENTATION) ! struct implementation_t; ! implementation_t* object_m; #endif }; --- 32,88 ---- { public: ! typedef T value_type; ! ! explicit copy_on_write(const value_type& x = value_type()) : ! object_m(new implementation_t(x)) ! { } ! copy_on_write(const copy_on_write& x) : ! object_m(x.object_m) ! { ! object_m->ref_count_m.increment(); ! } ! ~copy_on_write() ! { ! if (object_m->ref_count_m.decrement()) delete object_m; ! } ! copy_on_write& operator = (const copy_on_write& x) ! { ! x.object_m->ref_count_m.increment(); ! if (object_m->ref_count_m.decrement()) delete object_m; ! object_m = x.object_m; ! return *this; ! } ! value_type& write() ! { ! if (!object_m->ref_count_m.is_one()) ! { ! implementation_t* temp = new implementation_t(object_m->value_m); ! object_m->ref_count_m.decrement(); ! object_m = temp; ! } ! return object_m->value_m; ! } ! ! operator const value_type& () const ! { return object_m->value_m; } ! const value_type& operator*() const { return object_m->value_m; } ! const value_type* operator->() const { return &object_m->value_m; } ! bool unique_instance() const { return object_m->ref_count_m.is_one(); } ! bool identity(const copy_on_write<T>& x) const { return object_m == x.object_m; } ! private: ! friend inline void swap(copy_on_write& x, copy_on_write& y) ! { adobe::adl_swap(x.object_m, y.object_m); } #if !defined(ADOBE_NO_DOCUMENTATION) ! struct implementation_t; ! implementation_t* object_m; #endif }; *************** *** 93,101 **** /* ! NOTE (sparent) : We cannot use boost::totaly_ordered to implement these operations portably ! (although it works with most compilers, it doesn't with CW 9.6). The problem is that ! we do not know if T satifies the requirments for totally ordered or not - copy_on_write is ! only totally ordered if T is. By splitting the operations out to seperate template functions ! they are only instantiated if and where they are used. */ --- 93,101 ---- /* ! NOTE (sparent) : We cannot use boost::totaly_ordered to implement these operations portably ! (although it works with most compilers, it doesn't with CW 9.6). The problem is that ! we do not know if T satifies the requirments for totally ordered or not - copy_on_write is ! only totally ordered if T is. By splitting the operations out to seperate template functions ! they are only instantiated if and where they are used. */ *************** *** 129,136 **** struct copy_on_write<T>::implementation_t : private boost::noncopyable { ! implementation_t(const value_type& x) : value_m(x) { } ! value_type value_m; ! adobe::counter_t ref_count_m; }; --- 129,136 ---- struct copy_on_write<T>::implementation_t : private boost::noncopyable { ! implementation_t(const value_type& x) : value_m(x) { } ! value_type value_m; ! adobe::counter_t ref_count_m; }; Index: thread_id.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/thread_id.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thread_id.hpp 6 Jan 2006 18:35:02 -0000 1.3 --- thread_id.hpp 3 Feb 2006 18:20:41 -0000 1.4 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated and others ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated and others ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ Index: dictionary.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/dictionary.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dictionary.hpp 6 Jan 2006 18:35:02 -0000 1.5 --- dictionary.hpp 3 Feb 2006 18:20:41 -0000 1.6 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 32,57 **** namespace adobe { ! /*************************************************************************************************/ class dictionary_t::write_reference ! { ! public: ! value_t& operator[] (name_t key); ! protected: ! friend class dictionary_t; ! ! write_reference(dictionary_t& x) : ! fDictionary(x) ! { } ! private: ! dictionary_t& fDictionary; ! }; /*************************************************************************************************/ ! inline dictionary_t::write_reference dictionary_t::write() ! { return write_reference(*this); } ! /*************************************************************************************************/ --- 32,57 ---- namespace adobe { ! /*************************************************************************************************/ class dictionary_t::write_reference ! { ! public: ! value_t& operator[] (name_t key); ! protected: ! friend class dictionary_t; ! ! write_reference(dictionary_t& x) : ! fDictionary(x) ! { } ! private: ! dictionary_t& fDictionary; ! }; /*************************************************************************************************/ ! inline dictionary_t::write_reference dictionary_t::write() ! { return write_reference(*this); } ! /*************************************************************************************************/ *************** *** 61,66 **** template <class T> dictionary_t& dictionary_set(dictionary_t& object, name_t key, const T& x) ! { return dictionary_set(object, key, value_t(x)); } ! /*************************************************************************************************/ --- 61,66 ---- template <class T> dictionary_t& dictionary_set(dictionary_t& object, name_t key, const T& x) ! { return dictionary_set(object, key, value_t(x)); } ! /*************************************************************************************************/ *************** *** 68,74 **** struct dictionary_get<value_t> { ! const promote<value_t>::type& operator () (const dictionary_t& object, name_t key, select<value_t>); ! void operator () (const dictionary_t& object, name_t key, value_t& value); }; --- 68,74 ---- struct dictionary_get<value_t> { ! const promote<value_t>::type& operator () (const dictionary_t& object, name_t key, select<value_t>); ! void operator () (const dictionary_t& object, name_t key, value_t& value); }; *************** *** 76,91 **** struct dictionary_get { ! const typename promote<T>::type& operator () (const dictionary_t& object, name_t key, select<T>) ! { ! return dictionary_get<value_t>()(object, key, select<value_t>()).template get<T>(); ! } ! void operator () (const dictionary_t& object, name_t key, T& value) ! { ! value_t result; ! dictionary_get<value_t>()(object, key, result); ! result.get(value); ! } }; --- 76,91 ---- struct dictionary_get { ! const typename promote<T>::type& operator () (const dictionary_t& object, name_t key, select<T>) ! { ! return dictionary_get<value_t>()(object, key, select<value_t>()).template get<T>(); ! } ! void operator () (const dictionary_t& object, name_t key, T& value) ! { ! value_t result; ! dictionary_get<value_t>()(object, key, result); ! result.get(value); ! } }; *************** *** 94,188 **** template <typename T> inline const typename promote<T>::type& dictionary_t::get(name_t key) const ! { return dictionary_get<T>()(*this, key, select<T>()); } ! template <typename T> inline void dictionary_t::get(name_t key, T& value) const ! { dictionary_get<T>()(*this, key, value); } ! /*************************************************************************************************/ template <class InputIterator> dictionary_t dictionary_ctor(InputIterator first, InputIterator last) ! { ! dictionary_t result; ! std::copy(first, last, result.inserter()); ! return result; ! } ! /*************************************************************************************************/ template <typename T> dictionary_t dictionary_ctor(const char* k0, const T& v0) ! { ! dictionary_t result; ! result.set(name_t(k0), v0); ! return result; ! } template <typename K0, typename V0, typename K1, typename V1> ! dictionary_t dictionary_ctor( const K0& k0, const V0& v0, ! const K1& k1, const V1& v1 ) ! { ! dictionary_t result; ! result.set(name_t(k0), v0); ! result.set(name_t(k1), v1); ! return result; ! } ! /*************************************************************************************************/ class dictionary_t::const_iterator : ! public std::iterator<std::bidirectional_iterator_tag, dictionary_t::value_type, ! dictionary_t::difference_type, dictionary_t::const_pointer, dictionary_t::const_reference> ! ! { ! public: ! typedef dictionary_t::const_reference const_reference; ! typedef dictionary_t::const_pointer const_pointer; ! ! const_iterator(const const_iterator& x); ! ~const_iterator() throw(); ! ! const_iterator& operator= (const const_iterator& x); ! const_reference operator* () const throw(); ! const_pointer operator -> () const throw(); ! const_iterator& operator++ () throw(); ! const_iterator operator++ (int); ! const_iterator& operator-- () throw(); ! const_iterator operator-- (int); ! bool operator== (const const_iterator& rhs) const throw(); ! bool operator!= (const const_iterator& rhs) const throw(); ! protected: ! friend class dictionary_t; ! ! class begin { }; ! class end { }; ! ! const_iterator(const dictionary_t&, begin); ! const_iterator(const dictionary_t&, end); ! const_iterator(const dictionary_t&, name_t x); // Find form ! private: ! class implementation; ! const_iterator::implementation* object; ! }; ! /*************************************************************************************************/ inline dictionary_t::const_iterator dictionary_t::begin() const ! { return const_iterator(*this, const_iterator::begin()); } ! inline dictionary_t::const_iterator dictionary_t::end() const ! { return const_iterator(*this, const_iterator::end()); } ! inline dictionary_t::const_reverse_iterator dictionary_t::rbegin() const ! { return const_reverse_iterator(end()); } inline dictionary_t::const_reverse_iterator dictionary_t::rend() const ! { return const_reverse_iterator(begin()); } /*************************************************************************************************/ ! } // namespace adobe --- 94,188 ---- template <typename T> inline const typename promote<T>::type& dictionary_t::get(name_t key) const ! { return dictionary_get<T>()(*this, key, select<T>()); } ! template <typename T> inline void dictionary_t::get(name_t key, T& value) const ! { dictionary_get<T>()(*this, key, value); } ! /*************************************************************************************************/ template <class InputIterator> dictionary_t dictionary_ctor(InputIterator first, InputIterator last) ! { ! dictionary_t result; ! std::copy(first, last, result.inserter()); ! return result; ! } ! /*************************************************************************************************/ template <typename T> dictionary_t dictionary_ctor(const char* k0, const T& v0) ! { ! dictionary_t result; ! result.set(name_t(k0), v0); ! return result; ! } template <typename K0, typename V0, typename K1, typename V1> ! dictionary_t dictionary_ctor( const K0& k0, const V0& v0, ! const K1& k1, const V1& v1 ) ! { ! dictionary_t result; ! result.set(name_t(k0), v0); ! result.set(name_t(k1), v1); ! return result; ! } ! /*************************************************************************************************/ class dictionary_t::const_iterator : ! public std::iterator<std::bidirectional_iterator_tag, dictionary_t::value_type, ! dictionary_t::difference_type, dictionary_t::const_pointer, dictionary_t::const_reference> ! ! { ! public: ! typedef dictionary_t::const_reference const_reference; ! typedef dictionary_t::const_pointer const_pointer; ! ! const_iterator(const const_iterator& x); ! ~const_iterator() throw(); ! ! const_iterator& operator= (const const_iterator& x); ! const_reference operator* () const throw(); ! const_pointer operator -> () const throw(); ! const_iterator& operator++ () throw(); ! const_iterator operator++ (int); ! const_iterator& operator-- () throw(); ! const_iterator operator-- (int); ! bool operator== (const const_iterator& rhs) const throw(); ! bool operator!= (const const_iterator& rhs) const throw(); ! protected: ! friend class dictionary_t; ! ! class begin { }; ! class end { }; ! ! const_iterator(const dictionary_t&, begin); ! const_iterator(const dictionary_t&, end); ! const_iterator(const dictionary_t&, name_t x); // Find form ! private: ! class implementation; ! const_iterator::implementation* object; ! }; ! /*************************************************************************************************/ inline dictionary_t::const_iterator dictionary_t::begin() const ! { return const_iterator(*this, const_iterator::begin()); } ! inline dictionary_t::const_iterator dictionary_t::end() const ! { return const_iterator(*this, const_iterator::end()); } ! inline dictionary_t::const_reverse_iterator dictionary_t::rbegin() const ! { return const_reverse_iterator(end()); } inline dictionary_t::const_reverse_iterator dictionary_t::rend() const ! { return const_reverse_iterator(begin()); } /*************************************************************************************************/ ! } // namespace adobe Index: static_table.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/static_table.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** static_table.hpp 6 Jan 2006 18:35:02 -0000 1.5 --- static_table.hpp 3 Feb 2006 18:20:41 -0000 1.6 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 27,56 **** struct static_table_traits { ! typedef bool result_type; ! typedef KeyType key_type; ! typedef ValueType value_type; ! typedef std::pair<key_type, value_type> entry_type; ! result_type operator()(const entry_type& x, const entry_type& y) const ! { ! return (*this)(x, y.first); ! } ! // revisit: MM. For debugging purposes, VC 8 requires the definition of ! // this (unnecessary overload) in debug versions. ! result_type operator()(const key_type& x, const entry_type& y) const ! { ! return x < y.first; ! } ! result_type operator()(const entry_type& x, const key_type& y) const ! { ! return x.first < y; ! } ! result_type equal(const key_type& x, const key_type& y) const ! { ! return x == y; ! } }; --- 27,56 ---- struct static_table_traits { ! typedef bool result_type; ! typedef KeyType key_type; ! typedef ValueType value_type; ! typedef std::pair<key_type, value_type> entry_type; ! result_type operator()(const entry_type& x, const entry_type& y) const ! { ! return (*this)(x, y.first); ! } ! // revisit: MM. For debugging purposes, VC 8 requires the definition of ! // this (unnecessary overload) in debug versions. ! result_type operator()(const key_type& x, const entry_type& y) const ! { ! return x < y.first; ! } ! result_type operator()(const entry_type& x, const key_type& y) const ! { ! return x.first < y; ! } ! result_type equal(const key_type& x, const key_type& y) const ! { ! return x == y; ! } }; *************** *** 60,97 **** struct static_table { ! typedef Traits traits_type; ! typedef typename traits_type::key_type key_type; ! typedef typename traits_type::value_type value_type; ! typedef typename traits_type::entry_type entry_type; ! const value_type& operator()(const key_type& key) const ! { ! const entry_type* iter(adobe::lower_bound(table_m, key, traits_type())); ! if (iter == boost::end(table_m) || !traits_type().equal(iter->first, key)) ! throw std::logic_error("static_table key not found"); ! return iter->second; ! } ! bool operator()(const key_type& key, value_type& result) const ! { ! const entry_type* iter(adobe::lower_bound(table_m, key, traits_type())); ! if (iter == boost::end(table_m) || !traits_type().equal(iter->first, key)) ! return false; ! result = iter->second; ! return true; ! } ! void sort() ! { ! adobe::sort(table_m, traits_type()); ! } public: ! entry_type table_m[Size]; }; --- 60,97 ---- struct static_table { ! typedef Traits traits_type; ! typedef typename traits_type::key_type key_type; ! typedef typename traits_type::value_type value_type; ! typedef typename traits_type::entry_type entry_type; ! const value_type& operator()(const key_type& key) const ! { ! const entry_type* iter(adobe::lower_bound(table_m, key, traits_type())); ! if (iter == boost::end(table_m) || !traits_type().equal(iter->first, key)) ! throw std::logic_error("static_table key not found"); ! return iter->second; ! } ! bool operator()(const key_type& key, value_type& result) const ! { ! const entry_type* iter(adobe::lower_bound(table_m, key, traits_type())); ! if (iter == boost::end(table_m) || !traits_type().equal(iter->first, key)) ! return false; ! result = iter->second; ! return true; ! } ! void sort() ! { ! adobe::sort(table_m, traits_type()); ! } public: ! entry_type table_m[Size]; }; Index: extents.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/extents.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** extents.hpp 6 Jan 2006 18:35:02 -0000 1.6 --- extents.hpp 3 Feb 2006 18:20:41 -0000 1.7 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 27,56 **** struct point_2d : boost::equality_comparable<point_2d<T> > { ! point_2d() : ! x_m(T()), y_m(T()) ! { } ! point_2d(const T& x, const T& y) : ! x_m(x), y_m(y) ! { } ! T x_m; ! T y_m; ! ! friend inline void swap(const point_2d& x, const point_2d& y) ! { ! adobe::adl_swap(x.x_m, y.x_m); ! adobe::adl_swap(x.y_m, y.y_m); ! } ! ! friend inline void operator==(const point_2d& x, const point_2d& y) ! { ! return (x.x_m == y.x_m) && (x.y_m == y.y_m); ! } }; ! typedef std::pair<long, long> pair_long_t; ! typedef point_2d<long> point_2d_t; ! typedef std::vector<long> guide_set_t; // REVISIT (sparent) : points of interest need to be named entities. This will become: --- 27,56 ---- struct point_2d : boost::equality_comparable<point_2d<T> > { ! point_2d() : ! x_m(T()), y_m(T()) ! { } ! point_2d(const T& x, const T& y) : ! x_m(x), y_m(y) ! { } ! T x_m; ! T y_m; ! ! friend inline void swap(const point_2d& x, const point_2d& y) ! { ! adobe::adl_swap(x.x_m, y.x_m); ! adobe::adl_swap(x.y_m, y.y_m); ! } ! ! friend inline void operator==(const point_2d& x, const point_2d& y) ! { ! return (x.x_m == y.x_m) && (x.y_m == y.y_m); ! } }; ! typedef std::pair<long, long> pair_long_t; ! typedef point_2d<long> point_2d_t; ! typedef std::vector<long> guide_set_t; // REVISIT (sparent) : points of interest need to be named entities. This will become: *************** *** 59,64 **** struct guide_set_t { ! adobe::name_t name_m; ! long offset_m; }; typedef std::vector<guide_set_t> point_of_interest_set_t; --- 59,64 ---- struct guide_set_t { ! adobe::name_t name_m; ! long offset_m; }; typedef std::vector<guide_set_t> point_of_interest_set_t; *************** *** 69,73 **** struct extents_slices_t { ! enum slice_select_t { horizontal, vertical }; }; --- 69,73 ---- struct extents_slices_t { ! enum slice_select_t { horizontal, vertical }; }; *************** *** 76,110 **** struct extents_t : #if !defined(ADOBE_NO_DOCUMENTATION) ! private extents_slices_t, boost::equality_comparable<extents_t> #endif { ! struct slice_t : boost::equality_comparable<slice_t> ! { ! slice_t() : length_m(0) { }; ! long length_m; ! pair_long_t outset_m; ! pair_long_t frame_m; ! pair_long_t inset_m; ! guide_set_t poi_m; ! ! friend bool operator ==(const slice_t& x, const slice_t& y); ! }; ! boost::array<slice_t, 2> slice_m; ! slice_t& vertical() { return slice_m[extents_slices_t::vertical]; } ! slice_t& horizontal() { return slice_m[extents_slices_t::horizontal]; } ! const slice_t& vertical() const { return slice_m[extents_slices_t::vertical]; } ! const slice_t& horizontal() const { return slice_m[extents_slices_t::horizontal]; } ! long& height() { return vertical().length_m; } ! long& width() { return horizontal().length_m; } ! const long& height() const { return vertical().length_m; } ! const long& width() const { return horizontal().length_m; } ! ! friend bool operator == (const extents_t& x, const extents_t& y); }; --- 76,110 ---- struct extents_t : #if !defined(ADOBE_NO_DOCUMENTATION) ! private extents_slices_t, boost::equality_comparable<extents_t> #endif { ! struct slice_t : boost::equality_comparable<slice_t> ! { ! slice_t() : length_m(0) { }; ! long length_m; ! pair_long_t outset_m; ! pair_long_t frame_m; ! pair_long_t inset_m; ! guide_set_t poi_m; ! ! friend bool operator ==(const slice_t& x, const slice_t& y); ! }; ! boost::array<slice_t, 2> slice_m; ! slice_t& vertical() { return slice_m[extents_slices_t::vertical]; } ! slice_t& horizontal() { return slice_m[extents_slices_t::horizontal]; } ! const slice_t& vertical() const { return slice_m[extents_slices_t::vertical]; } ! const slice_t& horizontal() const { return slice_m[extents_slices_t::horizontal]; } ! long& height() { return vertical().length_m; } ! long& width() { return horizontal().length_m; } ! const long& height() const { return vertical().length_m; } ! const long& width() const { return horizontal().length_m; } ! ! friend bool operator == (const extents_t& x, const extents_t& y); }; *************** *** 112,120 **** #if defined(ADOBE_SERIALIZATION) ! std::ostream& operator << (std::ostream& s, const adobe::extents_t& x); #endif #if defined(ADOBE_SERIALIZATION) ! std::ostream& operator << (std::ostream& s, const adobe::extents_t::slice_t& x); #endif --- 112,120 ---- #if defined(ADOBE_SERIALIZATION) ! std::ostream& operator << (std::ostream& s, const adobe::extents_t& x); #endif #if defined(ADOBE_SERIALIZATION) ! std::ostream& operator << (std::ostream& s, const adobe::extents_t::slice_t& x); #endif *************** *** 129,137 **** template <> inline void swap(adobe::extents_t::slice_t& x, adobe::extents_t::slice_t& y) { ! adobe::adl_swap(x.length_m, y.length_m); ! adobe::adl_swap(x.outset_m, y.outset_m); ! adobe::adl_swap(x.frame_m, y.frame_m); ! adobe::adl_swap(x.inset_m, y.inset_m); ! adobe::adl_swap(x.poi_m, y.poi_m); } --- 129,137 ---- template <> inline void swap(adobe::extents_t::slice_t& x, adobe::extents_t::slice_t& y) { ! adobe::adl_swap(x.length_m, y.length_m); ! adobe::adl_swap(x.outset_m, y.outset_m); ! adobe::adl_swap(x.frame_m, y.frame_m); ! adobe::adl_swap(x.inset_m, y.inset_m); ! adobe::adl_swap(x.poi_m, y.poi_m); } Index: functional.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/functional.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functional.hpp 6 Jan 2006 18:35:02 -0000 1.7 --- functional.hpp 3 Feb 2006 18:20:41 -0000 1.8 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 27,31 **** struct element { ! typedef typename boost::tuples::element<N, T>::type type; }; --- 27,31 ---- struct element { ! typedef typename boost::tuples::element<N, T>::type type; }; *************** *** 33,37 **** struct element<0, std::pair<T1, T2> > { ! typedef typename std::pair<T1, T2>::first_type type; }; --- 33,37 ---- struct element<0, std::pair<T1, T2> > { ! typedef typename std::pair<T1, T2>::first_type type; }; *************** *** 39,43 **** struct element<1, std::pair<T1, T2> > { ! typedef typename std::pair<T1, T2>::second_type type; }; --- 39,43 ---- struct element<1, std::pair<T1, T2> > { ! typedef typename std::pair<T1, T2>::second_type type; }; *************** *** 47,55 **** struct get_element : std::unary_function<T, typename element<N, T>::type> { ! typename element<N, T>::type& operator()(T& x) const ! { return boost::get<N>(x); } ! ! const typename element<N, T>::type& operator()(const T& x) const ! { return boost::get<N>(x); } }; --- 47,55 ---- struct get_element : std::unary_function<T, typename element<N, T>::type> { ! typename element<N, T>::type& operator()(T& x) const ! { return boost::get<N>(x); } ! ! const typename element<N, T>::type& operator()(const T& x) const ! { return boost::get<N>(x); } }; *************** *** 58,71 **** template <typename T1, typename T2> // T is pair or tuple struct get_element<0, std::pair<T1, T2> > : ! std::unary_function<std::pair<T1, T2>, typename std::pair<T1, T2>::first_type> { ! typedef typename std::pair<T1, T2> argument_type; ! typedef typename argument_type::first_type result_type; ! result_type& operator()(argument_type& x) const ! { return x.first; } ! ! const result_type& operator()(const argument_type& x) const ! { return x.first; } }; --- 58,71 ---- template <typename T1, typename T2> // T is pair or tuple struct get_element<0, std::pair<T1, T2> > : ! std::unary_function<std::pair<T1, T2>, typename std::pair<T1, T2>::first_type> { ! typedef typename std::pair<T1, T2> argument_type; ! typedef typename argument_type::first_type result_type; ! result_type& operator()(argument_type& x) const ! { return x.first; } ! ! const result_type& operator()(const argument_type& x) const ! { return x.first; } }; *************** *** 74,87 **** template <typename T1, typename T2> // T is pair or tuple struct get_element<1, std::pair<T1, T2> > : ! std::unary_function<std::pair<T1, T2>, typename std::pair<T1, T2>::second_type> { ! typedef typename std::pair<T1, T2> argument_type; ! typedef typename argument_type::second_type result_type; ! ! result_type& operator()(argument_type& x) const ! { return x.second; } ! ! const result_type& operator()(const argument_type& x) const ! { return x.second; } }; --- 74,87 ---- template <typename T1, typename T2> // T is pair or tuple struct get_element<1, std::pair<T1, T2> > : ! std::unary_function<std::pair<T1, T2>, typename std::pair<T1, T2>::second_type> { ! typedef typename std::pair<T1, T2> argument_type; ! typedef typename argument_type::second_type result_type; ! ! result_type& operator()(argument_type& x) const ! { return x.second; } ! ! const result_type& operator()(const argument_type& x) const ! { return x.second; } }; *************** *** 91,96 **** struct identity : std::unary_function<T, T> { ! T& operator()(T& x) const { return x; } ! const T& operator()(const T& x) const { return x; } }; --- 91,96 ---- struct identity : std::unary_function<T, T> { ! T& operator()(T& x) const { return x; } ! const T& operator()(const T& x) const { return x; } }; *************** *** 100,104 **** struct always_true : std::unary_function<T, bool> { ! bool operator()(const T&) const { return true; } }; --- 100,104 ---- struct always_true : std::unary_function<T, bool> { ! bool operator()(const T&) const { return true; } }; *************** *** 128,133 **** struct delete_ptr<T*> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete x; } }; --- 128,133 ---- struct delete_ptr<T*> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete x; } }; *************** *** 135,140 **** struct delete_ptr<T* const> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete x; } }; --- 135,140 ---- struct delete_ptr<T* const> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete x; } }; *************** *** 154,159 **** struct delete_ptr<T(*)[]> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete [] x; } }; --- 154,159 ---- struct delete_ptr<T(*)[]> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete [] x; } }; *************** *** 161,166 **** struct delete_ptr<T(* const)[]> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete [] x; } }; --- 161,166 ---- struct delete_ptr<T(* const)[]> : std::unary_function<T*, void> { ! void operator () (T* x) const throw() ! { delete [] x; } }; *************** *** 208,212 **** struct generator_t { ! typedef Result result_type; }; --- 208,212 ---- struct generator_t { ! typedef Result result_type; }; *************** *** 220,227 **** #endif { ! explicit sequence_t(const T& x) : data_m(x) { } ! T operator () () { return data_m++; } private: ! T data_m; }; --- 220,227 ---- #endif { ! explicit sequence_t(const T& x) : data_m(x) { } ! T operator () () { return data_m++; } private: ! T data_m; }; *************** *** 231,256 **** struct compare_members_t : std::binary_function<T, T, bool> { ! compare_members_t(R T::* member, Compare compare) : ! compare_m(compare), ! member_m(member) ! { } ! bool operator () (const T& x, const T& y) const ! { return compare_m(x.*member_m, y.*member_m); } ! ! bool operator () (const T& x, const R& y) const ! { return compare_m(x.*member_m, y); } ! ! bool operator () (const R& x, const T& y) const ! { return compare_m(x, y.*member_m); } private: /* ! REVISIT (sparent) : This could probably use an empty member optimization. */ ! Compare compare_m; ! R T::* member_m; }; --- 231,256 ---- struct compare_members_t : std::binary_function<T, T, bool> { ! compare_members_t(R T::* member, Compare compare) : ! compare_m(compare), ! member_m(member) ! { } ! bool operator () (const T& x, const T& y) const ! { return compare_m(x.*member_m, y.*member_m); } ! ! bool operator () (const T& x, const R& y) const ! { return compare_m(x.*member_m, y); } ! ! bool operator () (const R& x, const T& y) const ! { return compare_m(x, y.*member_m); } private: /* ! REVISIT (sparent) : This could probably use an empty member optimization. */ ! Compare compare_m; ! R T::* member_m; }; *************** *** 258,262 **** compare_members_t<T, R, std::less<R> > compare_members(R T::* member) { ! return compare_members_t<T, R, std::less<R> >(member, std::less<R>() ); } --- 258,262 ---- compare_members_t<T, R, std::less<R> > compare_members(R T::* member) { ! return compare_members_t<T, R, std::less<R> >(member, std::less<R>() ); } *************** *** 264,268 **** compare_members_t<T, R, Compare> compare_members(R T::* member, Compare compare) { ! return compare_members_t<T, R, Compare>(member, compare); } --- 264,268 ---- compare_members_t<T, R, Compare> compare_members(R T::* member, Compare compare) { ! return compare_members_t<T, R, Compare>(member, compare); } *************** *** 270,284 **** /* REVISIT (sparent) : ! This work is to be part of table indexes. A table index is a container of pointers to ! objects with a transformation. ! ! Getting to the key in a table is an indirect transformation ! Getting to a row in a table is an indirection ! ! Note indirection is a transformation - so it is two levels of transformation. ! ! To sort a table by the key I want to be able to do: ! ! adobe::sort(index.base(), index.transform_compare()); */ --- 270,284 ---- /* REVISIT (sparent) : ! This work is to be part of table indexes. A table index is a container of pointers to ! objects with a transformation. ! ! Getting to the key in a table is an indirect transformation ! Getting to a row in a table is an indirection ! ! Note indirection is a transformation - so it is two levels of transformation. ! ! To sort a table by the key I want to be able to do: ! ! adobe::sort(index.base(), index.transform_compare()); */ *************** *** 288,303 **** struct transform_member_t : std::unary_function<T, R&> { ! explicit transform_member_t(R T::* member) : ! member_m(member) ! { } ! ! R& operator () (T& x) const ! { return x.*member_m; } ! ! const R& operator () (const T& x) const ! { return x.*member_m; } private: ! R T::* member_m; }; --- 288,303 ---- struct transform_member_t : std::unary_function<T, R&> { ! explicit transform_member_t(R T::* member) : ! member_m(member) ! { } ! ! R& operator () (T& x) const ! { return x.*member_m; } ! ! const R& operator () (const T& x) const ! { return x.*member_m; } private: ! R T::* member_m; }; *************** *** 305,309 **** transform_member_t<T, R> make_transform(R T::* member) { ! return transform_member_t<T, R>(member); } --- 305,309 ---- transform_member_t<T, R> make_transform(R T::* member) { ! return transform_member_t<T, R>(member); } *************** *** 313,321 **** struct indirect_t : std::unary_function<Pointer, Reference> { ! Reference& operator () (Pointer& x) const ! { return *x; } ! const Reference& operator () (const Pointer& x) const ! { return *x; } }; --- 313,321 ---- struct indirect_t : std::unary_function<Pointer, Reference> { ! Reference& operator () (Pointer& x) const ! { return *x; } ! const Reference& operator () (const Pointer& x) const ! { return *x; } }; *************** *** 324,330 **** template <class T> struct bitwise_or ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x | y;} }; --- 324,330 ---- template <class T> struct bitwise_or ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x | y;} }; *************** *** 333,339 **** template <class T> struct bitwise_and ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x & y;} }; --- 333,339 ---- template <class T> struct bitwise_and ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x & y;} }; *************** *** 342,348 **** template <class T> struct bitwise_xor ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x ^ y;} }; --- 342,348 ---- template <class T> struct bitwise_xor ! : std::binary_function<T, T, T> { ! T operator()(const T& x, const T& y) const {return x ^ y;} }; Index: md5.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/md5.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** md5.hpp 6 Jan 2006 18:35:02 -0000 1.3 --- md5.hpp 3 Feb 2006 18:20:41 -0000 1.4 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated and others ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated and others ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 20,26 **** /* ! Relevant copyright information is provided below and may not be removed from this file. ! Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. */ --- 20,26 ---- /* ! Relevant copyright information is provided below and may not be removed from this file. ! Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. */ *************** *** 28,52 **** /* ! MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm ! Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights ! reserved. ! License to copy and use this software is granted provided that it is ! identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in ! all material mentioning or referencing this software or this function. ! License is also granted to make and use derivative works provided that such ! works are identified as "derived from the RSA Data Security, Inc. MD5 ! Message-Digest Algorithm" in all material mentioning or referencing the ! derived work. ! ! RSA Data Security, Inc. makes no representations concerning either the ! merchantability of this software or the suitability of this software for ! any particular purpose. It is provided "as is" without express or implied ! warranty of any kind. ! ! These notices must be retained in any copies of any part of this ! documentation and/or software. */ --- 28,52 ---- /* ! MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm ! Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights ! reserved. ! License to copy and use this software is granted provided that it is ! identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in ! all material mentioning or referencing this software or this function. ! License is also granted to make and use derivative works provided that such ! works are identified as "derived from the RSA Data Security, Inc. MD5 ! Message-Digest Algorithm" in all material mentioning or referencing the ! derived work. ! ! RSA Data Security, Inc. makes no representations concerning either the ! merchantability of this software or the suitability of this software for ! any particular purpose. It is provided "as is" without express or implied ! warranty of any kind. ! ! These notices must be retained in any copies of any part of this ! documentation and/or software. */ *************** *** 60,77 **** { public: ! typedef boost::array<boost::uint8_t, 16> digest_t; ! md5_t(); ! void update(void* input_block, std::size_t input_length); ! digest_t final(); private: ! void reset(); ! boost::uint32_t state_m[4]; /* state (ABCD) */ ! boost::uint32_t count_m[2]; /* number of bits, modulo 2^64 (lsb first) */ ! boost::uint8_t buffer_m[64]; /* input buffer */ }; --- 60,77 ---- { public: ! typedef boost::array<boost::uint8_t, 16> digest_t; ! md5_t(); ! void update(void* input_block, std::size_t input_length); ! digest_t final(); private: ! void reset(); ! boost::uint32_t state_m[4]; /* state (ABCD) */ ! boost::uint32_t count_m[2]; /* number of bits, modulo 2^64 (lsb first) */ ! boost::uint8_t buffer_m[64]; /* input buffer */ }; *************** *** 80,88 **** inline md5_t::digest_t md5(void* input_block, std::size_t input_length) { ! md5_t m; ! m.update(input_block, input_length); ! return m.final(); } --- 80,88 ---- inline md5_t::digest_t md5(void* input_block, std::size_t input_length) { ! md5_t m; ! m.update(input_block, input_length); ! return m.final(); } Index: conversion.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/conversion.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** conversion.hpp 6 Jan 2006 18:35:02 -0000 1.4 --- conversion.hpp 3 Feb 2006 18:20:41 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 21,34 **** struct promote { ! typedef T type; }; ! template <> struct promote<short> { typedef double type; }; ! template <> struct promote<unsigned short> { typedef double type; }; ! template <> struct promote<int> { typedef double type; }; ! template <> struct promote<unsigned int> { typedef double type; }; ! template <> struct promote<long> { typedef double type; }; ! template <> struct promote<unsigned long> { typedef double type; }; ! template <> struct promote<float> { typedef double type; }; /*************************************************************************************************/ --- 21,34 ---- struct promote { ! typedef T type; }; ! template <> struct promote<short> { typedef double type; }; ! template <> struct promote<unsigned short> { typedef double type; }; ! template <> struct promote<int> { typedef double type; }; ! template <> struct promote<unsigned int> { typedef double type; }; ! template <> struct promote<long> { typedef double type; }; ! template <> struct promote<unsigned long> { typedef double type; }; ! template <> struct promote<float> { typedef double type; }; /*************************************************************************************************/ *************** *** 36,40 **** template <typename lht, typename rht> inline lht explicit_cast(const rht& rhs) ! { return static_cast<lht>(rhs); } /*************************************************************************************************/ --- 36,40 ---- template <typename lht, typename rht> inline lht explicit_cast(const rht& rhs) ! { return static_cast<lht>(rhs); } /*************************************************************************************************/ *************** *** 42,46 **** template <typename T> inline T& remove_const(const T& x) ! { return const_cast<T&>(x); } /*************************************************************************************************/ --- 42,46 ---- template <typename T> inline T& remove_const(const T& x) ! { return const_cast<T&>(x); } /*************************************************************************************************/ Index: unicode.hpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/unicode.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** unicode.hpp 6 Jan 2006 18:35:02 -0000 1.7 --- unicode.hpp 3 Feb 2006 18:20:41 -0000 1.8 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 75,108 **** // REVISIT (fbrereto) : I don't need to INIT_ONCE these, do I? ! const unsigned char to_utf32_pivot_1_k(128); ! const unsigned char to_utf32_pivot_2_k(192); ! const unsigned char to_utf32_pivot_3_k(224); ! const unsigned char to_utf32_pivot_4_k(240); ! const unsigned char to_utf32_pivot_5_k(248); ! const unsigned char to_utf32_pivot_6_k(252); ! const unsigned char to_utf32_pivot_7_k(254); ! const boost::uint32_t to_utf8_pivot_1_k(1UL << 7); ! const boost::uint32_t to_utf8_pivot_2_k(1UL << 11); ! const boost::uint32_t to_utf8_pivot_3_k(1UL << 16); ! const boost::uint32_t to_utf8_pivot_4_k(1UL << 21); ! const boost::uint32_t to_utf8_pivot_5_k(1UL << 26); ! const boost::uint16_t to_utf16_surrogate_pivot_k(65535); ! const boost::uint16_t utf16_high_surrogate_front_k(0xd800); ! const boost::uint16_t utf16_high_surrogate_back_k(0xdbff); ! const boost::uint16_t utf16_low_surrogate_front_k(0xdc00); ! const boost::uint16_t utf16_low_surrogate_back_k(0xdfff); /*************************************************************************************************/ ! template <std::size_t NumBytes> struct utf8_header_t { }; ! template <> struct utf8_header_t<0> { enum { value = char(0x80) }; }; // nonheader ! //template <> struct utf8_header_t<1> { enum { value = char(0x00) }; }; // illegal ! template <> struct utf8_header_t<2> { enum { value = char(0xC0) }; }; ! template <> struct utf8_header_t<3> { enum { value = char(0xE0) }; }; ! template <> struct utf8_header_t<4> { enum { value = char(0xF0) }; }; ! template <> struct utf8_header_t<5> { enum { value = char(0xF8) }; }; ! template <> struct utf8_header_t<6> { enum { value = char(0xFC) }; }; /*************************************************************************************************/ --- 75,108 ---- // REVISIT (fbrereto) : I don't need to INIT_ONCE these, do I? ! const unsigned char to_utf32_pivot_1_k(128); ! const unsigned char to_utf32_pivot_2_k(192); ! const unsigned char to_utf32_pivot_3_k(224); ! const unsigned char to_utf32_pivot_4_k(240); ! const unsigned char to_utf32_pivot_5_k(248); ! const unsigned char to_utf32_pivot_6_k(252); ! const unsigned char to_utf32_pivot_7_k(254); ! const boost::uint32_t to_utf8_pivot_1_k(1UL << 7); ! const boost::uint32_t to_utf8_pivot_2_k(1UL << 11); ! const boost::uint32_t to_utf8_pivot_3_k(1UL << 16); ! const boost::uint32_t to_utf8_pivot_4_k(1UL << 21); ! const boost::uint32_t to_utf8_pivot_5_k(1UL << 26); ! const boost::uint16_t to_utf16_surrogate_pivot_k(65535); ! const boost::uint16_t utf16_high_surrogate_front_k(0xd800); ! const boost::uint16_t utf16_high_surrogate_back_k(0xdbff); ! const boost::uint16_t utf16_low_surrogate_front_k(0xdc00); ! const boost::uint16_t utf16_low_surrogate_back_k(0xdfff); /*************************************************************************************************/ ! template <std::size_t NumBytes> struct utf8_header_t { }; ! template <> struct utf8_header_t<0> { enum { value = char(0x80) }; }; // nonheader ! //template <> struct utf8_header_t<1> { enum { value = char(0x00) }; }; // illegal ! template <> struct utf8_header_t<2> { enum { value = char(0xC0) }; }; ! template <> struct utf8_header_t<3> { enum { value = char(0xE0) }; }; ! template <> struct utf8_header_t<4> { enum { value = char(0xF0) }; }; ! template <> struct utf8_header_t<5> { enum { value = char(0xF8) }; }; ! template <> struct utf8_header_t<6> { enum { value = char(0xFC) }; }; /*************************************************************************************************/ *************** *** 157,169 **** struct demotion_engine_t { ! template <typename OutputIterator> ! inline OutputIterator operator () (boost::uint32_t code, OutputIterator i) ! { ! *i = utf8_add_mask<ByteCount, Header>(demote_fragment<ByteCount>(code)); ! ++i; ! return demotion_engine_t<ByteCount - 1, false>()(code, i); ! } }; --- 157,169 ---- struct demotion_engine_t { ! template <typename OutputIterator> ! inline OutputIterator operator () (boost::uint32_t code, OutputIterator i) ! { ! *i = utf8_add_mask<ByteCount, Header>(demote_fragment<ByteCount>(code)); ! ++i; ! return demotion_engine_t<ByteCount - 1, false>()(code, i); ! } }; *************** *** 171,181 **** struct demotion_engine_t<1, false> { ! template <typename OutputIterator> ! inline OutputIterator operator () (boost::uint32_t code, OutputIterator i) ! { ! *i = utf8_add_mask<0, false>(demote_fragment<1>(code)); ! return ++i; ! } }; --- 171,181 ---- struct demotion_engine_t<1, false> { ! template <typename OutputIterator> ! inline OutputIterator operator () (boost::uint32_t code, OutputIterator i) ! { ! *i = utf8_add_mask<0, false>(demote_fragment<1>(code)); ! return ++i; ! } }; *************** *** 185,206 **** struct promotion_engine_t { ! template <typename InputIterator> ! inline boost::uint32_t operator () (InputIterator& first, InputIterator last) ! { ! /* ! CodeWarrior 9.4 doesn't like this code composited into one line; ! GCC doesn't seem to have a problem. ! */ ! char n(*first); ! char stripped(utf8_strip_mask<ByteCount, Header>(n)); ! boost::uint32_t shifted(promote_fragment<ByteCount>(stripped)); ! ++first; ! if (first == last) throw std::runtime_error("unicode: utf32 conversion ran out of input"); ! return shifted | promotion_engine_t<ByteCount - 1, false>()(first, last); ! } }; --- 185,206 ---- struct promotion_engine_t { ! template <typename InputIterator> ! inline boost::uint32_t operator () (InputIterator& first, InputIterator last) ! { ! /* ! CodeWarrior 9.4 doesn't like this code composited into one line; ! GCC doesn't seem to have a problem. ! */ ! char n(*first); ! char stripped(utf8_strip_mask<ByteCount, Header>(n)); ! boost::uint32_t shifted(promote_fragment<ByteCount>(stripped)); ! ++first; ! if (first == last) throw std::runtime_error("unicode: utf32 conversion ran out of input"); ! return shifted | promotion_engine_t<ByteCount - 1, false>()(first, last); ! } }; *************** *** 208,220 **** struct promotion_engine_t<1, false> { ! template <typename InputIterator> ! inline boost::uint32_t operator () (InputIterator& first, InputIterator) ! { ! boost::uint32_t result(promote_fragment<1>(utf8_strip_mask<0, false>(*first))); ! ++first; ! return result; ! } }; --- 208,220 ---- struct promotion_engine_t<1, false> { ! template <typename InputIterator> ! inline boost::uint32_t operator () (InputIterator& first, InputIterator) ! { ! boost::uint32_t result(promote_fragment<1>(utf8_strip_mask<0, false>(*first))); ! ++first; ! return result; ! } }; *************** *** 223,257 **** template <typename InputIterator, typename DestInteger> typename boost::enable_if<is_utf16_iterator_type<InputIterator>, InputIterator>::type ! to_utf32 (InputIterator first, InputIterator last, DestInteger& result) { ! boost::uint16_t code(static_cast<boost::uint16_t>(*first)); ! ++first; ! if (code >= implementation::utf16_high_surrogate_front_k && ! code <= implementation::utf16_high_surrogate_back_k) ! { ! result = 0; ! if (first == last) ! throw std::runtime_error("unicode: utf16 high surrogate found without low surrogate"); ! boost::uint16_t low(static_cast<boost::uint16_t>(*first)); ! assert (low >= implementation::utf16_low_surrogate_front_k && ! low <= implementation::utf16_low_surrogate_back_k); ! ++first; ! result = (code - implementation::utf16_high_surrogate_front_k) * 0x400 + ! (low - implementation::utf16_low_surrogate_front_k) + 0x10000; ! } ! else if ( code >= implementation::utf16_low_surrogate_front_k && ! code <= implementation::utf16_low_surrogate_back_k) ! { throw std::runtime_error("unicode: utf16 low surrogate found without high surrogate"); } ! else ! { result = static_cast<DestInteger>(code); } ! return first; } --- 223,257 ---- template <typename InputIterator, typename DestInteger> typename boost::enable_if<is_utf16_iterator_type<InputIterator>, InputIterator>::type ! to_utf32 (InputIterator first, InputIterator last, DestInteger& result) { ! boost::uint16_t code(static_cast<boost::uint16_t>(*first)); ! ++first; ! if (code >= implementation::utf16_high_surrogate_front_k && ! code <= implementation::utf16_high_surrogate_back_k) ! { ! result = 0; ! if (first == last) ! throw std::runtime_error("unicode: utf16 high surrogate found without low surrogate"); ! boost::uint16_t low(static_cast<boost::uint16_t>(*first)); ! assert (low >= implementation::utf16_low_surrogate_front_k && ! low <= implementation::utf16_low_surrogate_back_k); ! ++first; ! result = (code - implementation::utf16_high_surrogate_front_k) * 0x400 + ! (low - implementation::utf16_low_surrogate_front_k) + 0x10000; ! } ! else if ( code >= implementation::utf16_low_surrogate_front_k && ! code <= implementation::utf16_low_surrogate_back_k) ! { throw std::runtime_error("unicode: utf16 low surrogate found without high surrogate"); } ! else ! { result = static_cast<DestInteger>(code); } ! return first; } *************** *** 260,285 **** template <typename InputIterator, typename DestInteger> typename boost::enable_if<is_utf8_iterator_type<InputIterator>, InputIterator>::type ! to_utf32 (InputIterator first, InputIterator last, DestInteger& result) { ! unsigned char n(static_cast<unsigned char>(*first)); ! if (n < implementation::to_utf32_pivot_1_k) ! { result = static_cast<DestInteger>(n); ++first; } ! else if (n < i... [truncated message content] |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:22
|
Update of /cvsroot/adobe-source/adobe-source/adobe/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/bin Modified Files: asl_net_setup.bat asl_net_setup.sh build.bat build.sh install.sh verify.sh Added Files: make-distribution.bat Log Message: asl 1.0.13 --- NEW FILE: make-distribution.bat --- @ECHO OFF SET DEBUG_DISTRO_PATH=distribution\x86\debug\Adobe Begin\ SET RELEASE_DISTRO_PATH=distribution\x86\release\Adobe Begin\ SET ARTIFACT_PATH=ide_projects\vc8\build\Win32\ SET VC8_DEFAULT_ROOT=%ProgramFiles%\Microsoft Visual Studio 8\ REM ### This will make the current directory to be that of the build script PUSHD %~dp0 PUSHD ..\..\ IF NOT EXIST "%ARTIFACT_PATH%" ( ECHO ### Error: You must first do a build of Adobe Begin using the MSVC 8 IDE projects before using this script. EXIT /B 1 ) IF NOT EXIST "%DEBUG_DISTRO_PATH%" ( ECHO Making debug distribution directory MKDIR "%DEBUG_DISTRO_PATH%" ) IF EXIST "%DEBUG_DISTRO_PATH%" ( ECHO Clearing out debug distribution directory DEL /F /Q "%DEBUG_DISTRO_PATH%*" ) IF NOT EXIST "%RELEASE_DISTRO_PATH%" ( ECHO Making release distribution directory MKDIR "%RELEASE_DISTRO_PATH%" ) IF EXIST "%RELEASE_DISTRO_PATH%" ( ECHO Clearing out debug distribution directory DEL /F /Q "%RELEASE_DISTRO_PATH%*" ) IF EXIST "%VC8_DEFAULT_ROOT%" ( SET VC8_ROOT=%VC8_DEFAULT_ROOT% ) IF "_%VC8_ROOT%_" == "__" ( ECHO ### Error: Your installation of MSVC 8 is not in the default location, nor do you have a VC8_ROOT environment variable set. EXIT /B 1 ) CALL "%VC8_ROOT%VC\bin\VCVARS32.bat" SET DEBUG_REDIST_DIR=%VCINSTALLDIR%\redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT\ SET RELEASE_REDIST_DIR=%VCINSTALLDIR%\redist\x86\Microsoft.VC80.CRT\ COPY "%DEBUG_REDIST_DIR%Microsoft.VC80.DebugCRT.manifest" "%DEBUG_DISTRO_PATH%" COPY "%DEBUG_REDIST_DIR%msvcm80d.dll" "%DEBUG_DISTRO_PATH%" COPY "%DEBUG_REDIST_DIR%msvcp80d.dll" "%DEBUG_DISTRO_PATH%" COPY "%DEBUG_REDIST_DIR%msvcr80d.dll" "%DEBUG_DISTRO_PATH%" COPY "%RELEASE_REDIST_DIR%Microsoft.VC80.CRT.manifest" "%RELEASE_DISTRO_PATH%" COPY "%RELEASE_REDIST_DIR%msvcm80.dll" "%RELEASE_DISTRO_PATH%" COPY "%RELEASE_REDIST_DIR%msvcp80.dll" "%RELEASE_DISTRO_PATH%" COPY "%RELEASE_REDIST_DIR%msvcr80.dll" "%RELEASE_DISTRO_PATH%" SET DEBUG_ARTIFACT_DIR=%ARTIFACT_PATH%Debug\begin\ SET RELEASE_ARTIFACT_DIR=%ARTIFACT_PATH%Release\begin\ COPY "%DEBUG_ARTIFACT_DIR%begin.exe" "%DEBUG_DISTRO_PATH%" COPY "%DEBUG_ARTIFACT_DIR%editor.eve" "%DEBUG_DISTRO_PATH%" COPY "%DEBUG_ARTIFACT_DIR%editor.adm" "%DEBUG_DISTRO_PATH%" COPY "%DEBUG_ARTIFACT_DIR%glossary.xstr" "%DEBUG_DISTRO_PATH%" COPY "%RELEASE_ARTIFACT_DIR%begin.exe" "%RELEASE_DISTRO_PATH%" COPY "%RELEASE_ARTIFACT_DIR%editor.eve" "%RELEASE_DISTRO_PATH%" COPY "%RELEASE_ARTIFACT_DIR%editor.adm" "%RELEASE_DISTRO_PATH%" COPY "%RELEASE_ARTIFACT_DIR%glossary.xstr" "%RELEASE_DISTRO_PATH%" POPD POPD ECHO Done! EXIT /B 0 Index: build.bat =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/bin/build.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** build.bat 2 Dec 2005 02:52:50 -0000 1.6 --- build.bat 3 Feb 2006 18:20:41 -0000 1.7 *************** *** 9,27 **** if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\" ( ! set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\ ! set VC71_ROOT=%BOOST_JAM_TOOLSET_ROOT% ) if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" ( ! echo ### ! echo ### Your installation of MSVC is not in a default location. ! echo ### You must set environment variable "BOOST_JAM_TOOLSET_ROOT" before you can continue. ! echo ### You can either do this by typing at the command line: ! echo ### "set BOOST_JAM_TOOLSET_ROOT=C:\Directory\Path\To\VC71\" ! echo ### or by setting it as an environment variable in your Windows ! echo ### system settings control panel. ! echo ### Don't forget the final backslash! ! echo ### ! goto :Error ) --- 9,27 ---- if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\" ( ! set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\ ! set VC71_ROOT=%BOOST_JAM_TOOLSET_ROOT% ) if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" ( ! echo ### ! echo ### Your installation of MSVC is not in a default location. ! echo ### You must set environment variable "BOOST_JAM_TOOLSET_ROOT" before you can continue. ! echo ### You can either do this by typing at the command line: ! echo ### "set BOOST_JAM_TOOLSET_ROOT=C:\Directory\Path\To\VC71\" ! echo ### or by setting it as an environment variable in your Windows ! echo ### system settings control panel. ! echo ### Don't forget the final backslash! ! echo ### ! goto :Error ) *************** *** 34,38 **** if EXIST "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ( ! call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) --- 34,38 ---- if EXIST "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ( ! call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) *************** *** 41,45 **** if EXIST "bjam.exe" ( ! DEL bjam.exe ) --- 41,45 ---- if EXIST "bjam.exe" ( ! DEL bjam.exe ) *************** *** 56,61 **** if ERRORLEVEL 1 ( ! echo ### Error : %ERRORLEVEL% ! EXIT /B %ERRORLEVEL% ) --- 56,61 ---- if ERRORLEVEL 1 ( ! echo ### Error : %ERRORLEVEL% ! EXIT /B %ERRORLEVEL% ) *************** *** 64,73 **** POPD if "_%HOME%_" == "__" ( ! set HOME=C:\TEMP\adobe-source ) if NOT EXIST "%HOME%" ( ! MkDir %HOME%\ ) --- 64,75 ---- POPD + set TEMP_HOME=C:\TEMP\adobe-source + if "_%HOME%_" == "__" ( ! set HOME=%TEMP_HOME% ) if NOT EXIST "%HOME%" ( ! MkDir %HOME%\ ) *************** *** 75,84 **** if NOT EXIST "%HOME%\user-config.jam" ( ! echo import msvc-config ; > %HOME%\user-config.jam ) if ERRORLEVEL 1 ( ! echo ### Error : %ERRORLEVEL% ! EXIT /B %ERRORLEVEL% ) --- 77,90 ---- if NOT EXIST "%HOME%\user-config.jam" ( ! echo import msvc-config ; > %HOME%\user-config.jam ! ) ! ! if "_%HOME%_" == "_%TEMP_HOME%_" ( ! echo import msvc-config ; > %HOME%\user-config.jam ) if ERRORLEVEL 1 ( ! echo ### Error : %ERRORLEVEL% ! EXIT /B %ERRORLEVEL% ) *************** *** 90,95 **** if ERRORLEVEL 1 ( ! echo ### Error : %ERRORLEVEL% ! EXIT /B %ERRORLEVEL% ) --- 96,101 ---- if ERRORLEVEL 1 ( ! echo ### Error : %ERRORLEVEL% ! EXIT /B %ERRORLEVEL% ) Index: install.sh =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/bin/install.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** install.sh 8 Aug 2005 16:37:09 -0000 1.2 --- install.sh 3 Feb 2006 18:20:41 -0000 1.3 *************** *** 33,39 **** if test_path cmd ; then ! echo_run $BJAM"/build.bat" else ! echo_run $BJAM"/build.sh" fi --- 33,39 ---- if test_path cmd ; then ! echo_run $BJAM"/build.bat" else ! echo_run $BJAM"/build.sh" fi Index: verify.sh =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/bin/verify.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** verify.sh 6 Oct 2005 20:43:12 -0000 1.3 --- verify.sh 3 Feb 2006 18:20:41 -0000 1.4 *************** *** 8,26 **** if [ "$1" != "" ]; then ! MODE="$1" fi if [ "$MODE" == "debug" ]; then ! BOOSTLIBEXT="-d" else ! BOOSTLIBEXT="" fi LIBRARY_SET=(\ ! third_party/boost_tp/boost/bin.v2/libs/filesystem/build/darwin/$MODE/arch-fat/link-static/threading-multi/libboost_filesystem-mt"$BOOSTLIBEXT"-1_33.a \ ! third_party/boost_tp/boost/bin.v2/libs/signals/build/darwin/$MODE/arch-fat/link-static/threading-multi/libboost_signals-mt"$BOOSTLIBEXT"-1_33.a \ ! third_party/boost_tp/boost/bin.v2/libs/thread/build/darwin/$MODE/arch-fat/link-static/threading-multi/libboost_thread-mt"$BOOSTLIBEXT"-1_33.a \ ! bin.v2/adobe/build/darwin/$MODE/arch-fat/asl-dev/link-static/threading-multi/libasl_dev.a \ ! bin.v2/adobe/future/widgets/darwin/$MODE/arch-fat/asl-dev/link-static/threading-multi/user-interface-gui/libadobe_widgets.a \ ) --- 8,26 ---- if [ "$1" != "" ]; then ! MODE="$1" fi if [ "$MODE" == "debug" ]; then ! BOOSTLIBEXT="-d" else ! BOOSTLIBEXT="" fi LIBRARY_SET=(\ ! third_party/boost_tp/boost/bin.v2/libs/filesystem/build/darwin/$MODE/arch-fat/link-static/threading-multi/libboost_filesystem-mt"$BOOSTLIBEXT"-1_33.a \ ! third_party/boost_tp/boost/bin.v2/libs/signals/build/darwin/$MODE/arch-fat/link-static/threading-multi/libboost_signals-mt"$BOOSTLIBEXT"-1_33.a \ ! third_party/boost_tp/boost/bin.v2/libs/thread/build/darwin/$MODE/arch-fat/link-static/threading-multi/libboost_thread-mt"$BOOSTLIBEXT"-1_33.a \ ! bin.v2/adobe/build/darwin/$MODE/arch-fat/asl-dev/link-static/threading-multi/libasl_dev.a \ ! bin.v2/adobe/future/widgets/darwin/$MODE/arch-fat/asl-dev/link-static/threading-multi/user-interface-gui/libadobe_widgets.a \ ) *************** *** 30,59 **** while [ $COUNTER != $SET_COUNT ]; do ! CURRENT_LIB="${LIBRARY_SET[$COUNTER]}" ! if [ ! -e $CURRENT_LIB ]; then ! BASENAME=`basename $CURRENT_LIB` ! DIRNAME=`dirname $CURRENT_LIB` ! if [ `uname` == "Darwin" ]; then ! osascript -e 'tell application "Finder"' -e 'activate' -e 'beep' -e "display alert \"Cannot find required file:\\n\\n\\t$BASENAME\\n\\nfor the $MODE build.\\n\\nPlease check the read_me.txt file in the ASL distribution for information on how to build this library.\" message \"Looked in directory \\\"$DIRNAME\\\"\" buttons \"OK\" default button \"OK\" as warning" -e "end tell" ! else ! echo "Cannot find required library file \"$BASENAME\" for the $MODE build. Please check the read_me.txt file in the ASL distribution for information on how to build this library." ! fi ! exit 1 ! # else ! # echo "Found \"`basename $CURRENT_LIB`\"" ! fi ! let COUNTER=COUNTER+1 done --- 30,59 ---- while [ $COUNTER != $SET_COUNT ]; do ! CURRENT_LIB="${LIBRARY_SET[$COUNTER]}" ! if [ ! -e $CURRENT_LIB ]; then ! BASENAME=`basename $CURRENT_LIB` ! DIRNAME=`dirname $CURRENT_LIB` ! if [ `uname` == "Darwin" ]; then ! osascript -e 'tell application "Finder"' -e 'activate' -e 'beep' -e "display alert \"Cannot find required file:\\n\\n\\t$BASENAME\\n\\nfor the $MODE build.\\n\\nPlease check the read_me.txt file in the ASL distribution for information on how to build this library.\" message \"Looked in directory \\\"$DIRNAME\\\"\" buttons \"OK\" default button \"OK\" as warning" -e "end tell" ! else ! echo "Cannot find required library file \"$BASENAME\" for the $MODE build. Please check the read_me.txt file in the ASL distribution for information on how to build this library." ! fi ! exit 1 ! # else ! # echo "Found \"`basename $CURRENT_LIB`\"" ! fi ! let COUNTER=COUNTER+1 done Index: build.sh =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/bin/build.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** build.sh 7 Nov 2005 18:00:37 -0000 1.4 --- build.sh 3 Feb 2006 18:20:41 -0000 1.5 *************** *** 22,30 **** # Assuming the client only needs to run this once, we always build bjam if [ -e bjam ]; then ! if test_path cmd ; then ! echo_run rm bjam.exe ! else ! echo_run rm bjam ! fi fi --- 22,30 ---- # Assuming the client only needs to run this once, we always build bjam if [ -e bjam ]; then ! if test_path cmd ; then ! echo_run rm bjam.exe ! else ! echo_run rm bjam ! fi fi *************** *** 33,56 **** cd ../../ if [ "$HOME" == "" ]; then ! HOME="/tmp/adobe-source" fi if [ ! -d "$HOME" ]; then ! echo_run mkdir -p "$HOME" fi ! if [ ! -e "$HOME/user-config.jam" ]; then ! if [ "`uname`" == "Darwin" ]; then ! echo "import toolset : using ; using darwin ;" > "$HOME/user-config.jam" ! else ! if [ -d "$PROGRAMFILES/Microsoft Visual Studio .NET 2003/" ]; then ! echo "import msvc-config ; import toolset : using ; using gcc ;" > "$HOME/user-config.jam" ! elif [ -d "$PROGRAMFILES/Microsoft Visual Studio 8/" ]; then ! echo "import msvc-config ; import toolset : using ; using gcc ;" > "$HOME/user-config.jam" ! else ! echo "import toolset : using ; using gcc ;" > "$HOME/user-config.jam" ! fi ! fi fi --- 33,58 ---- cd ../../ + TEMP_HOME="/tmp/adobe-source" + if [ "$HOME" == "" ]; then ! HOME=$TEMP_HOME fi if [ ! -d "$HOME" ]; then ! echo_run mkdir -p "$HOME" fi ! if [ ! -e "$HOME/user-config.jam" -o "$HOME" == "$TEMP_HOME"]; then ! if [ "`uname`" == "Darwin" ]; then ! echo "import toolset : using ; using darwin ;" > "$HOME/user-config.jam" ! else ! if [ -d "$PROGRAMFILES/Microsoft Visual Studio .NET 2003/" ]; then ! echo "import msvc-config ; import toolset : using ; using gcc ;" > "$HOME/user-config.jam" ! elif [ -d "$PROGRAMFILES/Microsoft Visual Studio 8/" ]; then ! echo "import msvc-config ; import toolset : using ; using gcc ;" > "$HOME/user-config.jam" ! else ! echo "import toolset : using ; using gcc ;" > "$HOME/user-config.jam" ! fi ! fi fi *************** *** 58,68 **** if [ "$1" != "" ]; then ! MODE=$1 fi if test_path cmd ; then ! echo_run adobe/bin/bjam msvc gcc $MODE else ! echo_run adobe/bin/bjam $MODE fi --- 60,70 ---- if [ "$1" != "" ]; then ! MODE=$1 fi if test_path cmd ; then ! echo_run adobe/bin/bjam msvc gcc $MODE else ! echo_run adobe/bin/bjam $MODE fi Index: asl_net_setup.bat =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/bin/asl_net_setup.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** asl_net_setup.bat 6 Jan 2006 18:35:03 -0000 1.6 --- asl_net_setup.bat 3 Feb 2006 18:20:41 -0000 1.7 *************** *** 1,5 **** @ECHO OFF ! set ASL_DISTRO_NAME=asl_1.0.12.zip set ASL_DIR_NAME=adobe-source set ASL_DISTRO_HOST=easynews.dl.sourceforge.net --- 1,5 ---- @ECHO OFF ! set ASL_DISTRO_NAME=asl_1.0.13.zip set ASL_DIR_NAME=adobe-source set ASL_DISTRO_HOST=easynews.dl.sourceforge.net *************** *** 15,74 **** if NOT EXIST %UNZIP_DISTRO_NAME% ( ! echo Getting unzip executable... ! echo cd pub/unix/archiving/info-zip/WIN32 > cmds.txt ! echo bin >> cmds.txt ! echo get %UNZIP_DISTRO_NAME% >> cmds.txt ! echo bye >> cmds.txt ! ftp -v -s:cmds.txt -A sunsite.icm.edu.pl ! del cmds.txt ) if NOT EXIST %CURL_DISTRO_NAME% ( ! echo Getting curl distribution... ! echo cd pub/www/utilities/curl > cmds.txt ! echo bin >> cmds.txt ! echo get %CURL_DISTRO_NAME% >> cmds.txt ! echo bye >> cmds.txt ! ftp -v -s:cmds.txt -A ftp.sunet.se ! del cmds.txt ) if NOT EXIST %UNZIP_EXE_NAME% ( ! echo Setting up unzip... ! mkdir unzip ! move unz552xN.exe unzip ! PUSHD unzip ! unz552xN.exe ! POPD ) if NOT EXIST %CURL_EXE_NAME% ( ! echo Extracting curl... ! %UNZIP_EXE_NAME% %CURL_DISTRO_NAME% ) if NOT "_%1%_" == "__" ( ! set ASL_DISTRO_HOST=%1% ) if NOT EXIST %ASL_DISTRO_NAME% ( ! echo Getting ASL distribution... ! %CURL_EXE_NAME% http://%ASL_DISTRO_HOST%/sourceforge/adobe-source/%ASL_DISTRO_NAME% -o %ASL_DISTRO_NAME% ) if NOT EXIST %BOOST_DISTRO_NAME% ( ! echo Getting Boost distribution... ! %CURL_EXE_NAME% http://easynews.dl.sourceforge.net/sourceforge/boost/%BOOST_DISTRO_NAME% -o %BOOST_DISTRO_NAME% ) --- 15,74 ---- if NOT EXIST %UNZIP_DISTRO_NAME% ( ! echo Getting unzip executable... ! echo cd pub/unix/archiving/info-zip/WIN32 > cmds.txt ! echo bin >> cmds.txt ! echo get %UNZIP_DISTRO_NAME% >> cmds.txt ! echo bye >> cmds.txt ! ftp -v -s:cmds.txt -A sunsite.icm.edu.pl ! del cmds.txt ) if NOT EXIST %CURL_DISTRO_NAME% ( ! echo Getting curl distribution... ! echo cd pub/www/utilities/curl > cmds.txt ! echo bin >> cmds.txt ! echo get %CURL_DISTRO_NAME% >> cmds.txt ! echo bye >> cmds.txt ! ftp -v -s:cmds.txt -A ftp.sunet.se ! del cmds.txt ) if NOT EXIST %UNZIP_EXE_NAME% ( ! echo Setting up unzip... ! mkdir unzip ! move unz552xN.exe unzip ! PUSHD unzip ! unz552xN.exe ! POPD ) if NOT EXIST %CURL_EXE_NAME% ( ! echo Extracting curl... ! %UNZIP_EXE_NAME% %CURL_DISTRO_NAME% ) if NOT "_%1%_" == "__" ( ! set ASL_DISTRO_HOST=%1% ) if NOT EXIST %ASL_DISTRO_NAME% ( ! echo Getting ASL distribution... ! %CURL_EXE_NAME% http://%ASL_DISTRO_HOST%/sourceforge/adobe-source/%ASL_DISTRO_NAME% -o %ASL_DISTRO_NAME% ) if NOT EXIST %BOOST_DISTRO_NAME% ( ! echo Getting Boost distribution... ! %CURL_EXE_NAME% http://easynews.dl.sourceforge.net/sourceforge/boost/%BOOST_DISTRO_NAME% -o %BOOST_DISTRO_NAME% ) *************** *** 76,107 **** if NOT EXIST %PATCH_DISTRO_NAME% ( ! echo Getting Win32 patch distribution... ! %CURL_EXE_NAME% http://easynews.dl.sourceforge.net/sourceforge/gnuwin32/%PATCH_DISTRO_NAME% -o %PATCH_DISTRO_NAME% ) if NOT EXIST %PATCH_EXE_NAME% ( ! echo Extracting patch... ! copy %PATCH_DISTRO_NAME% gnuwin32\ ! PUSHD gnuwin32\ ! ..\%UNZIP_EXE_NAME% %PATCH_DISTRO_NAME% > nul ! POPD ) if NOT EXIST %ASL_DIR_NAME% ( ! echo Extracting ASL distribution... ! %UNZIP_EXE_NAME% %ASL_DISTRO_NAME% > nul ) if NOT EXIST adobe-source\third_party\boost_tp\%BOOST_DIR_NAME% ( ! echo Setting up destination Boost directory, which could take a while... ! %UNZIP_EXE_NAME% %BOOST_DISTRO_NAME% > nul ! move %BOOST_DIR_NAME% adobe-source\third_party\boost_tp ) if NOT EXIST adobe-source\third_party\boost_tp\boost ( ! echo Setting up source Boost directory, which could take a while... ! PUSHD adobe-source\third_party\boost_tp ! xcopy %BOOST_DIR_NAME% boost /S /E /I /Y > nul ! POPD ) --- 76,107 ---- if NOT EXIST %PATCH_DISTRO_NAME% ( ! echo Getting Win32 patch distribution... ! %CURL_EXE_NAME% http://easynews.dl.sourceforge.net/sourceforge/gnuwin32/%PATCH_DISTRO_NAME% -o %PATCH_DISTRO_NAME% ) if NOT EXIST %PATCH_EXE_NAME% ( ! echo Extracting patch... ! copy %PATCH_DISTRO_NAME% gnuwin32\ ! PUSHD gnuwin32\ ! ..\%UNZIP_EXE_NAME% %PATCH_DISTRO_NAME% > nul ! POPD ) if NOT EXIST %ASL_DIR_NAME% ( ! echo Extracting ASL distribution... ! %UNZIP_EXE_NAME% %ASL_DISTRO_NAME% > nul ) if NOT EXIST adobe-source\third_party\boost_tp\%BOOST_DIR_NAME% ( ! echo Setting up destination Boost directory, which could take a while... ! %UNZIP_EXE_NAME% %BOOST_DISTRO_NAME% > nul ! move %BOOST_DIR_NAME% adobe-source\third_party\boost_tp ) if NOT EXIST adobe-source\third_party\boost_tp\boost ( ! echo Setting up source Boost directory, which could take a while... ! PUSHD adobe-source\third_party\boost_tp ! xcopy %BOOST_DIR_NAME% boost /S /E /I /Y > nul ! POPD ) Index: asl_net_setup.sh =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/bin/asl_net_setup.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** asl_net_setup.sh 6 Jan 2006 18:35:04 -0000 1.6 --- asl_net_setup.sh 3 Feb 2006 18:20:41 -0000 1.7 *************** *** 1,5 **** #!/bin/bash ! ASL_DISTRO_NAME=asl_1.0.12.tgz ASL_DISTRO_SITE=easynews.dl.sourceforge.net BOOST_NAME=boost_1_33_1 --- 1,5 ---- #!/bin/bash ! ASL_DISTRO_NAME=asl_1.0.13.tgz ASL_DISTRO_SITE=easynews.dl.sourceforge.net BOOST_NAME=boost_1_33_1 *************** *** 31,57 **** if [ "$1" != "" ]; then ! ASL_DISTRO_SITE="$1" fi if [ ! -e $ASL_DISTRO_NAME ]; then ! echo_run curl http://$ASL_DISTRO_SITE/sourceforge/adobe-source/$ASL_DISTRO_NAME -o $ASL_DISTRO_NAME fi if [ ! -e $BOOST_DISTRO_NAME ]; then ! echo_run curl http://easynews.dl.sourceforge.net/sourceforge/boost/$BOOST_DISTRO_NAME -o $BOOST_DISTRO_NAME fi if [ ! -d adobe-source ]; then ! echo_run tar -xzf $ASL_DISTRO_NAME fi if [ ! -d adobe-source/third_party/boost_tp/$BOOST_NAME ]; then ! echo_run tar -xzf $BOOST_DISTRO_NAME ! echo_run mv $BOOST_NAME adobe-source/third_party/boost_tp/ fi if [ ! -d adobe-source/third_party/boost_tp/boost ]; then ! echo_run tar -xzf $BOOST_DISTRO_NAME ! echo_run mv $BOOST_NAME adobe-source/third_party/boost_tp/boost fi --- 31,57 ---- if [ "$1" != "" ]; then ! ASL_DISTRO_SITE="$1" fi if [ ! -e $ASL_DISTRO_NAME ]; then ! echo_run curl http://$ASL_DISTRO_SITE/sourceforge/adobe-source/$ASL_DISTRO_NAME -o $ASL_DISTRO_NAME fi if [ ! -e $BOOST_DISTRO_NAME ]; then ! echo_run curl http://easynews.dl.sourceforge.net/sourceforge/boost/$BOOST_DISTRO_NAME -o $BOOST_DISTRO_NAME fi if [ ! -d adobe-source ]; then ! echo_run tar -xzf $ASL_DISTRO_NAME fi if [ ! -d adobe-source/third_party/boost_tp/$BOOST_NAME ]; then ! echo_run tar -xzf $BOOST_DISTRO_NAME ! echo_run mv $BOOST_NAME adobe-source/third_party/boost_tp/ fi if [ ! -d adobe-source/third_party/boost_tp/boost ]; then ! echo_run tar -xzf $BOOST_DISTRO_NAME ! echo_run mv $BOOST_NAME adobe-source/third_party/boost_tp/boost fi |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:21
|
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/examples Modified Files: enum_ops_example.cpp enum_ops_example_fail.cpp namespace.cpp namespace_fail.cpp specialization.cpp Log Message: asl 1.0.13 Index: enum_ops_example_fail.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/enum_ops_example_fail.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** enum_ops_example_fail.cpp 6 Oct 2005 20:43:16 -0000 1.1 --- enum_ops_example_fail.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2001 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2001 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 27,46 **** enum Foo ! { ! foo_4 = 1 << 2, ! foo_8 = 1 << 3 ! }; enum Bar ! { ! bar_4 = 1 << 2, ! bar_8 = 1 << 3 ! }; enum Baz ! { ! baz_4 = 1 << 2, ! baz_8 = 1 << 3 ! }; ADOBE_DEFINE_ARITHMETIC_OPS(Baz) --- 27,46 ---- enum Foo ! { ! foo_4 = 1 << 2, ! foo_8 = 1 << 3 ! }; enum Bar ! { ! bar_4 = 1 << 2, ! bar_8 = 1 << 3 ! }; enum Baz ! { ! baz_4 = 1 << 2, ! baz_8 = 1 << 3 ! }; ADOBE_DEFINE_ARITHMETIC_OPS(Baz) *************** *** 49,66 **** int main() ! { ! Foo a(foo_4); ! Bar b(bar_8); ! Foo c(a + b); // error! a and b are different enum types, so result is integral ! Baz d(baz_4); ! Baz e(baz_8); ! Baz f(d + e); // Ok, ADOBE_DEFINE_ARITHMETIC_OPS(Baz) is defined, so d + e has type Baz ! BOOST_TEST(c); ! BOOST_TEST(f); ! return boost::report_errors(); ! } // end_of_example --- 49,66 ---- int main() ! { ! Foo a(foo_4); ! Bar b(bar_8); ! Foo c(a + b); // error! a and b are different enum types, so result is integral ! Baz d(baz_4); ! Baz e(baz_8); ! Baz f(d + e); // Ok, ADOBE_DEFINE_ARITHMETIC_OPS(Baz) is defined, so d + e has type Baz ! BOOST_TEST(c); ! BOOST_TEST(f); ! return boost::report_errors(); ! } // end_of_example Index: enum_ops_example.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/enum_ops_example.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** enum_ops_example.cpp 6 Oct 2005 20:43:16 -0000 1.1 --- enum_ops_example.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2001 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2001 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 27,49 **** enum Foo ! { ! foo_4 = 1 << 2, ! foo_8 = 1 << 3 ! }; ADOBE_DEFINE_BITSET_OPS(Foo) int main() ! { ! Foo a(foo_4); ! Foo b(foo_8); ! Foo c(a | b); ! BOOST_TEST(a == 4L); ! BOOST_TEST(b == 8L); ! BOOST_TEST(c == 12L); ! return boost::report_errors(); ! } // end_of_example --- 27,49 ---- enum Foo ! { ! foo_4 = 1 << 2, ! foo_8 = 1 << 3 ! }; ADOBE_DEFINE_BITSET_OPS(Foo) int main() ! { ! Foo a(foo_4); ! Foo b(foo_8); ! Foo c(a | b); ! BOOST_TEST(a == 4L); ! BOOST_TEST(b == 8L); ! BOOST_TEST(c == 12L); ! return boost::report_errors(); ! } // end_of_example Index: specialization.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/specialization.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** specialization.cpp 3 May 2005 23:50:24 -0000 1.1 --- specialization.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 38,42 **** // ... }; ! } // my_namespace --- 38,42 ---- // ... }; ! } // my_namespace *************** *** 46,50 **** my_namespace::my_iterator std::find(my_namespace::my_iterator, my_namespace::my_iterator) { ! // do special find } --- 46,50 ---- my_namespace::my_iterator std::find(my_namespace::my_iterator, my_namespace::my_iterator) { ! // do special find } *************** *** 54,65 **** struct ptr_traits<my_namespace::my_class> { ! typedef my_namespace::my_class element_type; ! typedef element_type* pointer_type; ! typedef const element_type* const_pointer_type ! ! template <class U> struct rebind { typedef adobe::ptr_traits<U> other; }; ! enum { is_array = false }; ! ! static void delete_ptr(pointer_type x) throw() { delete x; } }; --- 54,65 ---- struct ptr_traits<my_namespace::my_class> { ! typedef my_namespace::my_class element_type; ! typedef element_type* pointer_type; ! typedef const element_type* const_pointer_type ! ! template <class U> struct rebind { typedef adobe::ptr_traits<U> other; }; ! enum { is_array = false }; ! ! static void delete_ptr(pointer_type x) throw() { delete x; } }; Index: namespace.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/namespace.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** namespace.cpp 3 May 2005 23:50:24 -0000 1.1 --- namespace.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 31,37 **** // Correct usage of namespace qualifiers ! adobe::forest<int> my_forest; ! ! adobe::find(my_forest, 5); } --- 31,37 ---- // Correct usage of namespace qualifiers ! adobe::forest<int> my_forest; ! ! adobe::find(my_forest, 5); } *************** *** 41,49 **** // Accepted usage of namespace qualifiers ! namespace asl = adobe; ! ! asl::forest<int> my_forest; ! ! asl::find(my_forest, 5); } --- 41,49 ---- // Accepted usage of namespace qualifiers ! namespace asl = adobe; ! ! asl::forest<int> my_forest; ! ! asl::find(my_forest, 5); } *************** *** 53,62 **** // This works - but is not recommended ! using namespace std; ! ! bool my_predicate(int); ! adobe::forest<int> my_forest; ! ! find_if(my_forest.begin(), my_forest.end(), &my_predicate); // calls std::find_if() } --- 53,62 ---- // This works - but is not recommended ! using namespace std; ! ! bool my_predicate(int); ! adobe::forest<int> my_forest; ! ! find_if(my_forest.begin(), my_forest.end(), &my_predicate); // calls std::find_if() } Index: namespace_fail.cpp =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/examples/namespace_fail.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** namespace_fail.cpp 3 May 2005 23:50:24 -0000 1.1 --- namespace_fail.cpp 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2004 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 32,41 **** // This results in an ambiguity and won't compile ! using namespace adobe; ! ! bool my_predicate(int); ! std::vector<int> my_vector; ! ! find_if(my_vector.begin(), my_vector.end(), &my_predicate); // adobe or std? } --- 32,41 ---- // This results in an ambiguity and won't compile ! using namespace adobe; ! ! bool my_predicate(int); ! std::vector<int> my_vector; ! ! find_if(my_vector.begin(), my_vector.end(), &my_predicate); // adobe or std? } |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:21
|
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/related In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/asl/related Modified Files: adam_language_reference.dox asl_overview.dox eve_language_reference.dox reference_expression_section.dox Log Message: asl 1.0.13 Index: asl_overview.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/related/asl_overview.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** asl_overview.dox 8 Aug 2005 16:37:10 -0000 1.3 --- asl_overview.dox 3 Feb 2006 18:20:42 -0000 1.4 *************** *** 20,54 **** \section asl_overview_toc Table of Contents \par ! - \ref asl_foreword ! -# \ref asl_overview_intro_to_adam_and_eve ! -# \ref asl_overview_terminology ! -# \ref asl_overview_history ! -# \ref asl_overview_goals_for_adam ! -# \ref asl_overview_adam_goal_1 ! -# \ref asl_overview_adam_goal_2 ! -# \ref asl_overview_adam_goal_3 ! -# \ref asl_overview_adam_goal_4 ! -# \ref asl_overview_adam_goal_5 ! -# \ref asl_overview_understanding_adam ! -# \ref asl_overview_understanding_adam_modelling_controller ! -# \ref asl_overview_adam_and_eve_architecture ! -# \ref asl_overview_adam_and_eve_architecture_overview ! -# \ref asl_overview_adam_and_eve_expression_language ! -# \ref asl_overview_adam_and_eve_adam ! -# \ref asl_overview_adam_and_eve_virtual_machine ! -# \ref asl_overview_adam_and_eve_eve2 ! -# \ref asl_overview_adam_and_eve_eve2_parser ! -# \ref asl_overview_adam_and_eve_eve2_types ! -# \ref asl_overview_adam_and_eve_eve2_ves ! -# \ref asl_overview_adam_and_eve_eve2_binding ! -# \ref asl_overview_adam_and_eve_eve2_guides ! -# \ref asl_overview_adam_and_eve_eve2_dynamic_evaluation ! -# \ref asl_overview_adam_and_eve_eve2_outsets_etc ! -# \ref asl_overview_library_integration ! -# \ref asl_overview_open_issues ! -# \ref asl_overview_grammars ! -# \ref asl_overview_future_ideas ! -# \ref asl_overview_future_ideas_expresso2 ! -# \ref asl_overview_future_ideas_eve2 \section asl_overview_intro_to_adam_and_eve Introduction to Adam and Eve --- 20,54 ---- \section asl_overview_toc Table of Contents \par ! - \ref asl_foreword ! -# \ref asl_overview_intro_to_adam_and_eve ! -# \ref asl_overview_terminology ! -# \ref asl_overview_history ! -# \ref asl_overview_goals_for_adam ! -# \ref asl_overview_adam_goal_1 ! -# \ref asl_overview_adam_goal_2 ! -# \ref asl_overview_adam_goal_3 ! -# \ref asl_overview_adam_goal_4 ! -# \ref asl_overview_adam_goal_5 ! -# \ref asl_overview_understanding_adam ! -# \ref asl_overview_understanding_adam_modelling_controller ! -# \ref asl_overview_adam_and_eve_architecture ! -# \ref asl_overview_adam_and_eve_architecture_overview ! -# \ref asl_overview_adam_and_eve_expression_language ! -# \ref asl_overview_adam_and_eve_adam ! -# \ref asl_overview_adam_and_eve_virtual_machine ! -# \ref asl_overview_adam_and_eve_eve2 ! -# \ref asl_overview_adam_and_eve_eve2_parser ! -# \ref asl_overview_adam_and_eve_eve2_types ! -# \ref asl_overview_adam_and_eve_eve2_ves ! -# \ref asl_overview_adam_and_eve_eve2_binding ! -# \ref asl_overview_adam_and_eve_eve2_guides ! -# \ref asl_overview_adam_and_eve_eve2_dynamic_evaluation ! -# \ref asl_overview_adam_and_eve_eve2_outsets_etc ! -# \ref asl_overview_library_integration ! -# \ref asl_overview_open_issues ! -# \ref asl_overview_grammars ! -# \ref asl_overview_future_ideas ! -# \ref asl_overview_future_ideas_expresso2 ! -# \ref asl_overview_future_ideas_eve2 \section asl_overview_intro_to_adam_and_eve Introduction to Adam and Eve *************** *** 81,91 **** \par Goals: ! -# Make it easier to specify and modify the layout of a human interface. ! -# Have a single definition of the interface for all platforms. ! -# Have a single definition of the interface for all languages. \par Requirements: ! -# Must allow piecemeal incorporation into an application, freeing the entire human interface from being converted to Eve in one pass. ! -# Generate layouts as good or better than those generated by hand. \par Meeting this requirement 1 led to architecture for Eve that is easy to incorporate into most any application framework. --- 81,91 ---- \par Goals: ! -# Make it easier to specify and modify the layout of a human interface. ! -# Have a single definition of the interface for all platforms. ! -# Have a single definition of the interface for all languages. \par Requirements: ! -# Must allow piecemeal incorporation into an application, freeing the entire human interface from being converted to Eve in one pass. ! -# Generate layouts as good or better than those generated by hand. \par Meeting this requirement 1 led to architecture for Eve that is easy to incorporate into most any application framework. *************** *** 126,134 **** { output: ! result <== { path: path, flatness: flatness }; interface: ! unlink flatness : 0.0 <== (path == empty) ? 0.0 : flatness; ! path : 1; } \endverbatim --- 126,134 ---- { output: ! result <== { path: path, flatness: flatness }; interface: ! unlink flatness : 0.0 <== (path == empty) ? 0.0 : flatness; ! path : 1; } \endverbatim *************** *** 226,234 **** { output: ! result <== { path: path, flatness: flatness }; interface: ! unlink flatness : 0.0 <== (path == empty) ? 0.0 : flatness; ! path : 1; } \endverbatim --- 226,234 ---- { output: ! result <== { path: path, flatness: flatness }; interface: ! unlink flatness : 0.0 <== (path == empty) ? 0.0 : flatness; ! path : 1; } \endverbatim *************** *** 242,259 **** \par As C++ code, this statement would simply mean: ! - When executed, evaluate \c path's output and assign \c empty or \c flatness' input to \c flatness' output accordingly. \par As an Adam statement the following is implied: ! - Whenever \c path's output is modified, assign either \c flatness' input or \c empty to \c flatness' output. ! - If \c path's output does not equal \c empty, and \c flatness' input is modified, then update \c flatness' output. \par Further, the following queries can be made: ! - Given a current state, which input cells have an effect upon output cells? ! - Given a current state, upon which input values is \c flatness' output dependent? ! - Which of the values upon which \c flatness' output is currently dependent was updated most recently? \par And, finally, actions can be associated with the results of any of the above statements - such as: ! - When \c flatness' output is modified, update the display. ! - Set the enabled state of the edit text field associated with \c flatness' input according to whether \c flatness' input affects any output values, and update it when that state changes. \par The more inter-related statements there are in a sheet, the higher the effective expressive power of Adam is relative to a traditional event model. The single statement above replaces a 57 line (15 statements by semicolon count) function in Photoshop. --- 242,259 ---- \par As C++ code, this statement would simply mean: ! - When executed, evaluate \c path's output and assign \c empty or \c flatness' input to \c flatness' output accordingly. \par As an Adam statement the following is implied: ! - Whenever \c path's output is modified, assign either \c flatness' input or \c empty to \c flatness' output. ! - If \c path's output does not equal \c empty, and \c flatness' input is modified, then update \c flatness' output. \par Further, the following queries can be made: ! - Given a current state, which input cells have an effect upon output cells? ! - Given a current state, upon which input values is \c flatness' output dependent? ! - Which of the values upon which \c flatness' output is currently dependent was updated most recently? \par And, finally, actions can be associated with the results of any of the above statements - such as: ! - When \c flatness' output is modified, update the display. ! - Set the enabled state of the edit text field associated with \c flatness' input according to whether \c flatness' input affects any output values, and update it when that state changes. \par The more inter-related statements there are in a sheet, the higher the effective expressive power of Adam is relative to a traditional event model. The single statement above replaces a 57 line (15 statements by semicolon count) function in Photoshop. *************** *** 335,340 **** \section asl_overview_open_issues Appendix - Other Open Issues \par ! - Currently Adam is loosely typed. It may be desirable to be able to declare a type for a cell and have the type enforced. If this is done, then a qualifier "optional" will be added to denote that the field could also contain "empty". ! - Investigating XForms. Structured sheets and sheet inclusion. \section asl_overview_grammars Appendix - Grammars --- 335,340 ---- \section asl_overview_open_issues Appendix - Other Open Issues \par ! - Currently Adam is loosely typed. It may be desirable to be able to declare a type for a cell and have the type enforced. If this is done, then a qualifier "optional" will be added to denote that the field could also contain "empty". ! - Investigating XForms. Structured sheets and sheet inclusion. \section asl_overview_grammars Appendix - Grammars *************** *** 343,349 **** \par There are currently four grammars. They can be found in the following files: ! - \ref adam_reference ! - \ref eve_reference ! - \ref expression_reference (describes the lexical grammar and the expression grammar) \section asl_overview_future_ideas Appendix - Future Ideas --- 343,349 ---- \par There are currently four grammars. They can be found in the following files: ! - \ref adam_reference ! - \ref eve_reference ! - \ref expression_reference (describes the lexical grammar and the expression grammar) \section asl_overview_future_ideas Appendix - Future Ideas Index: eve_language_reference.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/related/eve_language_reference.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** eve_language_reference.dox 28 Feb 2005 20:48:54 -0000 1.1 --- eve_language_reference.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 7,19 **** The language is divided into three parts, \ref expression_lexical_conventions, \ref expression_expressions, and \ref view_declarations. The first two parts are shared by the Adam Language, and describe in the \ref expression_reference. ! \section view_declarations View Declarations ! \subsection eve_grammar Eve Grammar \verbatim view_definition = [lead_comment] view_class_decl ((";" [trail_comment]) ! | ([trail_comment] view_statement_list). view_statment_sequence = { view_definition }. view_class_decl = ident "(" [ named_argument_list ] ")". view_statment_list = "{" view_statement_sequence "}". \endverbatim */ --- 7,87 ---- The language is divided into three parts, \ref expression_lexical_conventions, \ref expression_expressions, and \ref view_declarations. The first two parts are shared by the Adam Language, and describe in the \ref expression_reference. ! \section view_declarations Layout Declarations ! \subsection eve_grammar Layout Grammar \verbatim + layout_specifier = [lead_comment] "layout" identifier "{" { qualified_cell_decl } + "view" view_definition "}" [trail_comment]. + + qualified_cell_decl = interface_set_decl | constant_set_decl. + + interface_set_decl = "interface" ":" { cell_decl }. + constant_set_decl = "constant" ":" { cell_decl }. + + cell_decl = [lead_comment] identifier initializer end_statement. + initializer = ":" expression. + view_definition = [lead_comment] view_class_decl ((";" [trail_comment]) ! | ([trail_comment] view_statement_list)). view_statment_sequence = { view_definition }. view_class_decl = ident "(" [ named_argument_list ] ")". view_statment_list = "{" view_statement_sequence "}". + + end_statement = ";" [trail_comment]. + + keywords += "layout" | "view" | "interface" | "constant". + \endverbatim + + A layout declaration consists of two parts - a block of cell declarations and a view instance. Here is an example of a simple layout declaration: + + \verbatim + layout simple_dialog + { + constant: + dialog_name: "Hello"; + + view dialog(name: dialog_name) + { + button(name: "World!"); + } + } + \endverbatim + + The identifier "simple_dialog" names this layout [NOTE: This identifier is currently unused by the system but intended for future use]. + + The first part, beginning with the qualifier "constant:", declares cells. A layout cell is similar to a sheet cell [include reference here to adam sheets] but currently more limited. A cell is followed by an initializer, the string "Hello" in our example. The initializers can be any valid expression and are evaluated in the order they are declared. A cell name may be used as a variable name in any expression after the declaration. Here the cell dialog_name is used as a variable to set the name of the dialog instance. + + The second part of the layout is the view instance, beginning with the keyword "view". This consists of a nested set of view class declarations. Here "dialog(name: dialog_name)" declares a "dialog" with the property "name" and the value "Hello". A layout does not ascribe meaning to the view class or view class properties, the particular set of view classes and properties is dependent on the API upon which the layout engine and parser are integrated. ASL does provide a common set of view classes for the Mac OS X Carbon and Win32 APIs which should serve as an example for integrating with any API. [include reference to widget library here.] + + The other type of cell supported by layouts are interface cells. An interface cell can be bound against from within the view instance. This is a runtime binding (unlink using a cell as a variable which is evaluated once at parse time). This is useful for maintaining view specific state such as which panel in a tab group is shown: + + \verbatim + layout simple_tab_group + { + interface: + visible_panel: @first_panel; // default to first panel + + view dialog(name: "Simple Tab Group") + { + tab_group( bind: @visible_panel, + items: [ + {name: "Panel 1", value: @first_panel}, + {name: "Panel 2", value: @second_panel} + ]) + { + panel(value: @first_panel, bind: @visible_panel) + { + static_text(name: "Contents of first panel."); + } + + panel(value: @second_panel, bind: @visible_panel) + { + static_text(name: "Contents of second panel."); + } + } + } + } \endverbatim + + This layout will construct a dialog with a tab group with two panels which can be flipped between. Which panel is visible is controlled by the interface cell "visible_panel". [NOTE: In a future release the layout state will be easily persisted including the current window size, if it is grow-able, and position.]. */ Index: adam_language_reference.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/related/adam_language_reference.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adam_language_reference.dox 2 Apr 2005 05:47:35 -0000 1.2 --- adam_language_reference.dox 3 Feb 2006 18:20:42 -0000 1.3 *************** *** 11,50 **** \subsection adam_grammar Adam Grammar \verbatim ! translation_unit = { sheet_specifier }. ! sheet_specifier = [lead_comment] "sheet" identifier "{" { qualified_cell_decl } "}" ! [trail_comment]. ! qualified_cell_decl = interface_set_decl | input_set_decl | output_set_decl ! | constant_set_decl | logic_set_decl | invariant_set_decl. ! interface_set_decl = "interface" ":" { [lead_comment] interface_cell_decl }. ! input_set_decl = "input" ":" { [lead_comment] input_cell_decl }. ! output_set_decl = "output" ":" { [lead_comment] output_cell_decl }. ! constant_set_decl = "constant" ":" { [lead_comment] constant_cell_decl }. ! logic_set_decl = "logic" ":" { [lead_comment] logic_cell_decl }. ! invariant_set_decl = "invariant" ":" { [lead_comment] invariant_cell_decl }. ! interface_cell_decl = ["unlink"] identifier [initializer] [define_expression] end_statement. ! input_cell_decl = identifier [initializer] end_statement. ! output_cell_decl = named_decl. ! constant_cell_decl = identifier initializer end_statement. ! logic_cell_decl = named_decl | relate_decl. ! invariant_cell_decl = named_decl. ! relate_decl = [conditional] "relate" "{" relate_expression relate_expression ! { relate_expression } "}" [trail_comment]. ! relate_expression = [lead_comment] named_decl. ! named_decl = identifier define_expression end_statement. ! initializer = ":" expression. ! conditional = "when" "(" expression ")". ! define_expression = "<==" expression. ! end_statement = ";" [trail_comment]. ! keywords += "sheet" | "interface" | "input" | "output" | "constant" | "logic" ! | "invariant" | "unlink" | "when" | "relate" \endverbatim --- 11,50 ---- \subsection adam_grammar Adam Grammar \verbatim ! translation_unit = { sheet_specifier }. ! sheet_specifier = [lead_comment] "sheet" identifier "{" { qualified_cell_decl } "}" ! [trail_comment]. ! qualified_cell_decl = interface_set_decl | input_set_decl | output_set_decl ! | constant_set_decl | logic_set_decl | invariant_set_decl. ! interface_set_decl = "interface" ":" { [lead_comment] interface_cell_decl }. ! input_set_decl = "input" ":" { [lead_comment] input_cell_decl }. ! output_set_decl = "output" ":" { [lead_comment] output_cell_decl }. ! constant_set_decl = "constant" ":" { [lead_comment] constant_cell_decl }. ! logic_set_decl = "logic" ":" { [lead_comment] logic_cell_decl }. ! invariant_set_decl = "invariant" ":" { [lead_comment] invariant_cell_decl }. ! interface_cell_decl = ["unlink"] identifier [initializer] [define_expression] end_statement. ! input_cell_decl = identifier [initializer] end_statement. ! output_cell_decl = named_decl. ! constant_cell_decl = identifier initializer end_statement. ! logic_cell_decl = named_decl | relate_decl. ! invariant_cell_decl = named_decl. ! relate_decl = [conditional] ("relate" | "weak") "{" relate_expression relate_expression ! { relate_expression } "}" [trail_comment]. ! relate_expression = [lead_comment] named_decl. ! named_decl = identifier define_expression end_statement. ! initializer = ":" expression. ! conditional = "when" "(" expression ")". ! define_expression = "<==" expression. ! end_statement = ";" [trail_comment]. ! keywords += "sheet" | "interface" | "input" | "output" | "constant" | "logic" ! | "invariant" | "unlink" | "when" | "relate" | "weak" \endverbatim *************** *** 65,69 **** adobe::value_t get_image(const adobe::array_t& parameters) { ! return adobe::value_t(get_image(parameters[0].get<std::string>().c_str())); } \endcode --- 65,69 ---- adobe::value_t get_image(const adobe::array_t& parameters) { ! return adobe::value_t(get_image(parameters[0].get<std::string>().c_str())); } \endcode *************** *** 76,82 **** adobe::value_t blur_image(const adobe::array_t& parameters) { ! image_type result = parameters[0].get<image_type>(); ! guassian_blur(result); ! return result; } \endcode --- 76,82 ---- adobe::value_t blur_image(const adobe::array_t& parameters) { ! image_type result = parameters[0].get<image_type>(); ! guassian_blur(result); ! return result; } \endcode Index: reference_expression_section.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/related/reference_expression_section.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** reference_expression_section.dox 28 Feb 2005 20:48:54 -0000 1.1 --- reference_expression_section.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 18,23 **** number = digits ["e" ["+" | "-"]] digits. ! quoted_string = '"' {character} '"' | "'" {character} "'". ! digits = digit { digit }. \endverbatim --- 18,23 ---- number = digits ["e" ["+" | "-"]] digits. ! quoted_string = '"' {character} '"' | "'" {character} "'". ! digits = digit { digit }. \endverbatim *************** *** 42,75 **** \subsection expression_grammar Expression Grammar \verbatim ! expression = or_expression ["?" expression ":" expression]. ! or_expression = and_expression { "||" and_expression }. ! and_expression = equality_expression { "&&" equality_expression }. ! equality_expression = relational_expression { ("==" | "!=") relational_expression }. ! relational_expression = additive_expression { ("<" | ">" | "<=" | ">=") additive_expression }. ! additive_expression = multiplicative_expression { ("+" | "-") multiplicative_expression }. ! multiplicative_expression = unary_expression { ("*" | "/" | "%") unary_expression }. ! unary_expression = postfix_expression | (unary_operator unary_expression). ! unary_operator = "+" | "-" | "!". ! postfix_expression = primary_expression { ("[" expression "]") | ("." identifier) }. ! primary_expression = name | number | boolean | string | "empty" | array | dictionary ! | variable_or_fuction | ( "(" expression ")" ). ! variable_or_function = identifier ["(" [argument_expression_list] ")"]. ! array = "[" [argument_list] "]". ! dictionary = "{" named_argument_list "}". ! argument_expression_list = named_argument_list | argument_list. ! argument_list = expression { "," expression }. ! named_argument_list = named_argument { "," named_argument }. ! named_argument = identifier ":" expression. ! name = "@" identifier. ! boolean = "true" | "false". \endverbatim --- 42,75 ---- \subsection expression_grammar Expression Grammar \verbatim ! expression = or_expression ["?" expression ":" expression]. ! or_expression = and_expression { "||" and_expression }. ! and_expression = equality_expression { "&&" equality_expression }. ! equality_expression = relational_expression { ("==" | "!=") relational_expression }. ! relational_expression = additive_expression { ("<" | ">" | "<=" | ">=") additive_expression }. ! additive_expression = multiplicative_expression { ("+" | "-") multiplicative_expression }. ! multiplicative_expression = unary_expression { ("*" | "/" | "%") unary_expression }. ! unary_expression = postfix_expression | (unary_operator unary_expression). ! unary_operator = "+" | "-" | "!". ! postfix_expression = primary_expression { ("[" expression "]") | ("." identifier) }. ! primary_expression = name | number | boolean | string | "empty" | array | dictionary ! | variable_or_fuction | ( "(" expression ")" ). ! variable_or_function = identifier ["(" [argument_expression_list] ")"]. ! array = "[" [argument_list] "]". ! dictionary = "{" named_argument_list "}". ! argument_expression_list = named_argument_list | argument_list. ! argument_list = expression { "," expression }. ! named_argument_list = named_argument { "," named_argument }. ! named_argument = identifier ":" expression. ! name = "@" identifier. ! boolean = "true" | "false". \endverbatim |
From: Foster B. <fos...@us...> - 2006-02-03 18:21:21
|
Update of /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031/adobe/documentation/sources/asl/concepts Modified Files: concept_assignable.dox concept_convertible_to_bool.dox concept_convertible_to_function.dox concept_convertible_to_range.dox concept_defaultconstructible.dox concept_equalitycomparable.dox concept_lessthancomparable.dox concept_regular_type.dox concept_transform_function.dox Log Message: asl 1.0.13 Index: concept_transform_function.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_transform_function.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** concept_transform_function.dox 28 Feb 2005 20:48:54 -0000 1.1 --- concept_transform_function.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 28,32 **** \refinement_of ! - UnaryFunction \associated_types --- 28,32 ---- \refinement_of ! - UnaryFunction \associated_types *************** *** 34,57 **** \notation <table> ! <tr> ! <td valign="top"><code>F</code></td> ! <td valign="top">A type that is a model of TransformFunction</td> ! </tr> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">Argument type of F</td> ! </tr> ! <tr> ! <td valign="top"><code>Result</code></td> ! <td valign="top">Result type of F</td> ! </tr> ! <tr> ! <td valign="top"><code>f</code></td> ! <td valign="top">Object of type <code>F</code></td> ! </tr> ! <tr> ! <td valign="top"><code>x</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> </table> --- 34,57 ---- \notation <table> ! <tr> ! <td valign="top"><code>F</code></td> ! <td valign="top">A type that is a model of TransformFunction</td> ! </tr> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">Argument type of F</td> ! </tr> ! <tr> ! <td valign="top"><code>Result</code></td> ! <td valign="top">Result type of F</td> ! </tr> ! <tr> ! <td valign="top"><code>f</code></td> ! <td valign="top">Object of type <code>F</code></td> ! </tr> ! <tr> ! <td valign="top"><code>x</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> </table> *************** *** 65,69 **** \invariants ! - The expression <code>f(x)</code> is <i>not</i> permitted to change <code>f</code>'s state. \models --- 65,69 ---- \invariants ! - The expression <code>f(x)</code> is <i>not</i> permitted to change <code>f</code>'s state. \models Index: concept_equalitycomparable.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_equalitycomparable.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** concept_equalitycomparable.dox 28 Feb 2005 20:48:54 -0000 1.1 --- concept_equalitycomparable.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 33,44 **** \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of EqualityComparable</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code>, <code>y</code>, <code>z</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> </table> --- 33,44 ---- \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of EqualityComparable</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code>, <code>y</code>, <code>z</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> </table> *************** *** 47,86 **** \valid_expressions <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Equality</td> ! <td valign="top"><code>x == y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> ! <tr> ! <td valign="top">Inequality</td> ! <td valign="top"><code>x != y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> </table> \expression_semantics <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">Equality</td> ! <td valign="top"><code>x == y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code>==</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Inequality</td> ! <td valign="top"><code>x != y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code>==</code></td> ! <td valign="top">Equivalent to <code>!(x == y)</code></td> ! <td valign="top"> </td> ! </tr> </table> --- 47,86 ---- \valid_expressions <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Equality</td> ! <td valign="top"><code>x == y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> ! <tr> ! <td valign="top">Inequality</td> ! <td valign="top"><code>x != y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> </table> \expression_semantics <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">Equality</td> ! <td valign="top"><code>x == y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code>==</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Inequality</td> ! <td valign="top"><code>x != y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code>==</code></td> ! <td valign="top">Equivalent to <code>!(x == y)</code></td> ! <td valign="top"> </td> ! </tr> </table> *************** *** 89,117 **** \invariants <table border> ! <tr> ! <td valign="top">Identity</td> ! <td valign="top"><code>&x == &y</code> implies <code>x</code> == <code>y</code></td> ! </tr> ! <tr> ! <td valign="top">Reflexivity</td> ! <td valign="top"><code>x == x</code></td> ! </tr> ! <tr> ! <td valign="top">Symmetry</td> ! <td valign="top"><code>x == y</code> implies <code>y == x</code></td> ! </tr> ! <tr> ! <td valign="top">Transitivity</td> ! <td valign="top"><code>x == y</code> and <code>y == z</code> implies <code>x == z</code></td> ! </tr> </table> \models ! - int ! - <code>std::vector<T></code> \notes \see_also ! - \ref stldoc_LessThanComparable */ --- 89,117 ---- \invariants <table border> ! <tr> ! <td valign="top">Identity</td> ! <td valign="top"><code>&x == &y</code> implies <code>x</code> == <code>y</code></td> ! </tr> ! <tr> ! <td valign="top">Reflexivity</td> ! <td valign="top"><code>x == x</code></td> ! </tr> ! <tr> ! <td valign="top">Symmetry</td> ! <td valign="top"><code>x == y</code> implies <code>y == x</code></td> ! </tr> ! <tr> ! <td valign="top">Transitivity</td> ! <td valign="top"><code>x == y</code> and <code>y == z</code> implies <code>x == z</code></td> ! </tr> </table> \models ! - int ! - <code>std::vector<T></code> \notes \see_also ! - \ref stldoc_LessThanComparable */ Index: concept_lessthancomparable.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_lessthancomparable.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** concept_lessthancomparable.dox 28 Feb 2005 20:48:54 -0000 1.1 --- concept_lessthancomparable.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 35,46 **** \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of LessThanComparable</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code>, <code>y</code>, <code>z</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> </table> --- 35,46 ---- \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of LessThanComparable</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code>, <code>y</code>, <code>z</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> </table> *************** *** 57,122 **** \valid_expressions <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Less</td> ! <td valign="top"><code>x < y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> ! <tr> ! <td valign="top">Greater</td> ! <td valign="top"><code>x > y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> ! <tr> ! <td valign="top">Less or equal</td> ! <td valign="top"><code>x <= y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> ! <tr> ! <td valign="top">Greater or equal</td> ! <td valign="top"><code>x >= y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> </table> \expression_semantics <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">Less</td> ! <td valign="top"><code>x < y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code><</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Greater</td> ! <td valign="top"><code>x > y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code><</code></td> ! <td valign="top">Equivalent to <code>y < x</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Less or equal</td> ! <td valign="top"><code>x <= y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code><</code></td> ! <td valign="top">Equivalent to <code>!(y < x)</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Greater or equal</td> ! <td valign="top"><code>x >= y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code><</code></td> ! <td valign="top">Equivalent to <code>!(x < y)</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! </tr> </table> --- 57,122 ---- \valid_expressions <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Less</td> ! <td valign="top"><code>x < y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> ! <tr> ! <td valign="top">Greater</td> ! <td valign="top"><code>x > y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> ! <tr> ! <td valign="top">Less or equal</td> ! <td valign="top"><code>x <= y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> ! <tr> ! <td valign="top">Greater or equal</td> ! <td valign="top"><code>x >= y</code></td> ! <td valign="top"> </td> ! <td valign="top">Convertible to <code>bool</code></td> ! </tr> </table> \expression_semantics <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">Less</td> ! <td valign="top"><code>x < y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code><</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Greater</td> ! <td valign="top"><code>x > y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code><</code></td> ! <td valign="top">Equivalent to <code>y < x</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Less or equal</td> ! <td valign="top"><code>x <= y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code><</code></td> ! <td valign="top">Equivalent to <code>!(y < x)</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Greater or equal</td> ! <td valign="top"><code>x >= y</code></td> ! <td valign="top"><code>x</code> and <code>y</code> are in the domain of <code><</code></td> ! <td valign="top">Equivalent to <code>!(x < y)</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! </tr> </table> *************** *** 125,145 **** \invariants <table border> ! <tr> ! <td valign="top">Irreflexivity</td> ! <td valign="top"><code>x < x</code> must be false.</td> ! </tr> ! <tr> ! <td valign="top">Antisymmetry</td> ! <td valign="top"><code>x < y</code> implies !(y < x) <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Transitivity</td> ! <td valign="top"><code>x < y</code> and <code>y < z</code> implies <code>x < z</code> <A href="#3">[3]</A></td> ! </tr> </table> \models ! - int ! - adobe::name_t \notes --- 125,145 ---- \invariants <table border> ! <tr> ! <td valign="top">Irreflexivity</td> ! <td valign="top"><code>x < x</code> must be false.</td> ! </tr> ! <tr> ! <td valign="top">Antisymmetry</td> ! <td valign="top"><code>x < y</code> implies !(y < x) <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Transitivity</td> ! <td valign="top"><code>x < y</code> and <code>y < z</code> implies <code>x < z</code> <A href="#3">[3]</A></td> ! </tr> </table> \models ! - int ! - adobe::name_t \notes *************** *** 154,157 **** \see_also ! - \ref stldoc_EqualityComparable */ --- 154,157 ---- \see_also ! - \ref stldoc_EqualityComparable */ Index: concept_assignable.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_assignable.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** concept_assignable.dox 28 Feb 2005 20:48:54 -0000 1.1 --- concept_assignable.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 33,44 **** \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of Assignable</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code>, <code>y</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> </table> --- 33,44 ---- \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of Assignable</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code>, <code>y</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> </table> *************** *** 47,125 **** \valid_expressions <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"><code>X(x)</code></td> ! <td valign="top"> </td> ! <td valign="top"><code>X</code></td> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"> <pre>X x(y); X x = y; </pre> ! </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Assignment</td> ! <td valign="top"><code>x = y</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! <td valign="top"><code>X&</code></td> ! </tr> ! <tr> ! <td valign="top">Swap</td> ! <td valign="top"><code>adobe::swap(x,y)</code></td> ! <td valign="top"> </td> ! <td valign="top"><code>void</code></td> ! </tr> </table> \expression_semantics <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"><code>X(x)</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"><code>X(x)</code> is a copy of <code>x</code> <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"><code>X(x)</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"><code>X(x)</code> is a copy of <code>x</code> <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"> <pre>X x(y); X x = y; </pre> ! </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"><code>x</code> is a copy of <code>y</code> <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Assignment</td> ! <td valign="top"><code>x</code> = <code>y</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"><code>x</code> is a copy of <code>y</code> <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Swap</td> ! <td valign="top"><code>adobe::swap(x,y)</code><A href="#3">[3]</A></td> ! <td valign="top"> </td> ! <td valign="top"> Equivalent to <pre>{ X tmp = x; --- 47,125 ---- \valid_expressions <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"><code>X(x)</code></td> ! <td valign="top"> </td> ! <td valign="top"><code>X</code></td> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"> <pre>X x(y); X x = y; </pre> ! </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Assignment</td> ! <td valign="top"><code>x = y</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! <td valign="top"><code>X&</code></td> ! </tr> ! <tr> ! <td valign="top">Swap</td> ! <td valign="top"><code>adobe::swap(x,y)</code></td> ! <td valign="top"> </td> ! <td valign="top"><code>void</code></td> ! </tr> </table> \expression_semantics <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"><code>X(x)</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"><code>X(x)</code> is a copy of <code>x</code> <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"><code>X(x)</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"><code>X(x)</code> is a copy of <code>x</code> <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Copy constructor</td> ! <td valign="top"> <pre>X x(y); X x = y; </pre> ! </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"><code>x</code> is a copy of <code>y</code> <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Assignment</td> ! <td valign="top"><code>x</code> = <code>y</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"><code>x</code> is a copy of <code>y</code> <A href="#2">[2]</A></td> ! </tr> ! <tr> ! <td valign="top">Swap</td> ! <td valign="top"><code>adobe::swap(x,y)</code><A href="#3">[3]</A></td> ! <td valign="top"> </td> ! <td valign="top"> Equivalent to <pre>{ X tmp = x; *************** *** 128,134 **** } </pre> ! </td> ! <td valign="top"> </td> ! </tr> </table> --- 128,134 ---- } </pre> ! </td> ! <td valign="top"> </td> ! </tr> </table> *************** *** 138,142 **** \models ! - int \notes --- 138,142 ---- \models ! - int \notes *************** *** 154,159 **** \see_also ! - \ref stldoc_DefaultConstructible ! - \ref stldoc_EqualityComparable */ --- 154,159 ---- \see_also ! - \ref stldoc_DefaultConstructible ! - \ref stldoc_EqualityComparable */ Index: concept_regular_type.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_regular_type.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** concept_regular_type.dox 3 Mar 2005 06:58:16 -0000 1.2 --- concept_regular_type.dox 3 Feb 2006 18:20:42 -0000 1.3 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. the intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. the intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 28,34 **** \refinement_of ! - \ref stldoc_DefaultConstructible ! - \ref stldoc_Assignable ! - \ref stldoc_EqualityComparable \notation --- 28,34 ---- \refinement_of ! - \ref stldoc_DefaultConstructible ! - \ref stldoc_Assignable ! - \ref stldoc_EqualityComparable \notation *************** *** 41,51 **** \models ! - adobe::name_t ! - adobe::copy_on_write \notes \see_also ! - Alex Stepanov's paper on the <a href="http://www.stepanovpapers.com/DeSt98.pdf">concept of regular types</a>. */ --- 41,51 ---- \models ! - adobe::name_t ! - adobe::copy_on_write \notes \see_also ! - Alex Stepanov's paper on the <a href="http://www.stepanovpapers.com/DeSt98.pdf">concept of regular types</a>. */ Index: concept_convertible_to_function.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_convertible_to_function.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** concept_convertible_to_function.dox 7 Nov 2005 18:00:41 -0000 1.2 --- concept_convertible_to_function.dox 3 Feb 2006 18:20:42 -0000 1.3 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 26,34 **** \description A ConvertibleToFunction is simply something which can be invoked using function notation - or something that \c boost::bind can convert to a function. Specifically, a ConvertibleToFunction can be: ! - A pointer to a function ! - A pointer to a class or struct data member (argument is a pointer or a reference to a struct/class instance) ! - A pointer to a class or struct member function (first argument is a pointer or a reference to a struct/class instance; Member function arguments follow in order) ! - A \c boost::reference_wrapper to a ConvertibleToFunction ! - A function object Where functions are passed as template parameters in the Adobe Source Libraries, any ConvertibleToFunction may be used. The idea is that <code>boost::bind(x, ...);</code> is a valid expression where <code>...</code> are arguments to <code>x</code>. <code>x</code>, in this case, is ConvertibleToFunction. --- 26,34 ---- \description A ConvertibleToFunction is simply something which can be invoked using function notation - or something that \c boost::bind can convert to a function. Specifically, a ConvertibleToFunction can be: ! - A pointer to a function ! - A pointer to a class or struct data member (argument is a pointer or a reference to a struct/class instance) ! - A pointer to a class or struct member function (first argument is a pointer or a reference to a struct/class instance; Member function arguments follow in order) ! - A \c boost::reference_wrapper to a ConvertibleToFunction ! - A function object Where functions are passed as template parameters in the Adobe Source Libraries, any ConvertibleToFunction may be used. The idea is that <code>boost::bind(x, ...);</code> is a valid expression where <code>...</code> are arguments to <code>x</code>. <code>x</code>, in this case, is ConvertibleToFunction. *************** *** 40,55 **** \notation <table> ! <tr> ! <td valign="top"><code>F</code></td> ! <td valign="top">A type that is a model of ConvertibleToFunction</td> ! </tr> ! <tr> ! <td valign="top"><code>x1...xn</code></td> ! <td valign="top">An optional argument list for the type that is a model of ConvertibleToFunction</td> ! </tr> ! <tr> ! <td valign="top"><code>f</code></td> ! <td valign="top">Object of type <code>F</code></td> ! </tr> </table> --- 40,55 ---- \notation <table> ! <tr> ! <td valign="top"><code>F</code></td> ! <td valign="top">A type that is a model of ConvertibleToFunction</td> ! </tr> ! <tr> ! <td valign="top"><code>x1...xn</code></td> ! <td valign="top">An optional argument list for the type that is a model of ConvertibleToFunction</td> ! </tr> ! <tr> ! <td valign="top"><code>f</code></td> ! <td valign="top">Object of type <code>F</code></td> ! </tr> </table> *************** *** 58,70 **** \valid_expressions <table> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Convertible</td> ! <td valign="top"><code>boost::bind(&f, x1...xn);</code></td> ! <td valign="top"> </td> ! <td valign="top">An invokable <code>boost::function</code> whose template argument is the function signature of <code>f</code></td> ! </tr> </table> --- 58,70 ---- \valid_expressions <table> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Convertible</td> ! <td valign="top"><code>boost::bind(&f, x1...xn);</code></td> ! <td valign="top"> </td> ! <td valign="top">An invokable <code>boost::function</code> whose template argument is the function signature of <code>f</code></td> ! </tr> </table> *************** *** 76,80 **** \models ! - Anything that is acceptable to <code>boost::bind</code>. \example --- 76,80 ---- \models ! - Anything that is acceptable to <code>boost::bind</code>. \example Index: concept_convertible_to_range.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_convertible_to_range.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** concept_convertible_to_range.dox 28 Feb 2005 20:48:54 -0000 1.1 --- concept_convertible_to_range.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2002 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2002 - 2004 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 24,30 **** \description ConvertibleToRange denotes a sequence of the form: <code>[begin, end)</code>. The elements of the range are the beginning element to the element before the end element. The following are examples of ranges: ! - A <i>container</i>, denotes a range <code>[container.begin(), container.end())</code> ! - An <i>array</i>, denotes a range <code>[array[0], array[sizeof(array)/sizeof(array[0])])</code> ! - An <i>std::pair</i> of <i>iterators</i> denotes a range <code>[pair.first, pair.last)</code> \refinement_of --- 24,30 ---- \description ConvertibleToRange denotes a sequence of the form: <code>[begin, end)</code>. The elements of the range are the beginning element to the element before the end element. The following are examples of ranges: ! - A <i>container</i>, denotes a range <code>[container.begin(), container.end())</code> ! - An <i>array</i>, denotes a range <code>[array[0], array[sizeof(array)/sizeof(array[0])])</code> ! - An <i>std::pair</i> of <i>iterators</i> denotes a range <code>[pair.first, pair.last)</code> \refinement_of *************** *** 34,53 **** \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of ConvertibleToRange</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> ! <tr> ! <td valign="top"><code>I</code></td> ! <td valign="top">A type for iterating over objects of type <code>X</code></td> ! </tr> ! <tr> ! <td valign="top"><code>p</code>, <code>q</code></td> ! <td valign="top">Objects of type <code>I</code></td> ! </tr> </table> --- 34,53 ---- \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of ConvertibleToRange</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> ! <tr> ! <td valign="top"><code>I</code></td> ! <td valign="top">A type for iterating over objects of type <code>X</code></td> ! </tr> ! <tr> ! <td valign="top"><code>p</code>, <code>q</code></td> ! <td valign="top">Objects of type <code>I</code></td> ! </tr> </table> Index: concept_convertible_to_bool.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_convertible_to_bool.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** concept_convertible_to_bool.dox 7 Nov 2005 18:00:41 -0000 1.2 --- concept_convertible_to_bool.dox 3 Feb 2006 18:20:42 -0000 1.3 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 33,48 **** \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of ConvertibleToBool</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> ! <tr> ! <td valign="top"><code>b</code></td> ! <td valign="top">Object of type <code>bool</code></td> ! </tr> </table> --- 33,48 ---- \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of ConvertibleToBool</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code></td> ! <td valign="top">Object of type <code>X</code></td> ! </tr> ! <tr> ! <td valign="top"><code>b</code></td> ! <td valign="top">Object of type <code>bool</code></td> ! </tr> </table> *************** *** 51,90 **** \valid_expressions <table> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">ConvertibleToBool</td> ! <td valign="top"><code>bool b = x;</code></td> ! <td valign="top"> </td> ! <td valign="top">bool</td> ! </tr> ! <tr> ! <td valign="top">ConvertibleToBool</td> ! <td valign="top"><code>if (x)</code><br>-or-<br><code>if (!x)</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> </table> \expression_semantics <table> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">ConvertibleToBool</td> ! <td valign="top"><code>bool b = x;</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">ConvertibleToBool</td> ! <td valign="top"><code>if (x)</code><br>-or-<br><code>if (!x)</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> </table> --- 51,90 ---- \valid_expressions <table> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">ConvertibleToBool</td> ! <td valign="top"><code>bool b = x;</code></td> ! <td valign="top"> </td> ! <td valign="top">bool</td> ! </tr> ! <tr> ! <td valign="top">ConvertibleToBool</td> ! <td valign="top"><code>if (x)</code><br>-or-<br><code>if (!x)</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> </table> \expression_semantics <table> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">ConvertibleToBool</td> ! <td valign="top"><code>bool b = x;</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">ConvertibleToBool</td> ! <td valign="top"><code>if (x)</code><br>-or-<br><code>if (!x)</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> </table> *************** *** 94,99 **** \models ! - a pointer ! - adobe::name_t \notes --- 94,99 ---- \models ! - a pointer ! - adobe::name_t \notes Index: concept_defaultconstructible.dox =================================================================== RCS file: /cvsroot/adobe-source/adobe-source/adobe/documentation/sources/asl/concepts/concept_defaultconstructible.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** concept_defaultconstructible.dox 28 Feb 2005 20:48:54 -0000 1.1 --- concept_defaultconstructible.dox 3 Feb 2006 18:20:42 -0000 1.2 *************** *** 3,19 **** /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ --- 3,19 ---- /* ! ADOBE CONFIDENTIAL ! ___________________ ! Copyright 2003 - 2003 Adobe Systems Incorporated ! All Rights Reserved. ! NOTICE: All information contained herein is, and remains the property of ! Adobe Systems Incorporated and its suppliers, if any. The intellectual and ! technical concepts contained herein are proprietary to Adobe Systems Incorporated ! and its suppliers and may be covered by U.S. and Foreign Patents, patents ! in process, and are protected by trade secret or copyright law. Dissemination ! of this information or reproduction of this material is strictly forbidden ! unless prior written permission is obtained from Adobe Systems Incorporated. */ *************** *** 33,44 **** \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of DefaultConstructible</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code></td> ! <td valign="top">An object of type <code>X</code></td> ! </tr> </table> --- 33,44 ---- \notation <table> ! <tr> ! <td valign="top"><code>X</code></td> ! <td valign="top">A type that is a model of DefaultConstructible</td> ! </tr> ! <tr> ! <td valign="top"><code>x</code></td> ! <td valign="top">An object of type <code>X</code></td> ! </tr> </table> *************** *** 47,86 **** \valid_expressions <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Default constructor</td> ! <td valign="top"><code>X()</code></td> ! <td valign="top"> </td> ! <td valign="top"><code>X</code></td> ! </tr> ! <tr> ! <td valign="top">Default constructor</td> ! <td valign="top"><code>X x;</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> </table> \expression_semantics <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">Default constructor</td> ! <td valign="top"><code>X()</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Default constructor</td> ! <td valign="top"><code>X x;</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> </table> --- 47,86 ---- \valid_expressions <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> ! </tr> ! <tr> ! <td valign="top">Default constructor</td> ! <td valign="top"><code>X()</code></td> ! <td valign="top"> </td> ! <td valign="top"><code>X</code></td> ! </tr> ! <tr> ! <td valign="top">Default constructor</td> ! <td valign="top"><code>X x;</code> <A href="#1">[1]</A></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> </table> \expression_semantics <table border> ! <tr> ! <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> ! </tr> ! <tr> ! <td valign="top">Default constructor</td> ! <td valign="top"><code>X()</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> ! <tr> ! <td valign="top">Default constructor</td> ! <td valign="top"><code>X x;</code></td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! <td valign="top"> </td> ! </tr> </table> *************** *** 88,94 **** \models ! - int ! - adobe::name_t ! - adobe::copy_on_write \notes --- 88,94 ---- \models ! - int ! - adobe::name_t ! - adobe::copy_on_write \notes *************** *** 97,100 **** \see_also ! - \ref stldoc_Assignable */ --- 97,100 ---- \see_also ! - \ref stldoc_Assignable */ |