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-27 20:42:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/test/begin/sources Modified Files: express_viewer.cpp file.cpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: file.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/sources/file.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** file.cpp 23 Feb 2006 23:28:57 -0000 1.1 --- file.cpp 27 Feb 2006 20:42:00 -0000 1.2 *************** *** 9,12 **** --- 9,23 ---- #include "file.hpp" + #include <adobe/future/alert.hpp> + #include <adobe/name.hpp> + + #include <vector> + + #if ADOBE_PLATFORM_MAC + #include <adobe/future/widgets/headers/mac/os_utilities.hpp> + #elif ADOBE_PLATFORM_WIN + #include <adobe/future/widgets/headers/win32/os_utilities.hpp> + #endif + /****************************************************************************************************/ *************** *** 47,51 **** void file_buffer_t::save() { ! if (!dirty_m) return; bfs::ofstream output( path_m, std::ios_base::out | std::ios_base::binary ); --- 58,66 ---- void file_buffer_t::save() { ! if (!dirty_m) ! return; ! ! if (!is_valid() && !ask_for_path()) ! return; bfs::ofstream output( path_m, std::ios_base::out | std::ios_base::binary ); *************** *** 69,72 **** --- 84,117 ---- /****************************************************************************************************/ + bool file_buffer_t::ask_for_path() + { + adobe::alert_helper_t helper; + + adobe::name_t ok_button(adobe::static_name_t("OK")); + adobe::name_t cancel_button(adobe::static_name_t("Cancel")); + + helper.window_name_m = "Where Should Adobe Begin Save the File?"; + helper.message_m = "A location has not been specified for where " + "you would like to save the file. Would you " + "like to select a location?"; + helper.name_set_m.push_back(ok_button); + helper.name_set_m.push_back(cancel_button); + + adobe::name_t result = helper.run().first; + + if (result != ok_button) + return false; + + // Pick a file path dialog + + #if ADOBE_PLATFORM_MAC || ADOBE_PLATFORM_WIN + return implementation::pick_save_path(path_m); + #else + return false; + #endif + } + + /****************************************************************************************************/ + void file_buffer_t::set_dirty(bool to) { Index: express_viewer.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/sources/express_viewer.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** express_viewer.cpp 23 Feb 2006 23:28:57 -0000 1.11 --- express_viewer.cpp 27 Feb 2006 20:42:00 -0000 1.12 *************** *** 45,50 **** --- 45,52 ---- #include <adobe/config.hpp> #include <adobe/future/widgets/headers/ui_core.hpp> + #include <adobe/future/widgets/headers/label_t.hpp> #include <boost/version.hpp> + #include <boost/filesystem/path.hpp> #include <boost/filesystem/convenience.hpp> #include <boost/filesystem/operations.hpp> *************** *** 87,94 **** " view dialog(name: 'My Dialog')\n" " {\n" - " edit_number(bind: @my_value, format: '#');\n" " slider(bind: @my_value, format: {first: 0, last: 100});\n" " }\n" ! "}"; /****************************************************************************************************/ --- 89,97 ---- " view dialog(name: 'My Dialog')\n" " {\n" " slider(bind: @my_value, format: {first: 0, last: 100});\n" + " edit_number(bind: @my_value, format: '#');\n" + " button(name: 'OK', bind: @result, action: @ok, default: true);\n" " }\n" ! "}\n"; /****************************************************************************************************/ *************** *** 99,103 **** "interface:\n" " my_value: 42;\n" ! "}"; /****************************************************************************************************/ --- 102,108 ---- "interface:\n" " my_value: 42;\n" ! "output:\n" ! " result <== { value: my_value };\n" ! "}\n"; /****************************************************************************************************/ *************** *** 130,133 **** --- 135,152 ---- if ( _initialized ) return true; + #if ADOBE_PLATFORM_MAC + // This is a lame hack to inject the mac metrics glossary + // into the context stack before any more work is done. + // Otherwise it will get injected when it is first used, + // which is when the first widget measurement will take + // place, which is also *after* the glossary call below. + // The glossary call will fall out of scope at the end + // of this function, but instead of popping the glossary + // it'll pop the injected mac metrics glossary, which is + // not what we want. + + (void)label_t("dummy", 0, adobe::theme_normal_s).measure_horizontal(); + #endif + // // The os_initialize function is implemented in win/main.cpp or *************** *** 136,150 **** if ( !os_initialize( this ) ) return false; - #if ADOBE_PLATFORM_MAC - // - // Load up the mac metrics glossary - // - adobe::file_slurp<char> metrics_slurp( _resource_dir_m / "metrics_glossary.xstr" ); - adobe::xstring_context_t mac_metrics_context(metrics_slurp.begin(), metrics_slurp.end(), - adobe::line_position_t( "metrics_glossary.xstr" ) ); - - metrics_slurp.release(); - #endif - // // Load up the default string glossary for localization --- 155,158 ---- *************** *** 190,194 **** this, _1, _2 ), size_small_s, ! default_factory ).release() ); // --- 198,203 ---- this, _1, _2 ), size_small_s, ! default_factory, ! _eve_file_m.directory_path() ).release() ); // *************** *** 300,304 **** stream << "\tFoster Brereton, Mat Marcus, Sean Parent,\n"; stream << "\tEric Berdahl, Lubomir Bourdev, Hailin Jin,\n"; ! stream << "\tJon Reid\n"; stream << "Opensource community contributions by\n"; stream << "\tDavid Catmull, Jamie Gadd, Peter Kummel,\n"; --- 309,313 ---- stream << "\tFoster Brereton, Mat Marcus, Sean Parent,\n"; stream << "\tEric Berdahl, Lubomir Bourdev, Hailin Jin,\n"; ! stream << "\tJon Reid, Mark Ruzon\n"; stream << "Opensource community contributions by\n"; stream << "\tDavid Catmull, Jamie Gadd, Peter Kummel,\n"; *************** *** 386,400 **** // - #if ADOBE_PLATFORM_MAC - // - // Load up the mac metrics glossary - // - adobe::file_slurp<char> metrics_slurp( _resource_dir_m / "metrics_glossary.xstr" ); - adobe::xstring_context_t mac_metrics_context(metrics_slurp.begin(), metrics_slurp.end(), - adobe::line_position_t( "metrics_glossary.xstr" ) ); - - metrics_slurp.release(); - #endif - // // Load up the default string glossary for localization --- 395,398 ---- *************** *** 613,616 **** --- 611,621 ---- /****************************************************************************************************/ + bool always_break(adobe::name_t, const adobe::value_t&) + { + return true; + } + + /****************************************************************************************************/ + void application_t::run_current_as_modal() { *************** *** 626,630 **** adobe::dialog_display_s, eve_stream, ! adam_stream); } --- 631,637 ---- adobe::dialog_display_s, eve_stream, ! adam_stream, ! &always_break, ! _eve_file_m.directory_path()); } |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future/widgets/headers Modified Files: client_assembler.hpp factory.hpp ui_core.hpp Added Files: image_t.hpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: factory.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/factory.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** factory.hpp 3 Feb 2006 18:33:36 -0000 1.6 --- factory.hpp 27 Feb 2006 20:41:58 -0000 1.7 *************** *** 22,25 **** --- 22,27 ---- #include <adobe/eve_parser.hpp> + #include <boost/filesystem/path.hpp> + /*************************************************************************************************/ // *************** *** 83,95 **** struct factory_token_t { ! factory_token_t(display_t& display, ! sheet_t& sheet, ! eve_client::eve_client_holder& client_holder, ! eve_client::button_notifier_t notifier ) : display_m(display), sheet_m(sheet), client_holder_m(client_holder), ! notifier_m(notifier) {} --- 85,99 ---- struct factory_token_t { ! factory_token_t(display_t& display, ! sheet_t& sheet, ! eve_client::eve_client_holder& client_holder, ! eve_client::button_notifier_t notifier, ! const boost::filesystem::path& working_directory ) : display_m(display), sheet_m(sheet), client_holder_m(client_holder), ! notifier_m(notifier), ! working_directory_m(working_directory) {} *************** *** 165,168 **** --- 169,179 ---- // eve_client::button_notifier_t notifier_m; + + // + /// The working directory is the location that widgets must start at if they + /// are to attempt fetching any external resources (pictures or icons or the + /// like) + // + boost::filesystem::path working_directory_m; }; --- NEW FILE: image_t.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_WIDGET_IMAGE_T_HPP #define ADOBE_WIDGET_IMAGE_T_HPP /****************************************************************************************************/ #include <adobe/config.hpp> #include <adobe/source/swap.hpp> #include <boost/operators.hpp> #include <adobe/gil/core/image_view_factory.hpp> #include <adobe/gil/core/algorithm.hpp> #include <adobe/extents.hpp> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ class image_t : boost::equality_comparable<image_t> { public: image_t(GIL::rgba8_image& image); #if !defined(ADOBE_NO_DOCUMENTATION) image_t(const image_t& rhs); ~image_t(); image_t& operator= (const image_t& rhs); #endif extents_t measure(); void place(const point_2d_t& position, const extents_t& extents); void enable(bool make_enabled); void set(GIL::rgba8_image& image); friend bool operator== (const adobe::image_t& x, const adobe::image_t& y); friend inline void swap(adobe::image_t& x, adobe::image_t& y) { adobe::adl_swap(x.object_m, y.object_m); } #if !defined(ADOBE_NO_DOCUMENTATION) struct implementation_t; private: implementation_t* object_m; public: implementation_t& implementation(); const implementation_t& implementation() const; #endif }; /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif // ADOBE_DISPLAY_HPP /****************************************************************************************************/ Index: client_assembler.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/client_assembler.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** client_assembler.hpp 23 Feb 2006 23:28:55 -0000 1.10 --- client_assembler.hpp 27 Feb 2006 20:41:58 -0000 1.11 *************** *** 309,319 **** /*************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( adobe::name_t file_name, ! const adobe::line_position_t::getline_proc_t& getline_proc, ! std::istream& stream, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory); /*************************************************************************************************/ --- 309,320 ---- /*************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( adobe::name_t file_name, ! const adobe::line_position_t::getline_proc_t& getline_proc, ! std::istream& stream, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory, ! const boost::filesystem::path& working_directory); /*************************************************************************************************/ Index: ui_core.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/ui_core.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ui_core.hpp 23 Feb 2006 23:28:55 -0000 1.9 --- ui_core.hpp 27 Feb 2006 20:41:58 -0000 1.10 *************** *** 23,26 **** --- 23,28 ---- #include <adobe/future/enum_ops.hpp> + #include <adobe/gil/extension/conceptspace/any_standard_image.hpp> + /****************************************************************************************************/ *************** *** 1227,1230 **** --- 1229,1234 ---- } // namespace adobe + /****************************************************************************************************/ + ADOBE_DEFINE_BITSET_OPS(adobe::modifiers_t) ADOBE_DEFINE_BITSET_OPS(adobe::window_attributes_t) |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/asl_widgets.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/ide_projects/darwin/asl_widgets.xcodeproj Modified Files: project.pbxproj Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: project.pbxproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/asl_widgets.xcodeproj/project.pbxproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** project.pbxproj 23 Feb 2006 23:28:57 -0000 1.4 --- project.pbxproj 27 Feb 2006 20:42:00 -0000 1.5 *************** *** 10,13 **** --- 10,15 ---- CE4EF96B09AA773B006AB513 /* label_t.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE4EF96A09AA773B006AB513 /* label_t.cpp */; }; CE4EF96D09AA7741006AB513 /* label_t_impl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE4EF96C09AA7741006AB513 /* label_t_impl.cpp */; }; + CE4EFA8609AA976B006AB513 /* image_t.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE4EFA8509AA976B006AB513 /* image_t.cpp */; }; + CE4EFA8809AA9772006AB513 /* image_t_impl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE4EFA8709AA9772006AB513 /* image_t_impl.cpp */; }; CE5C209A094799D100EB4BB6 /* client_assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE5C2097094799D100EB4BB6 /* client_assembler.cpp */; }; CE5C209B094799D100EB4BB6 /* ui_core_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE5C2098094799D100EB4BB6 /* ui_core_common.cpp */; }; *************** *** 57,60 **** --- 59,64 ---- CE4EF96A09AA773B006AB513 /* label_t.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = label_t.cpp; path = ../../adobe/future/widgets/sources/label_t.cpp; sourceTree = SOURCE_ROOT; }; CE4EF96C09AA7741006AB513 /* label_t_impl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = label_t_impl.cpp; path = ../../adobe/future/widgets/sources/mac/label_t_impl.cpp; sourceTree = SOURCE_ROOT; }; + CE4EFA8509AA976B006AB513 /* image_t.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = image_t.cpp; path = ../../adobe/future/widgets/sources/image_t.cpp; sourceTree = SOURCE_ROOT; }; + CE4EFA8709AA9772006AB513 /* image_t_impl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = image_t_impl.cpp; path = ../../adobe/future/widgets/sources/mac/image_t_impl.cpp; sourceTree = SOURCE_ROOT; }; CE5C2036094797C700EB4BB6 /* adobe_debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; path = adobe_debug.xcconfig; sourceTree = "<group>"; }; CE5C2037094797C700EB4BB6 /* adobe_release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; path = adobe_release.xcconfig; sourceTree = "<group>"; }; *************** *** 104,107 **** --- 108,113 ---- CE4EF96A09AA773B006AB513 /* label_t.cpp */, CE4EF96C09AA7741006AB513 /* label_t_impl.cpp */, + CE4EFA8509AA976B006AB513 /* image_t.cpp */, + CE4EFA8709AA9772006AB513 /* image_t_impl.cpp */, CE5C20A0094799FA00EB4BB6 /* metrics.cpp */, CE5C20A1094799FA00EB4BB6 /* ui_core_implementation.cpp */, *************** *** 242,245 **** --- 248,253 ---- CE4EF96B09AA773B006AB513 /* label_t.cpp in Sources */, CE4EF96D09AA7741006AB513 /* label_t_impl.cpp in Sources */, + CE4EFA8609AA976B006AB513 /* image_t.cpp in Sources */, + CE4EFA8809AA9772006AB513 /* image_t_impl.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/gil/core Modified Files: variant.hpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: variant.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/variant.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** variant.hpp 23 Feb 2006 23:28:56 -0000 1.3 --- variant.hpp 27 Feb 2006 20:41:59 -0000 1.4 *************** *** 23,27 **** #include "color_convert.hpp" #include "typedefs.hpp" ! #include <boost\bind.hpp> ADOBE_GIL_NAMESPACE_BEGIN --- 23,27 ---- #include "color_convert.hpp" #include "typedefs.hpp" ! #include <boost/bind.hpp> ADOBE_GIL_NAMESPACE_BEGIN |
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future/widgets/headers/mac Modified Files: label_t_impl.hpp metric_extractor.hpp os_utilities.hpp ui_core_implementation.hpp Added Files: image_t_impl.hpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. --- NEW FILE: image_t_impl.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_IMAGE_T_IMPL_HPP #define ADOBE_IMAGE_T_IMPL_HPP /****************************************************************************************************/ #include <adobe/future/widgets/headers/image_t.hpp> #include "os_utilities.hpp" #include "carbon_safe.hpp" #include "metric_extractor.hpp" /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ struct image_t::implementation_t { implementation_t(GIL::rgba8_image& image); implementation_t(const implementation_t& rhs); implementation_t& operator=(const implementation_t& rhs); void initialize(); extents_t measure(); void place(const point_2d_t& position, const extents_t& extents); void enable(bool make_enabled); void set(GIL::rgba8_image& image); inline friend bool operator== (const adobe::image_t::implementation_t& x, const adobe::image_t::implementation_t& y) { return &x == &y; } auto_control_t control_m; mutable metric_extractor_t metrics_m; GIL::rgba8_image image_m; }; /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif /****************************************************************************************************/ Index: metric_extractor.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/mac/metric_extractor.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** metric_extractor.hpp 3 Feb 2006 18:33:36 -0000 1.1 --- metric_extractor.hpp 27 Feb 2006 20:41:59 -0000 1.2 *************** *** 158,161 **** --- 158,164 ---- long result(0); + if (empty()) + return result; + dictionary_m.get(tag, result); *************** *** 169,174 **** 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); --- 172,181 ---- long operator () (const name_t& tag, array_index_t index) const { ! long result(0); ! ! if (empty()) ! return result; ! ! adobe::array_t array_result; dictionary_m.get(tag, array_result); *************** *** 179,185 **** } ! /// 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(); } --- 186,192 ---- } ! /// If this extractor hasn't been setup yet or has no metrics stored within, ! /// then this function returns true, otherwise it returns false. ! /// \return does this extractor have metrics available bool empty() const { return dictionary_m.empty(); } Index: ui_core_implementation.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/mac/ui_core_implementation.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ui_core_implementation.hpp 23 Feb 2006 23:28:55 -0000 1.9 --- ui_core_implementation.hpp 27 Feb 2006 20:41:59 -0000 1.10 *************** *** 28,31 **** --- 28,33 ---- #include <adobe/array.hpp> + #include <boost/smart_ptr.hpp> + #include "label_t_impl.hpp" *************** *** 162,166 **** ::ControlRef root_control_m; theme_t theme_m; ! metric_extractor_t metrics_m; std::pair<std::size_t, std::size_t> dimensions_m; bool debounce_m; // for resizing transition --- 164,168 ---- ::ControlRef root_control_m; theme_t theme_m; ! mutable metric_extractor_t metrics_m; std::pair<std::size_t, std::size_t> dimensions_m; bool debounce_m; // for resizing transition *************** *** 199,206 **** void set_visible(bool make_visible) { implementation::set_visible(control_m, make_visible); }; ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! bool using_label_m; }; --- 201,208 ---- void set_visible(bool make_visible) { implementation::set_visible(control_m, make_visible); }; ! ::ControlRef control_m; ! theme_t theme_m; ! mutable metric_extractor_t metrics_m; ! bool using_label_m; }; *************** *** 258,262 **** ::ControlRef control_m; theme_t theme_m; ! metric_extractor_t metrics_m; tab_group_value_handler_t value_handler_m; tab_set_t items_m; --- 260,264 ---- ::ControlRef control_m; theme_t theme_m; ! mutable metric_extractor_t metrics_m; tab_group_value_handler_t value_handler_m; tab_set_t items_m; *************** *** 359,363 **** ::ControlRef control_m; theme_t theme_m; ! metric_extractor_t metrics_m; state_set_t state_set_m; focus_handler_t focus_handler_m; --- 361,365 ---- ::ControlRef control_m; theme_t theme_m; ! mutable metric_extractor_t metrics_m; state_set_t state_set_m; focus_handler_t focus_handler_m; *************** *** 413,417 **** ::ControlRef control_m; theme_t theme_m; ! metric_extractor_t metrics_m; radio_button_hit_handler_t hit_handler_m; adobe::value_t set_value_m; --- 415,419 ---- ::ControlRef control_m; theme_t theme_m; ! mutable metric_extractor_t metrics_m; radio_button_hit_handler_t hit_handler_m; adobe::value_t set_value_m; *************** *** 445,449 **** struct checkbox_t::implementation_t { - implementation_t( const std::string& name, const adobe::value_t& true_value, --- 447,450 ---- *************** *** 465,475 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::checkbox_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! checkbox_hit_handler_t hit_handler_m; ! adobe::value_t last_m; ! adobe::value_t true_value_m; ! adobe::value_t false_value_m; }; --- 466,476 ---- ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::checkbox_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! mutable metric_extractor_t metrics_m; ! checkbox_hit_handler_t hit_handler_m; ! adobe::value_t last_m; ! adobe::value_t true_value_m; ! adobe::value_t false_value_m; }; *************** *** 522,533 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::link_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! guide_set_t prongs_m; ! bool value_m; ! bool visible_m; ! bool active_m; ! link_hit_handler_t hit_handler_m; }; --- 523,534 ---- ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::link_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! mutable metric_extractor_t metrics_m; ! guide_set_t prongs_m; ! bool value_m; ! bool visible_m; ! bool active_m; ! link_hit_handler_t hit_handler_m; }; *************** *** 566,574 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::progress_bar_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! bool is_vertical_m; ! pb_style_t bar_style_m; }; --- 567,575 ---- ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::progress_bar_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! mutable metric_extractor_t metrics_m; ! bool is_vertical_m; ! pb_style_t bar_style_m; }; *************** *** 596,601 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::separator_t::implementation_t); ! ::ControlRef control_m; ! metric_extractor_t metrics_m; }; --- 597,602 ---- ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::separator_t::implementation_t); ! ::ControlRef control_m; ! mutable metric_extractor_t metrics_m; }; *************** *** 698,703 **** long rows); ! label_t& get_label() { return name_m; } ! const label_t& get_label() const { return name_m; } extents_t best_bounds(); --- 699,704 ---- long rows); ! label_t& get_label() { assert(name_m.get()); return *name_m; } ! const label_t& get_label() const { assert(name_m.get()); return *name_m; } extents_t best_bounds(); *************** *** 729,737 **** ::ControlRef control_m; theme_t theme_m; ! metric_extractor_t metrics_m; ::HIViewRef scroll_control_m; ! label_t name_m; std::string field_text_m; ! label_t static_disabled_text_m; bool static_disabled_m; bool using_label_m; --- 730,738 ---- ::ControlRef control_m; theme_t theme_m; ! mutable metric_extractor_t metrics_m; ::HIViewRef scroll_control_m; ! boost::scoped_ptr<label_t> name_m; std::string field_text_m; ! boost::scoped_ptr<label_t> static_disabled_label_m; bool static_disabled_m; bool using_label_m; *************** *** 828,842 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::popup_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! std::string name_m; ! label_t static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! menu_items_t menu_items_m; ! popup_value_handler_t value_handler_m; ! popup_key_handler_t key_handler_m; ! focus_handler_t focus_handler_m; }; --- 829,842 ---- ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::popup_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! mutable metric_extractor_t metrics_m; ! std::string name_m; ! bool static_disabled_m; ! bool using_label_m; ! menu_items_t menu_items_m; ! popup_value_handler_t value_handler_m; ! popup_key_handler_t key_handler_m; ! focus_handler_t focus_handler_m; }; *************** *** 959,963 **** ::ControlRef control_m; theme_t theme_m; ! metric_extractor_t metrics_m; bool is_vertical_m; slider_style_t style_m; --- 959,963 ---- ::ControlRef control_m; theme_t theme_m; ! mutable metric_extractor_t metrics_m; bool is_vertical_m; slider_style_t style_m; Index: label_t_impl.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/mac/label_t_impl.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** label_t_impl.hpp 23 Feb 2006 23:28:55 -0000 1.1 --- label_t_impl.hpp 27 Feb 2006 20:41:59 -0000 1.2 *************** *** 68,77 **** } ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! std::size_t characters_m; #if 0 ! label_hit_handler_t hit_handler_m; #endif }; --- 68,77 ---- } ! auto_control_t control_m; ! theme_t theme_m; ! mutable metric_extractor_t metrics_m; ! std::size_t characters_m; #if 0 ! label_hit_handler_t hit_handler_m; #endif }; Index: os_utilities.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/mac/os_utilities.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** os_utilities.hpp 23 Feb 2006 23:28:55 -0000 1.2 --- os_utilities.hpp 27 Feb 2006 20:41:59 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- #include <boost/noncopyable.hpp> + #include <boost/filesystem/path.hpp> #include <stdexcept> *************** *** 49,54 **** --- 50,57 ---- //ADOBE_DELETE_PTR_SPECIALIZATION(::CGrafPtr, ::DisposePort) + //ADOBE_DELETE_PTR_SPECIALIZATION(::HIViewRef, ::DisposeControl) // same as ::ControlRef //ADOBE_DELETE_PTR_SPECIALIZATION(::MouseTrackingRef, ::ReleaseMouseTrackingRegion) //ADOBE_DELETE_PTR_SPECIALIZATION(::RgnHandle, ::DisposeRgn) + ADOBE_DELETE_PTR_SPECIALIZATION(::AEEventHandlerUPP, ::DisposeAEEventHandlerUPP) ADOBE_DELETE_PTR_SPECIALIZATION(::ATSUStyle, ::ATSUDisposeStyle) ADOBE_DELETE_PTR_SPECIALIZATION(::ATSUTextLayout, ::ATSUDisposeTextLayout) *************** *** 62,73 **** --- 65,85 ---- ADOBE_DELETE_PTR_SPECIALIZATION(::CGImageRef, ::CFRelease) ADOBE_DELETE_PTR_SPECIALIZATION(::ControlEditTextValidationUPP, ::DisposeControlEditTextValidationUPP) + ADOBE_DELETE_PTR_SPECIALIZATION(::ControlUserPaneDrawUPP, ::DisposeControlUserPaneDrawUPP) + ADOBE_DELETE_PTR_SPECIALIZATION(::ControlRef, ::DisposeControl) 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(::NavDialogRef, ::NavDialogDispose) + ADOBE_DELETE_PTR_SPECIALIZATION(::NavReplyRecord*, ::NavDisposeReply) ADOBE_DELETE_PTR_SPECIALIZATION(::WindowRef, ::ReleaseWindow) /****************************************************************************************************/ + typedef adobe::auto_resource< ::CFStringRef > auto_cfstring_t; + typedef adobe::auto_resource< ::ControlRef > auto_control_t; + + /****************************************************************************************************/ + namespace implementation { *************** *** 103,107 **** /****************************************************************************************************/ ! inline std::string cfstring_to_string(const adobe::auto_resource< ::CFStringRef >& x) { return cfstring_to_string(x.get()); --- 115,119 ---- /****************************************************************************************************/ ! inline std::string cfstring_to_string(const auto_cfstring_t& x) { return cfstring_to_string(x.get()); *************** *** 110,116 **** /****************************************************************************************************/ ! inline adobe::auto_resource< ::CFStringRef > string_to_cfstring(const std::string& x) { ! adobe::auto_resource< ::CFStringRef > converted(::CFStringCreateWithCString( NULL, x.c_str(), --- 122,128 ---- /****************************************************************************************************/ ! inline auto_cfstring_t string_to_cfstring(const std::string& x) { ! auto_cfstring_t converted(::CFStringCreateWithCString( NULL, x.c_str(), *************** *** 122,126 **** /****************************************************************************************************/ ! inline adobe::auto_resource< ::CFStringRef > localize_to_cfstring(const std::string& x) { return string_to_cfstring(adobe::localize(x)); --- 134,138 ---- /****************************************************************************************************/ ! inline auto_cfstring_t localize_to_cfstring(const std::string& x) { return string_to_cfstring(adobe::localize(x)); *************** *** 219,222 **** --- 231,240 ---- /****************************************************************************************************/ + + template <> + inline void get_bounds<auto_control_t>(const auto_control_t& control, ::Rect& bounds, bool absolute) + { return get_bounds(control.get(), bounds, absolute); } + + /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ *************** *** 231,242 **** template <typename T> ! std::string get_field_text(T&); /****************************************************************************************************/ template <> ! std::string get_field_text< ::ControlRef >(::ControlRef& control); /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ --- 249,265 ---- template <typename T> ! std::string get_field_text(const T&); /****************************************************************************************************/ template <> ! std::string get_field_text< ::ControlRef >(const ::ControlRef& control); /****************************************************************************************************/ + + template <> + inline std::string get_field_text<auto_control_t>(const auto_control_t& control) + { return get_field_text(control.get()); } + /****************************************************************************************************/ /****************************************************************************************************/ *************** *** 245,255 **** /****************************************************************************************************/ /****************************************************************************************************/ - - std::string get_name(const ::ControlRef& control); - - /****************************************************************************************************/ - - std::string get_name(const ::WindowRef& window); - /****************************************************************************************************/ --- 268,271 ---- *************** *** 265,268 **** --- 281,300 ---- /****************************************************************************************************/ + + template <> + std::string get_name< ::ControlRef >(const ::ControlRef& control); + + /****************************************************************************************************/ + + template <> + std::string get_name< ::WindowRef >(const ::WindowRef& window); + + /****************************************************************************************************/ + + template <> + inline std::string get_name<auto_control_t>(const auto_control_t& control) + { return get_name(control.get()); } + + /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ *************** *** 320,324 **** inline ::ThemeFontID theme_to_ThemeFontID(const adobe::theme_t& style) { ! adobe::theme_t masked(style & adobe::theme_mask_s); ::ThemeFontID font_id(kThemeSystemFont); --- 352,356 ---- inline ::ThemeFontID theme_to_ThemeFontID(const adobe::theme_t& style) { ! adobe::theme_t masked = static_cast<adobe::theme_t>(style & adobe::theme_mask_s); ::ThemeFontID font_id(kThemeSystemFont); *************** *** 421,430 **** template <typename T> ! void set_refresh(T& widget); /****************************************************************************************************/ template <> ! inline void set_refresh< ::ControlRef >(::ControlRef& control) { assert(control); --- 453,462 ---- template <typename T> ! void set_refresh(const T& widget); /****************************************************************************************************/ template <> ! inline void set_refresh< ::ControlRef >(const ::ControlRef& control) { assert(control); *************** *** 435,439 **** /****************************************************************************************************/ ! void set_bounds(::ControlRef control, const ::Rect& new_bounds); /****************************************************************************************************/ --- 467,489 ---- /****************************************************************************************************/ ! template <> ! inline void set_refresh<auto_control_t>(const auto_control_t& control) ! { set_refresh(control.get()); } ! ! /****************************************************************************************************/ ! ! template <typename T> ! void set_bounds(T& x, const ::Rect& new_bounds); ! ! /****************************************************************************************************/ ! ! template <> ! void set_bounds< ::ControlRef >(::ControlRef& control, const ::Rect& new_bounds); ! ! /****************************************************************************************************/ ! ! template <> ! inline void set_bounds<auto_control_t>(auto_control_t& control, const ::Rect& new_bounds) ! { ::ControlRef temp(control.get()); set_bounds(temp, new_bounds); } /****************************************************************************************************/ *************** *** 481,485 **** // 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"); --- 531,536 ---- // 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"); *************** *** 505,510 **** /****************************************************************************************************/ 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); --- 556,586 ---- /****************************************************************************************************/ + template <typename T> + inline void set_origin(T& x, float left, float top); + + /****************************************************************************************************/ + #if 0 + template <> + inline void set_origin<const auto_control_t>(const auto_control_t& x, float left, float top) + { + assert(false); + } + #endif + /****************************************************************************************************/ + + template <> + inline void set_origin< ::ControlRef >(::ControlRef& control, float left, float top) + { ADOBE_REQUIRE_STATUS(::HIViewSetBoundsOrigin(control, left, top)); } + + /****************************************************************************************************/ + + template <> + inline void set_origin<auto_control_t>(auto_control_t& control, float left, float top) + { ::ControlRef temp(control.get()); set_origin(temp, left, top); } + + /****************************************************************************************************/ + template <typename Widget> ! void shed_fudges(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); *************** *** 519,523 **** /* 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. --- 595,599 ---- /* NOTE (fbrereto) : All Eve containers need to expand themselves to ! compensate for the case when their children have outsets. If this does not happen, you will see visual clipping of the children's visual outset artifacts. *************** *** 527,531 **** float top_shift(fudge_top - extents.vertical().outset_m.first); ! ADOBE_REQUIRE_STATUS(::HIViewSetBoundsOrigin(control.control_m, left_shift, top_shift)); } --- 603,608 ---- float top_shift(fudge_top - extents.vertical().outset_m.first); ! if (left_shift != 0 || top_shift != 0) ! set_origin(control.control_m, left_shift, top_shift); } *************** *** 533,537 **** template <typename Widget> ! adobe::extents_t apply_fudges(Widget& w, const adobe::extents_t& dimensions) { adobe::extents_t result(dimensions); --- 610,614 ---- template <typename Widget> ! adobe::extents_t apply_fudges(const Widget& w, const adobe::extents_t& dimensions) { adobe::extents_t result(dimensions); *************** *** 560,568 **** 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; --- 637,642 ---- *************** *** 577,589 **** /****************************************************************************************************/ ! adobe::extents_t measure(::ControlRef& control); /****************************************************************************************************/ ! template <typename Widget> ! adobe::extents_t measure(Widget& widget) ! { ! return apply_fudges(widget, measure(widget.control_m)); ! } /****************************************************************************************************/ --- 651,672 ---- /****************************************************************************************************/ ! template <typename Widget> ! adobe::extents_t measure(const Widget& widget) ! { return apply_fudges(widget, measure(widget.control_m)); } /****************************************************************************************************/ ! template <> ! adobe::extents_t measure< ::ControlRef >(const ::ControlRef& control); ! ! /****************************************************************************************************/ ! ! template <> ! inline adobe::extents_t measure<auto_control_t>(const auto_control_t& control) ! { return measure(control.get()); } ! ! /****************************************************************************************************/ ! ! adobe::extents_t measure_theme_text(const std::string& text, adobe::theme_t theme); /****************************************************************************************************/ *************** *** 688,691 **** --- 771,780 ---- /****************************************************************************************************/ + template <> + inline void set_theme<auto_control_t>(auto_control_t& control, adobe::theme_t theme) + { ::ControlRef temp(control.get()); set_theme(temp, theme); } + + /****************************************************************************************************/ + template <typename Widget> void adorn_theme(Widget& widget, theme_t theme) *************** *** 736,739 **** --- 825,834 ---- /****************************************************************************************************/ + template <> + inline void set_active< auto_control_t >(auto_control_t& control, bool make_active) + { ::ControlRef temp; set_active(temp, make_active); } + + /****************************************************************************************************/ + template <typename T> void set_visible(T&, bool make_visible); *************** *** 958,961 **** --- 1053,1068 ---- /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + /****************************************************************************************************/ + + boost::filesystem::path fsref_to_path(const ::FSRef& location); + + bool pick_save_path(boost::filesystem::path& path); + + /****************************************************************************************************/ } // namespace implementation |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/test/begin Modified Files: Jamfile.v2 Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/Jamfile.v2,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Jamfile.v2 23 Feb 2006 23:28:56 -0000 1.7 --- Jamfile.v2 27 Feb 2006 20:41:59 -0000 1.8 *************** *** 34,38 **** # <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 --- 34,38 ---- # <define>WINVER=0x501 <define>_WIN32_WINNT=0x501 <define>_WIN32_IE=0x501 ! <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib shell32.lib comdlg32.lib" # Commented out because manifests aren't working in boost 1.33.1 anyhow |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/modal_dialog_interface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/test/modal_dialog_interface Modified Files: main.cpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: main.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/modal_dialog_interface/main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.cpp 3 Feb 2006 18:33:39 -0000 1.2 --- main.cpp 27 Feb 2006 20:42:00 -0000 1.3 *************** *** 8,12 **** #include <adobe/future/modal_dialog_interface.hpp> - #include <adobe/xstring.hpp> #if ADOBE_PLATFORM_MAC --- 8,11 ---- *************** *** 123,207 **** /****************************************************************************************************/ ! #if ADOBE_PLATFORM_MAC ! const char* mac_metrics_g = ! "<xstr id='metric:global'>{ gap: 4 }</xstr>" ! "" ! "<xstr id='metric:checkbox' theme='normal'>" ! " { size: [ 16, 14 ], adjust_size: [ 2, 0 ], spacing: 5, adjust_position: [ -2, 0 ], outset: [ 1, 2, 0, 1 ], adjust_baseline: -1 }</xstr>" ! "<xstr id='metric:checkbox' theme='small'>" ! " { size: [ 13, 12 ], adjust_size: [ 1, 0 ], spacing: 7, adjust_position: [ -1, 0 ], outset: [ 1, 2, 0, 1 ], adjust_baseline: -1 }</xstr>" ! "<xstr id='metric:checkbox' theme='mini'>" ! " { size: [ 10, 10 ], spacing: 4, outset: [ 0, 1, 0, 0 ], adjust_baseline: -1 }</xstr>" ! "" ! "<xstr id='metric:radio_button' theme='normal'>" ! " { size: [ 19, 16 ], adjust_size: [ 5, 1 ], spacing: 4, adjust_position: [ -2, -1 ], outset: [ 1, 0, 1, 1 ], adjust_baseline: -1 }</xstr>" ! "<xstr id='metric:radio_button' theme='small'>" ! " { size: [ 14, 13 ], spacing: 4, outset: [ 0, 0, 0, 1 ] }</xstr>" ! "<xstr id='metric:radio_button' theme='mini'>" ! " { size: [ 10, 10 ], spacing: 4, adjust_position: [ 0, 1 ], outset: [ 0, 0, 0, 1 ] }</xstr>" ! "" ! "<xstr id='metric:button' theme='normal'>" ! " { size: [ 20, 21 ], adjust_baseline: 2, outset: [ 1, 0, 1, 2 ] }</xstr>" ! "<xstr id='metric:button' theme='small'>" ! " { size: [ 20, 18 ], adjust_size: [ -2, 0 ], adjust_position: [ 1, -1 ], outset: [ 0, 0, 0, 1 ], adjust_baseline: 2 }</xstr>" ! "<xstr id='metric:button' theme='mini'>" ! " { size: [ 20, 15 ], adjust_size: [ 2, 0 ], adjust_position: [ -1, 0 ], outset: [ 1, 0, 1, 1 ], adjust_baseline: 2 }</xstr>" ! "" ! "<xstr id='metric:group' label='true' theme='normal'>" ! " { size: [ 0, 12 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], frame: [ 1, 14, 1, 1 ] }</xstr>" ! "<xstr id='metric:group' label='true' theme='small'>" ! " { size: [ 0, 12 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], frame: [ 1, 14, 1, 1 ] }</xstr>" ! "<xstr id='metric:group' label='true' theme='mini'>" ! " { size: [ 0, 12 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], frame: [ 1, 12, 1, 1 ] }</xstr>" ! "" ! "<xstr id='metric:group' label='false' theme='normal'>" ! " { size: [ 0, 0 ], frame: [ 1, 1, 1, 1 ] }</xstr>" ! "<xstr id='metric:group' label='false' theme='small'>" ! " { size: [ 0, 0 ], frame: [ 1, 1, 1, 1 ] }</xstr>" ! "<xstr id='metric:group' label='false' theme='mini'>" ! " { size: [ 0, 0 ], frame: [ 1, 1, 1, 1 ] }</xstr>" ! "" ! "<xstr id='metric:tab_group' theme='normal'>" ! " { size: [ 0, 0 ], adjust_size: [ 0 , 8 ], adjust_position: [ 0, -7 ], frame: [ 1, 21, 1, 1 ] }</xstr>" ! "<xstr id='metric:tab_group' theme='small'>" ! " { size: [ 0, 0 ], adjust_size: [ 0 , 5 ], adjust_position: [ 0, -4 ], frame: [ 1, 18, 1, 1 ] }</xstr>" ! "<xstr id='metric:tab_group' theme='mini'>" ! " { size: [ 0, 0 ], adjust_size: [ 0 , 3 ], adjust_position: [ 0, -2 ], frame: [ 1, 15, 1, 1 ] }</xstr>" ! "" ! "<xstr id='metric:static_text' theme='normal'>" ! " { size: [ 0, 16 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -3 ], adjust_baseline: -3 }</xstr>" ! "<xstr id='metric:static_text' theme='small'>" ! " { size: [ 0, 15 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], adjust_baseline: -2 }</xstr>" ! "<xstr id='metric:static_text' theme='mini'>" ! " { size: [ 0, 12 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], adjust_baseline: -2 }</xstr>" ! "" ! "<xstr id='metric:edit_text' scroll='false' theme='normal'>" ! " { size: [ 3, 16 ], adjust_size: [ -6, -6 ], adjust_position: [ 3, 3 ], outset: [ 3, 3, 3, 3 ], adjust_baseline: 3 }</xstr>" ! "<xstr id='metric:edit_text' scroll='false' theme='small'>" ! " { size: [ 3, 14 ], adjust_size: [ -6, -6 ], adjust_position: [ 3, 3 ], outset: [ 3, 3, 3, 3 ], adjust_baseline: 3 }</xstr>" ! "<xstr id='metric:edit_text' scroll='false' theme='mini'>" ! " { size: [ 3, 12 ], adjust_size: [ -6, -6 ], adjust_position: [ 3, 3 ], outset: [ 3, 3, 3, 3 ], adjust_baseline: 3 }</xstr>" ! "" ! "<xstr id='metric:edit_text' scroll='true' theme='normal'>" ! " { size: [ 16, 16 ] }</xstr>" ! "<xstr id='metric:edit_text' scroll='true' theme='small'>" ! " { size: [ 16, 16 ] }</xstr>" ! "<xstr id='metric:edit_text' scroll='true' theme='mini'>" ! " { size: [ 16, 16 ] }</xstr>" ! "" ! "<xstr id='metric:popup' label='false' theme='normal'>" ! " { adjust_size: [ 1, -1 ], adjust_position: [ -1, 0 ], outset: [ 1, 0, 1, 1 ] }</xstr>" ! "<xstr id='metric:popup' label='false' theme='small'>" ! " { adjust_size: [ 1, -1 ], adjust_position: [ 1, 0 ], outset: [ 1, 0, 1, 1 ], adjust_baseline: 1 }</xstr>" ! "<xstr id='metric:popup' label='false' theme='mini'>" ! " { adjust_size: [ 2, 0 ], adjust_position: [ -1, 0 ] }</xstr>" ! "" ! "<xstr id='metric:popup' label='true' theme='normal'>" ! " { adjust_size: [ 0, -1 ], outset: [ 0, 0, 1, 1 ] }</xstr>" ! "<xstr id='metric:popup' label='true' theme='small'>" ! " { adjust_size: [ 1, -1 ], adjust_position: [ 0, 0 ], outset: [ 0, 0, 1, 1 ], adjust_baseline: 1 }</xstr>" ! "<xstr id='metric:popup' label='true' theme='mini'>" ! " { adjust_size: [ 1, 0 ] }</xstr>"; ! #endif /****************************************************************************************************/ --- 122,129 ---- /****************************************************************************************************/ ! bool always_true(adobe::name_t name, const adobe::value_t& value) ! { ! return true; ! } /****************************************************************************************************/ *************** *** 219,223 **** adobe::dialog_display_s, eve_stream, ! adam_stream); return result; --- 141,146 ---- adobe::dialog_display_s, eve_stream, ! adam_stream, ! &always_true); return result; *************** *** 288,301 **** try { - #if ADOBE_PLATFORM_MAC - std::size_t metrics_len(std::strlen(mac_metrics_g)); - char* metrics_data(new char[metrics_len] + 1); - - std::copy(&mac_metrics_g[0], &mac_metrics_g[0] + metrics_len, &metrics_data[0]); - - adobe::xstring_context_t mac_metrics_context( &metrics_data[0], &metrics_data[metrics_len], - adobe::line_position_t( "mac metrics" ) ); - #endif - if (!os_init()) throw std::runtime_error("OS initialization failed"); --- 211,214 ---- |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe Modified Files: Jamfile.v2 dictionary.hpp istream.hpp regular_object.hpp unicode.hpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: dictionary.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/dictionary.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dictionary.hpp 3 Feb 2006 18:33:35 -0000 1.5 --- dictionary.hpp 27 Feb 2006 20:41:58 -0000 1.6 *************** *** 21,25 **** #include <boost/operators.hpp> - #include <adobe/array_fwd.hpp> #include <adobe/copy_on_write.hpp> #include <adobe/dictionary_fwd.hpp> --- 21,24 ---- Index: istream.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/istream.hpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** istream.hpp 3 Feb 2006 18:33:35 -0000 1.12 --- istream.hpp 27 Feb 2006 20:41:58 -0000 1.13 *************** *** 64,70 **** std::string file_snippet() const { ! return getline_proc_m->empty() ? ! std::string() : ! (*getline_proc_m)(file_name_m, line_start_m); } --- 64,70 ---- std::string file_snippet() const { ! return getline_proc_m ? ! (*getline_proc_m)(file_name_m, line_start_m) : ! std::string(); } Index: regular_object.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/regular_object.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** regular_object.hpp 3 Feb 2006 18:33:35 -0000 1.4 --- regular_object.hpp 27 Feb 2006 20:41:58 -0000 1.5 *************** *** 19,22 **** --- 19,24 ---- namespace adobe { + /*************************************************************************************************/ + template <typename I> // I is a pure virtual interface struct regular_interface : I *************** *** 30,39 **** virtual const std::type_info& type() const = 0; virtual ~regular_interface(); }; ! template <typename I> regular_interface<I>::~regular_interface() { } template < typename I, // I is a pure virtual interface --- 32,85 ---- virtual const std::type_info& type() const = 0; virtual ~regular_interface(); + }; + + /*************************************************************************************************/ + + template <typename I> regular_interface<I>::~regular_interface() + { } + + /*************************************************************************************************/ + + #if !defined(ADOBE_NO_DOCUMENTATION) + + /*************************************************************************************************/ + + namespace implementation { + /*************************************************************************************************/ + + template <typename F> // F is an instance of a regular interface + struct regular_instance : F + { + typedef typename F::value_type value_type; + typedef typename F::interface_type interface_type; + + regular_instance(const value_type& x): F(x){ } + + bool equals(const interface_type& x) const + { + return (x.type() == typeid(value_type)) + && (static_cast<const regular_instance&>(x).value == this->value); + } + interface_type* clone() const + { return new regular_instance(this->value); } + + void assign(const interface_type& x) + { this->value = static_cast<const regular_instance&>(x).value; } + + const std::type_info& type() const + { return typeid(value_type); } }; ! /*************************************************************************************************/ ! ! } //namespace implementation ! ! /*************************************************************************************************/ ! ! #endif + /*************************************************************************************************/ template < typename I, // I is a pure virtual interface *************** *** 44,59 **** interface_type* interface_m; public: template <typename T> explicit regular_object(const T& x) : ! interface_m(new implementation::regular_instance<D<T> >(x)) { } #if !defined(ADOBE_NO_DOCUMENTATION) regular_object(const regular_object& x) : ! interface_m(x.interface_m->clone()) { } ! - friend inline bool operator==(const regular_object& x, const regular_object& y) { return x.interface_m->equals(*y.interface_m); } --- 90,106 ---- interface_type* interface_m; + public: template <typename T> explicit regular_object(const T& x) : ! interface_m(new implementation::regular_instance<D<T> >(x)) ! { } #if !defined(ADOBE_NO_DOCUMENTATION) regular_object(const regular_object& x) : ! interface_m(x.interface_m->clone()) ! { } friend inline bool operator==(const regular_object& x, const regular_object& y) { return x.interface_m->equals(*y.interface_m); } *************** *** 64,68 **** regular_object& operator=(const regular_object& x) { ! if (x.type() == type()) interface_m->assign(*x.interface_m); else { --- 111,116 ---- regular_object& operator=(const regular_object& x) { ! if (x.type() == type()) ! interface_m->assign(*x.interface_m); else { *************** *** 74,103 **** } ~regular_object() { delete interface_m; } ! ! #endif // !defined(ADOBE_NO_DOCUMENTATION) ! const std::type_info& type() const { return interface_m->type(); } ! template <typename T> const T& cast() const { ! if (type() != typeid(T)) throw adobe::bad_cast(type(), typeid(T)); return static_cast<implementation::regular_instance<D<T> >*>(interface_m)->value; } ! template <typename T> T& cast() { ! if (type() != typeid(T)) throw adobe::bad_cast(type(), typeid(T)); return static_cast<implementation::regular_instance<D<T> >*>(interface_m)->value; } ! template <typename T> bool cast(T& x) const { ! if (type() != typeid(T)) return false; x = cast<T>(); return true; } ! template <typename T> regular_object& assign(const T& x) { ! if (type() == typeid(T)) cast<T>() = x; else { --- 122,157 ---- } ~regular_object() { delete interface_m; } ! ! #endif ! ! const std::type_info& type() const ! { return interface_m->type(); } ! template <typename T> const T& cast() const { ! if (type() != typeid(T)) ! throw adobe::bad_cast(type(), typeid(T)); return static_cast<implementation::regular_instance<D<T> >*>(interface_m)->value; } ! template <typename T> T& cast() { ! if (type() != typeid(T)) ! throw adobe::bad_cast(type(), typeid(T)); return static_cast<implementation::regular_instance<D<T> >*>(interface_m)->value; } ! template <typename T> bool cast(T& x) const { ! if (type() != typeid(T)) ! return false; x = cast<T>(); return true; } ! template <typename T> regular_object& assign(const T& x) { ! if (type() == typeid(T)) ! cast<T>() = x; else { *************** *** 108,143 **** } ! const interface_type* operator->() const { return interface_m; } ! interface_type* operator->() { return interface_m; } ! ! ! }; ! ! #if !defined(ADOBE_NO_DOCUMENTATION) ! ! namespace implementation { ! template <typename F> // F is an instance of a regular interface ! struct regular_instance : F ! { ! typedef typename F::value_type value_type; ! typedef typename F::interface_type interface_type; ! ! regular_instance(const value_type& x): F(x){ } ! ! bool equals(const interface_type& x) const ! { ! return (x.type() == typeid(value_type)) ! && (static_cast<const regular_instance&>(x).value == this->value); ! } ! ! interface_type* clone() const { return new regular_instance(this->value); } ! void assign(const interface_type& x) { this->value = static_cast<const regular_instance&>(x).value; } ! const std::type_info& type() const { return typeid(value_type); } }; ! } //namespace implementation ! #endif // !defined(ADOBE_NO_DOCUMENTATION) } // namespace adobe #endif --- 162,178 ---- } ! const interface_type* operator->() const ! { return interface_m; } ! interface_type* operator->() ! { return interface_m; } }; ! /*************************************************************************************************/ } // namespace adobe + /*************************************************************************************************/ + #endif + + /*************************************************************************************************/ Index: unicode.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/unicode.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** unicode.hpp 3 Feb 2006 18:33:35 -0000 1.9 --- unicode.hpp 27 Feb 2006 20:41:58 -0000 1.10 *************** *** 225,228 **** --- 225,230 ---- to_utf32 (InputIterator first, InputIterator last, DestInteger& result) { + if (first == last) return first; + boost::uint16_t code(static_cast<boost::uint16_t>(*first)); *************** *** 262,265 **** --- 264,269 ---- to_utf32 (InputIterator first, InputIterator last, DestInteger& result) { + if (first == last) return first; + unsigned char n(static_cast<unsigned char>(*first)); *************** *** 286,289 **** --- 290,306 ---- /*************************************************************************************************/ + template <typename InputIterator, typename DestInteger> + typename boost::enable_if<is_utf32_iterator_type<InputIterator>, InputIterator>::type + to_utf32 (InputIterator first, InputIterator last, DestInteger& result) + { + if (first == last) return first; + + result = *first; + + return ++first; + } + + /*************************************************************************************************/ + } // namespace implementation *************** *** 327,331 **** */ ! template < typename I, // I models Integer; I must be a valid UTF32-encoded code point typename O> // O models OutputIterator typename boost::enable_if<is_utf16_type<I>, O>::type --- 344,348 ---- */ ! template < typename I, // I models Integer; I must be a valid UTF16-encoded code point typename O> // O models OutputIterator typename boost::enable_if<is_utf16_type<I>, O>::type *************** *** 337,340 **** --- 354,374 ---- /*************************************************************************************************/ /* + utf8 -> utf8 + - 1 source value + - 1 output value + */ + + template < typename I, // I models Integer; I must be a valid UTF8-encoded code point + typename O> // O models OutputIterator + typename boost::enable_if<is_utf8_type<I>, O>::type + to_utf8(I code, O output) + { + *output++ = code; + + return output; + } + + /*************************************************************************************************/ + /* utf16 -> utf8 - n source values *************** *** 382,385 **** --- 416,434 ---- /*************************************************************************************************/ /* + utf8 -> utf8 + - n source values + - m output values + */ + + template < typename I, // I models InputIterator + typename O> // O models OutputIterator + typename boost::enable_if<is_utf8_iterator_type<I>, O>::type + to_utf8(I first, I last, O output) + { + return std::copy(first, last, output); + } + + /*************************************************************************************************/ + /* utf8 -> utf16 - n source values *************** *** 405,408 **** --- 454,471 ---- /*************************************************************************************************/ /* + utf16 -> utf16 + - n source values + - n output values + */ + template < typename I, // I models InputIterator + typename O> // O models OutputIterator + typename boost::enable_if<is_utf16_iterator_type<I>, O>::type + to_utf16(I first, I last, O output) + { + return std::copy(first, last, output); + } + + /*************************************************************************************************/ + /* utf32 -> utf16 - 1 source value Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/Jamfile.v2,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Jamfile.v2 3 Feb 2006 18:33:35 -0000 1.10 --- Jamfile.v2 27 Feb 2006 20:41:57 -0000 1.11 *************** *** 32,43 **** # ! # The FUTURE_SRC set is the extra code required when using serialization # ! FUTURE_SOURCE_SET = assemblage iomanip iomanip_pdf - modal_dialog_interface ; --- 32,51 ---- # ! # The FUTURE_SET is the common ASL future code # ! FUTURE_SET = assemblage + modal_dialog_interface + alert + ; + + # + # The FUTURE_SERIALIZATION_SET is the extra code required when using serialization + # + + FUTURE_SERIALIZATION_SET = iomanip iomanip_pdf ; *************** *** 55,63 **** lib asl : $(COMMON_SOURCE_SET) ; lib asl_dev : $(COMMON_SOURCE_SET) ! ./future/source/$(FUTURE_SOURCE_SET).cpp : <asl>dev ; --- 63,73 ---- lib asl : $(COMMON_SOURCE_SET) + ./future/source/$(FUTURE_SET).cpp ; lib asl_dev : $(COMMON_SOURCE_SET) ! ./future/source/$(FUTURE_SET).cpp ! ./future/source/$(FUTURE_SERIALIZATION_SET).cpp : <asl>dev ; |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:12
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future/source Modified Files: modal_dialog_interface.cpp Added Files: alert.cpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: modal_dialog_interface.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/source/modal_dialog_interface.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** modal_dialog_interface.cpp 3 Feb 2006 18:33:36 -0000 1.2 --- modal_dialog_interface.cpp 27 Feb 2006 20:41:58 -0000 1.3 *************** *** 9,14 **** --- 9,17 ---- #include <adobe/future/modal_dialog_interface.hpp> + #include <adobe/config.hpp> #include <adobe/adam_evaluate.hpp> #include <adobe/adam_parser.hpp> + #include <adobe/xstring.hpp> + #include <adobe/future/widgets/headers/client_assembler.hpp> #include <adobe/future/widgets/headers/factory.hpp> *************** *** 83,92 **** 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); --- 86,97 ---- 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, ! adobe::action_callback_t callback, ! const boost::filesystem::path& working_directory); void end_dialog(adobe::name_t terminating_action); *************** *** 98,116 **** 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(); --- 103,126 ---- 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::action_callback_t callback_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, ! adobe::action_callback_t callback, ! const boost::filesystem::path& working_directory) { + callback_m = callback; + result_m = adobe::dialog_result_t(); *************** *** 171,175 **** boost::bind(&mdi_implementation_t::latch_callback, boost::ref(*this), _1, _2), size_normal_s, ! default_factory ).release() ); // --- 181,186 ---- boost::bind(&mdi_implementation_t::latch_callback, boost::ref(*this), _1, _2), size_normal_s, ! default_factory, ! working_directory ).release() ); // *************** *** 254,296 **** /****************************************************************************************************/ ! void mdi_implementation_t::latch_callback(adobe::name_t action, const adobe::value_t&) try { assert(view_m); ! static const adobe::static_name_t reset_s ("reset"); ! static const adobe::static_name_t cancel_s ("cancel"); ! static const adobe::static_name_t dialog_s ("dialog"); ! static const adobe::static_name_t ok_s ("ok"); ! ! if (action == reset_s) ! { ! /* ! REVISIT (sparent) : Getting the contributing from a zero mark should always return an ! empty array. Since we know this, we should need to haul around the array! ! */ ! ! assert(view_m->contributing_m.second.empty()); ! ! sheet_m.set(view_m->contributing_m.first); ! sheet_m.update(); ! } ! else if (action == dialog_s) ! { ! assert(!"not implemented"); ! //push_back(parameter.get<std::string>().c_str(), size_normal_s); ! } ! else if (action == cancel_s) ! { ! assert(view_m->contributing_m.second.empty()); ! ! sheet_m.set(view_m->contributing_m.first); ! end_dialog(action); ! sheet_m.update(); ! } ! else if (action == ok_s) ! { end_dialog(action); - } } catch(...) --- 265,276 ---- /****************************************************************************************************/ ! void mdi_implementation_t::latch_callback(adobe::name_t action, const adobe::value_t& value) try { assert(view_m); + assert(callback_m); ! if (callback_m(action, value)) end_dialog(action); } catch(...) *************** *** 322,331 **** /****************************************************************************************************/ ! 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) { assert ( !layout_definition.fail() ); --- 302,313 ---- /****************************************************************************************************/ ! 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, ! action_callback_t callback, ! const boost::filesystem::path& working_directory) { assert ( !layout_definition.fail() ); *************** *** 334,339 **** mdi_implementation_t impl; ! return impl.handle_dialog( input, record, display_state, display_options, ! layout_definition, sheet_definition); } --- 316,327 ---- mdi_implementation_t impl; ! return impl.handle_dialog( input, ! record, ! display_state, ! display_options, ! layout_definition, ! sheet_definition, ! callback, ! working_directory); } --- NEW FILE: alert.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/alert.hpp> #include <adobe/future/modal_dialog_interface.hpp> #include <adobe/name.hpp> #include <cassert> #include <string> #include <sstream> /****************************************************************************************************/ namespace { /****************************************************************************************************/ bool always_break(adobe::name_t, const adobe::value_t&) { return true; } /****************************************************************************************************/ } // namespace /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ std::pair<adobe::name_t, bool> alert(const char* window_name, const char* message_text, adobe::name_t* first_button_name, adobe::name_t* last_button_name, const char* checkbox_name, const boost::filesystem::path& icon_path, std::size_t default_button_index, std::size_t cancel_button_index) { long button_count = static_cast<long>(std::distance(first_button_name, last_button_name)); assert(button_count); std::stringstream sheet; std::stringstream layout; boost::filesystem::path icon_directory_path; // The sheet for the alert dialog sheet << "sheet alert_sheet\n" "{\n" "interface:\n" " checkbox_value: false;\n" "output:\n" " result <== { checkbox_value: checkbox_value };\n" "}\n" ; // Start by filling out the header for the layout of the alert layout << "layout alert_layout\n" "{\n" " view dialog(name: '" << window_name << "', placement: place_row, spacing: 10)\n" " {\n"; if (icon_path != boost::filesystem::path()) { icon_directory_path = icon_path.branch_path(); layout << " label_t(image: '" << icon_path.leaf() << "')\n" ; } layout << " column()\n" " {\n" " static_text(name:'" << message_text << "', horizontal: align_fill, wrap: true);\n" ; // add the checkbox if we have a name for one if (checkbox_name) { layout << "checkbox(name: '" << checkbox_name << "', bind: @checkbox_value);\n" ; } // add the buttons in *reverse* order, so the first is rightmost layout << "row(horizontal: align_right)\n" "{\n" ; for (long i(button_count - 1); i >= 0; --i) { const char* current = (first_button_name + i)->get(); // NOTE (fbrereto) : For the sake of indexing the name of the action must be "bN" layout << "button(name: '" << current << "', action: @b" << i ; // A button cannot be both the default and the cancel button if (default_button_index == static_cast<std::size_t>(i)) layout << ", default: true"; else if (cancel_button_index == static_cast<std::size_t>(i)) layout << ", cancel: true"; layout << ");\n" ; } // close out the rest of the layout layout << " }\n" // row " }\n" // column " }\n" // dialog "}\n" // layout ; // finally set up the params for the modal dialog interface call adobe::dialog_result_t result(adobe::handle_dialog(adobe::dictionary_t(), adobe::record_info_t(), adobe::dictionary_t(), adobe::dialog_display_s, layout, sheet, &always_break, icon_directory_path)); bool is_checked(result.command_m[adobe::static_name_t("checkbox_value")].get<bool>()); // NOTE (fbrereto) : Here is why we require the name of the action to be "bN", where N is the index std::size_t index(std::atoi(&result.terminating_action_m.get()[1])); return std::make_pair(*(first_button_name + index), is_checked); } /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:12
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/sources/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/test/begin/sources/mac Modified Files: main.cpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: main.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/sources/mac/main.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** main.cpp 3 Feb 2006 18:33:39 -0000 1.5 --- main.cpp 27 Feb 2006 20:42:00 -0000 1.6 *************** *** 8,12 **** #include "express_viewer.hpp" #include "report_exception.hpp" - #include "carbon_safe.hpp" #include <boost/filesystem/convenience.hpp> --- 8,11 ---- *************** *** 14,17 **** --- 13,18 ---- #include <adobe/xstring.hpp> + #include <adobe/future/widgets/headers/mac/os_utilities.hpp> + #include <sstream> #include <string> *************** *** 49,82 **** // - /// Convert a MacOS FSRef into a Boost path. This allows us to use the - /// boost::filesystem library to perform operations on the path, rather - /// than using the FSRef API. - /// - /// \param location the FSRef to make into a bfs::path - /// \return a bfs path of the given location. - // - boost::filesystem::path fsref_to_path( const FSRef& location ) - { - std::size_t max_size (1024); - std::vector<char> path_buffer(max_size); - OSStatus error(noErr); - - while (true) - { - error = ::FSRefMakePath(&location, reinterpret_cast<UInt8*>(&path_buffer[0]), max_size); - if (error != pathTooLongErr) break; - - max_size *= 2; - path_buffer.resize(max_size); - } - - ADOBE_REQUIRE_STATUS(error); - - return boost::filesystem::path( &path_buffer[0], boost::filesystem::native ); - } - - /****************************************************************************************************/ - - // /// Attempt to open the documents in the given AEDescList. // --- 50,53 ---- *************** *** 110,114 **** // which we have been asked to open. // ! bfs::path file_name( fsref_to_path( file ) ); std::string extension( boost::filesystem::extension( file_name ) ); --- 81,85 ---- // which we have been asked to open. // ! bfs::path file_name( adobe::implementation::fsref_to_path( file ) ); std::string extension( boost::filesystem::extension( file_name ) ); *************** *** 311,340 **** /****************************************************************************************************/ - // - /// These template ensures that the static auto_ptr event handlers get - /// released when the app closes. - // - template<> - struct delete_ptr<AEEventHandlerUPP> - { - void operator()( AEEventHandlerUPP x ) const - { - if( x ) DisposeAEEventHandlerUPP( x ); - } - }; - - /****************************************************************************************************/ - - template<> - struct delete_ptr<EventHandlerUPP> - { - void operator()( EventHandlerUPP x ) const - { - if( x ) DisposeEventHandlerUPP( x ); - } - }; - - /****************************************************************************************************/ - bool os_initialize( adobe::application_t* theApp ) { --- 282,285 ---- *************** *** 350,354 **** ADOBE_REQUIRE_STATUS( GetProcessBundleLocation( &psn, &location ) ); ! theApp->set_resource_directory( fsref_to_path( location ) / "Contents/Resources" ); // --- 295,299 ---- ADOBE_REQUIRE_STATUS( GetProcessBundleLocation( &psn, &location ) ); ! theApp->set_resource_directory( implementation::fsref_to_path( location ) / "Contents/Resources" ); // |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:12
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/asl_dev.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/ide_projects/darwin/asl_dev.xcodeproj Modified Files: project.pbxproj Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: project.pbxproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/asl_dev.xcodeproj/project.pbxproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** project.pbxproj 24 Jan 2006 19:38:51 -0000 1.2 --- project.pbxproj 27 Feb 2006 20:42:00 -0000 1.3 *************** *** 39,42 **** --- 39,43 ---- CE5C211209479C0200EB4BB6 /* zuid_uuid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE5C20F309479C0200EB4BB6 /* zuid_uuid.cpp */; }; CE5C211309479C0200EB4BB6 /* zuid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE5C20F409479C0200EB4BB6 /* zuid.cpp */; }; + CE9CD2A109A23B5A009E831C /* alert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE9CD2A009A23B5A009E831C /* alert.cpp */; }; CEC069EA0948A52200AFC610 /* libboost_filesystem.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC069DB0948A50F00AFC610 /* libboost_filesystem.a */; }; CEC069EB0948A52200AFC610 /* libboost_signals.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC069DF0948A50F00AFC610 /* libboost_signals.a */; }; *************** *** 145,148 **** --- 146,150 ---- CE5C20F309479C0200EB4BB6 /* zuid_uuid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = zuid_uuid.cpp; path = ../../adobe/source/zuid_uuid.cpp; sourceTree = SOURCE_ROOT; }; CE5C20F409479C0200EB4BB6 /* zuid.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = zuid.cpp; path = ../../adobe/source/zuid.cpp; sourceTree = SOURCE_ROOT; }; + CE9CD2A009A23B5A009E831C /* alert.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = alert.cpp; path = ../../adobe/future/source/alert.cpp; sourceTree = SOURCE_ROOT; }; CEC069CF0948A50F00AFC610 /* boost_filesystem.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = boost_filesystem.xcodeproj; sourceTree = "<group>"; }; CEC069D20948A50F00AFC610 /* boost_signals.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = boost_signals.xcodeproj; sourceTree = "<group>"; }; *************** *** 187,194 **** isa = PBXGroup; children = ( ! CEE3EC4C0985B1B10006417C /* iomanip_asl_cel.cpp */, ! CEE3EC4D0985B1B10006417C /* iomanip.cpp */, ! CEE3EC4E0985B1B10006417C /* iomanip_pdf.cpp */, ! CEE3EC3809855FAD0006417C /* modal_dialog_interface.cpp */, CE5C20D609479C0200EB4BB6 /* adam_evaluate.cpp */, CE5C20D709479C0200EB4BB6 /* adam_parser.cpp */, --- 189,193 ---- isa = PBXGroup; children = ( ! CE9CD2A009A23B5A009E831C /* alert.cpp */, CE5C20D609479C0200EB4BB6 /* adam_evaluate.cpp */, CE5C20D709479C0200EB4BB6 /* adam_parser.cpp */, *************** *** 202,209 **** --- 201,212 ---- CE5C20DE09479C0200EB4BB6 /* expression_parser.cpp */, CE5C20DF09479C0200EB4BB6 /* extents.cpp */, + CEE3EC4D0985B1B10006417C /* iomanip.cpp */, + CEE3EC4C0985B1B10006417C /* iomanip_asl_cel.cpp */, + CEE3EC4E0985B1B10006417C /* iomanip_pdf.cpp */, CE5C20E009479C0200EB4BB6 /* istream.cpp */, CE5C20E109479C0200EB4BB6 /* lex_shared.cpp */, CE5C20E209479C0200EB4BB6 /* lex_stream.cpp */, CE5C20E309479C0200EB4BB6 /* md5.cpp */, + CEE3EC3809855FAD0006417C /* modal_dialog_interface.cpp */, CE5C20E409479C0200EB4BB6 /* name.cpp */, CE5C20E509479C0200EB4BB6 /* parser_shared.cpp */, *************** *** 430,433 **** --- 433,437 ---- CEE3EC500985B1B10006417C /* iomanip.cpp in Sources */, CEE3EC510985B1B10006417C /* iomanip_pdf.cpp in Sources */, + CE9CD2A109A23B5A009E831C /* alert.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:09
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/extension/argb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/gil/extension/argb Added Files: argb.hpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. --- NEW FILE: argb.hpp --- #ifndef GIL_ARGB_HPP #define GIL_ARGB_HPP #include <adobe/gil/core/rgba.hpp> #include <adobe/gil/core/typedefs.hpp> ADOBE_GIL_NAMESPACE_BEGIN /// \brief ARGB color space identifier /// \ingroup RGBA struct argb_tag : public rgba_tag {}; namespace detail { /// \ingroup ColorBase /// \ingroup RGBA /// \brief alpha, red, green, and blue channel values /// /// Represents a ARGB unit of channel values 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 rgba color base and in a argb color base. template <typename T> struct color_base<T,argb_tag> { typedef argb_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 a,r,g,b; color_base() {} color_base(channel_type v0, channel_type v1, channel_type v2, channel_type v3) : a(v3),r(v0),g(v1),b(v2) {} template <typename T1, typename C1> color_base(const color_base<T1,C1>& c) : a(c.a),r(c.r),g(c.g),b(c.b) {} template <typename T1, typename C1> color_base( color_base<T1,C1>& c) : a(c.a),r(c.r),g(c.g),b(c.b) {} }; } namespace detail { template <typename CS,int N> struct logical_channel_accessor; /// \ingroup ChannelAccessor template <> struct logical_channel_accessor<argb_tag,0> { template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,argb_tag>& p) const {return p.r;} template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,argb_tag>& p) const {return p.r;} }; /// \ingroup ChannelAccessor template <> struct logical_channel_accessor<argb_tag,1> { template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,argb_tag>& p) const {return p.g;} template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,argb_tag>& p) const {return p.g;} }; /// \ingroup ChannelAccessor template <> struct logical_channel_accessor<argb_tag,2> { template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,argb_tag>& p) const {return p.b;} template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,argb_tag>& p) const {return p.b;} }; /// \ingroup ChannelAccessor template <> struct logical_channel_accessor<argb_tag,3> { template <typename T> typename boost::add_reference<T>::type operator()(pixel<T,argb_tag>& p) const {return p.a;} template <typename T> typename boost::add_reference<typename boost::add_const<T>::type>::type operator()(const pixel<T,argb_tag>& p) const {return p.a;} }; } typedef pixel<bits8 ,argb_tag> argb8_pixel; typedef pixel<bits16,argb_tag> argb16_pixel; typedef pixel<bits32,argb_tag> argb32_pixel; typedef pixel<const bits8 ,argb_tag> argb8c_pixel; typedef pixel<const bits16,argb_tag> argb16c_pixel; typedef pixel<const bits32,argb_tag> argb32c_pixel; typedef pixel<bits8 ,argb_tag>& argb8_ref; typedef pixel<bits16,argb_tag>& argb16_ref; typedef pixel<bits32,argb_tag>& argb32_ref; typedef pixel<const bits8 ,argb_tag>& argb8c_ref; typedef pixel<const bits16,argb_tag>& argb16c_ref; typedef pixel<const bits32,argb_tag>& argb32c_ref; typedef argb8_pixel* argb8_ptr; typedef argb16_pixel* argb16_ptr; typedef argb32_pixel* argb32_ptr; typedef const_interleaved_pixel_iterator<bits8 , argb_tag> argb8c_ptr; typedef const_interleaved_pixel_iterator<bits16, argb_tag> argb16c_ptr; typedef const_interleaved_pixel_iterator<bits32, argb_tag> argb32c_ptr; typedef pixel_step_iterator<argb8_ptr> argb8_step_ptr; typedef pixel_step_iterator<argb16_ptr> argb16_step_ptr; typedef pixel_step_iterator<argb32_ptr> argb32_step_ptr; typedef pixel_step_iterator<argb8c_ptr> argb8c_step_ptr; typedef pixel_step_iterator<argb16c_ptr> argb16c_step_ptr; typedef pixel_step_iterator<argb32c_ptr> argb32c_step_ptr; typedef pixel_xy_locator<pixel_step_iterator<argb8_ptr> > argb8_loc; typedef pixel_xy_locator<pixel_step_iterator<argb16_ptr> > argb16_loc; typedef pixel_xy_locator<pixel_step_iterator<argb32_ptr> > argb32_loc; typedef pixel_xy_locator<pixel_step_iterator<argb8c_ptr> > argb8c_loc; typedef pixel_xy_locator<pixel_step_iterator<argb16c_ptr> > argb16c_loc; typedef pixel_xy_locator<pixel_step_iterator<argb32c_ptr> > argb32c_loc; typedef pixel_xy_locator<pixel_step_iterator<argb8_step_ptr> > argb8_step_loc; typedef pixel_xy_locator<pixel_step_iterator<argb16_step_ptr> > argb16_step_loc; typedef pixel_xy_locator<pixel_step_iterator<argb32_step_ptr> > argb32_step_loc; typedef pixel_xy_locator<pixel_step_iterator<argb8c_step_ptr> > argb8c_step_loc; typedef pixel_xy_locator<pixel_step_iterator<argb16c_step_ptr> > argb16c_step_loc; typedef pixel_xy_locator<pixel_step_iterator<argb32c_step_ptr> > argb32c_step_loc; typedef image_view<argb8_loc> argb8_view; typedef image_view<argb16_loc> argb16_view; typedef image_view<argb32_loc> argb32_view; typedef image_view<argb8c_loc> argb8c_view; typedef image_view<argb16c_loc> argb16c_view; typedef image_view<argb32c_loc> argb32c_view; typedef image_view<argb8_step_loc> argb8_step_view; typedef image_view<argb16_step_loc> argb16_step_view; typedef image_view<argb32_step_loc> argb32_step_view; typedef image_view<argb8c_step_loc> argb8c_step_view; typedef image_view<argb16c_step_loc> argb16c_step_view; typedef image_view<argb32c_step_loc> argb32c_step_view; typedef image<argb8_view,std::allocator<unsigned char> > argb8_image; typedef image<argb16_view,std::allocator<unsigned char> > argb16_image; typedef image<argb32_view,std::allocator<unsigned char> > argb32_image; ADOBE_GIL_NAMESPACE_END #endif |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:09
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/fltk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future/widgets/headers/fltk Modified Files: ui_core_implementation.hpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: ui_core_implementation.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/fltk/ui_core_implementation.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ui_core_implementation.hpp 3 Feb 2006 18:33:36 -0000 1.7 --- ui_core_implementation.hpp 27 Feb 2006 20:41:58 -0000 1.8 *************** *** 325,329 **** void initialize(const fltk::Rectangle& bounds, ! const std::string& name); long best_height_given_width(long width); void set_name(const std::string& name); --- 325,330 ---- void initialize(const fltk::Rectangle& bounds, ! const std::string& name, ! std::size_t characters); long best_height_given_width(long width); void set_name(const std::string& name); |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:09
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future/widgets Modified Files: Jamfile.v2 Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/Jamfile.v2,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Jamfile.v2 23 Feb 2006 23:28:55 -0000 1.9 --- Jamfile.v2 27 Feb 2006 20:41:58 -0000 1.10 *************** *** 11,17 **** # COMMON_SOURCES = ! client_assembler ! ui_core_common ! ui_core label_t ; --- 11,19 ---- # COMMON_SOURCES = ! client_assembler ! ui_core_common ! ui_core ! label_t ! image_t label_t ; *************** *** 21,27 **** # BRIDGE_SOURCES = ! display ! ui_overlay ! ui_core_implementation label_t_impl ; --- 23,31 ---- # BRIDGE_SOURCES = ! display ! ui_overlay ! ui_core_implementation ! label_t_impl ! image_t_impl label_t_impl ; *************** *** 62,66 **** <define>WINVER=0x501 <define>_WIN32_WINNT=0x501 <define>_WIN32_IE=0x501 ! <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib shell32.lib" # --- 66,70 ---- <define>WINVER=0x501 <define>_WIN32_WINNT=0x501 <define>_WIN32_IE=0x501 ! <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib shell32.lib comdlg32.lib" # |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:09
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/fltk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future/widgets/sources/fltk Modified Files: ui_core_implementation.cpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/fltk/ui_core_implementation.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ui_core_implementation.cpp 3 Feb 2006 18:33:37 -0000 1.6 --- ui_core_implementation.cpp 27 Feb 2006 20:41:59 -0000 1.7 *************** *** 1253,1257 **** void static_text_t::implementation_t::initialize( const fltk::Rectangle& bounds, ! const std::string& name) { // --- 1253,1258 ---- void static_text_t::implementation_t::initialize( const fltk::Rectangle& bounds, ! const std::string& name, ! std::size_t /*characters*/) { // |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:09
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future/widgets/sources Modified Files: client_assembler.cpp Added Files: image_t.cpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. --- NEW FILE: image_t.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/widgets/headers/image_t.hpp> #include "image_t_impl.hpp" /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ image_t::image_t(GIL::rgba8_image& image) : object_m(new implementation_t(image)) { } image_t::image_t(const image_t& rhs) : object_m(new implementation_t(*rhs.object_m)) { } image_t& image_t::operator= (const image_t& rhs) { *object_m = *rhs.object_m; return *this; } image_t::~image_t() { delete object_m; } extents_t image_t::measure() { return object_m->measure(); } void image_t::place(const point_2d_t& position, const extents_t& extents) { object_m->place(position, extents); } void image_t::enable(bool make_enabled) { object_m->enable(make_enabled); } void image_t::set(GIL::rgba8_image& image) { object_m->set(image); } bool operator == (const image_t& x, const image_t& y) { return *x.object_m == *y.object_m; } image_t::implementation_t& image_t::implementation() { assert(object_m); return *object_m; } const image_t::implementation_t& image_t::implementation() const { assert(object_m); return *object_m; } /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/client_assembler.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** client_assembler.cpp 23 Feb 2006 23:28:55 -0000 1.10 --- client_assembler.cpp 27 Feb 2006 20:41:59 -0000 1.11 *************** *** 53,56 **** --- 53,61 ---- #include <adobe/future/enum_ops.hpp> + #include <adobe/future/widgets/headers/image_t.hpp> + + #include <adobe/gil/extension/io/io_factory.hpp> + #include <adobe/gil/extension/io/targa.hpp> + #include "ui_core.hpp" #include "display.hpp" *************** *** 59,62 **** --- 64,101 ---- /*************************************************************************************************/ + #if 0 + ADOBE_GIL_NAMESPACE_BEGIN + + /*************************************************************************************************/ + + template <typename ViewType> + struct image_io_dispatch<GIL::targa_t, ViewType> + { + typedef GIL::targa_t value_type; + typedef ViewType view_type; + typedef GIL::image<view_type> image_type; + + inline bool detect(const value_type& value, + std::streambuf& stream_buffer) const + { return value.detect(stream_buffer); } + + inline void read(const value_type& value, + image_type& image, + std::streambuf& stream_buffer, + adobe::dictionary_t parameters = adobe::dictionary_t()) const + { value.read(image, stream_buffer, parameters); } + + inline void write(const value_type& value, + const view_type& image_view, + std::streambuf& stream_buffer, + adobe::dictionary_t parameters = adobe::dictionary_t()) const + { value.write(image_view, stream_buffer, parameters); } + }; + + /*************************************************************************************************/ + + ADOBE_GIL_NAMESPACE_END + #endif + /*************************************************************************************************/ namespace adobe { *************** *** 141,144 **** --- 180,184 ---- const adobe::static_name_t name_button ("button"); const adobe::static_name_t name_checkbox ("checkbox"); + const adobe::static_name_t name_image ("image"); const adobe::static_name_t name_link ("link"); const adobe::static_name_t name_label ("label"); *************** *** 942,945 **** --- 982,1026 ---- /*************************************************************************************************/ + GIL::image_factory_t<GIL::rgba8_view>& gil_image_factory() + { + typedef GIL::rgba8_view view_type; + typedef GIL::image_factory_t<view_type> factory_type; + typedef factory_type::image_format_type format_type; + + static factory_type factory_s; + static bool inited(false); + + if (!inited) + { + inited = true; + + factory_s.register_format(format_type(adobe::static_name_t("targa"), GIL::targa_t<view_type>())); + } + + return factory_s; + } + + /*************************************************************************************************/ + + void load_image_from_name(const boost::filesystem::path& image_path, GIL::rgba8_image& image) + { + if (!boost::filesystem::exists(image_path)) + { + boost::filesystem::path complete_path(boost::filesystem::complete(image_path)); + + throw std::runtime_error(("client_assembler: load_image_from_name: could not locate file \"" + + complete_path.string() + + "\"").c_str()); + } + + boost::filesystem::filebuf filebuf; + + filebuf.open(image_path, std::ios_base::in | std::ios_base::binary); + + gil_image_factory().read(image, filebuf); + } + + /*************************************************************************************************/ + } // namespace *************** *** 3198,3201 **** --- 3279,3326 ---- #endif } + widget_node_t image_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token) + { + std::string image; + + parameters.get<std::string>(key_image, image); + + GIL::rgba8_image actual_image; + + load_image_from_name(boost::filesystem::path(token.working_directory_m / image), actual_image); + + adobe::image_t* control(new adobe::image_t(actual_image)); + + adobe::display_t::position_t display_token = adobe::insert(adobe::get_main_display(), parent.display_token_m, *control); + + adobe::display_t::position_t overlay_token = token.client_holder_m.overlay_m.insert(parent.overlay_token_m); + + adobe::eve_t::signal_suite_t signals; + + signals.eve_calculate_proc_m = boost::bind(&generic_widget_calculate<adobe::image_t>, boost::ref(*control), _1); + + #ifndef NDEBUG + signals.eve_place_proc_m = boost::bind(&generic_widget_place<adobe::image_t>, boost::ref(*control), _1, _2, boost::ref(token.client_holder_m.overlay_m), overlay_token); + #else + signals.eve_place_proc_m = boost::bind(&generic_widget_place<adobe::image_t>, boost::ref(*control), _1, _2); + #endif + + adobe::eve_t::iterator eve_token = + token.client_holder_m.eve_m.add_view_element(parent.eve_token_m, + adobe::eve_t::insert_element_t( + adobe::eve_t::calculate_data_t(), + false, + parameters, + signals) + ); + + token.client_holder_m.assemblage_m.delete_on_destruction(control); + + #ifndef NDEBUG + return adobe::widget_node_t(parent.size_m, eve_token, display_token, overlay_token); + #else + return adobe::widget_node_t(parent.size_m, eve_token, display_token); + #endif + } + widget_node_t edit_text_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token) { *************** *** 3278,3281 **** --- 3403,3407 ---- else if (name == name_label) return label_factory(parameters, parent, token); else if (name == adobe::static_name_t("static_text")) return label_factory(parameters, parent, token); + else if (name == name_image) return image_factory(parameters, parent, token); else if (name == name_progress_bar) return progress_bar_factory(parameters, parent, token); else if (name == name_tab_group) return tab_group_factory(parameters, parent, token); *************** *** 3381,3385 **** boost::ref(*this), window, _1, _2), dialog_size, ! widget_factory_m).release(); sheet_m.update(); // Force values to their correct states. --- 3507,3512 ---- boost::ref(*this), window, _1, _2), dialog_size, ! widget_factory_m, ! directory_path_m).release(); sheet_m.update(); // Force values to their correct states. *************** *** 3418,3422 **** boost::ref(*this), window, _1, _2), dialog_size, ! widget_factory_m).release(); sheet_m.update(); // Force values to their correct states. --- 3545,3550 ---- boost::ref(*this), window, _1, _2), dialog_size, ! widget_factory_m, ! directory_path_m).release(); sheet_m.update(); // Force values to their correct states. *************** *** 3528,3538 **** /*************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( adobe::name_t file_path, ! const adobe::line_position_t::getline_proc_t& getline_proc, ! std::istream& stream, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory) { adobe::auto_ptr<eve_client_holder> result(new eve_client_holder()); --- 3656,3667 ---- /*************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( adobe::name_t file_path, ! const adobe::line_position_t::getline_proc_t& getline_proc, ! std::istream& stream, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory, ! const boost::filesystem::path& working_directory) { adobe::auto_ptr<eve_client_holder> result(new eve_client_holder()); *************** *** 3540,3544 **** sheet, *(result.get()), ! notifier ); --- 3669,3674 ---- sheet, *(result.get()), ! notifier, ! working_directory ); |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:07
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future/widgets/headers/win32 Added Files: image_t_impl.hpp os_utilities.hpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. --- NEW FILE: image_t_impl.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_IMAGE_T_IMPL_HPP #define ADOBE_IMAGE_T_IMPL_HPP /****************************************************************************************************/ #include <windows.h> #include "ui_core.hpp" #include "image_t.hpp" #include <adobe/future/memory.hpp> #include <boost/operators.hpp> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ typedef adobe::auto_resource<HWND> auto_hwnd_t; /****************************************************************************************************/ struct image_t::implementation_t : boost::equality_comparable<image_t::implementation_t> { implementation_t(GIL::rgba8_image& image); implementation_t(const implementation_t& rhs); implementation_t& operator= (const implementation_t& rhs); void initialize(); extents_t measure(); void place(const point_2d_t& position, const extents_t& extents); void enable(bool make_enabled); void set(GIL::rgba8_image& image); inline friend bool operator==(const adobe::image_t::implementation_t& x, const adobe::image_t::implementation_t& y) { return &x == &y; } auto_hwnd_t window_m; GIL::rgba8_image image_m; }; /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif /****************************************************************************************************/ --- 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 <boost/filesystem/path.hpp> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ namespace implementation { /****************************************************************************************************/ bool pick_save_path(boost::filesystem::path& path); /****************************************************************************************************/ } // namespace implementation /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-27 20:42:05
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/future Modified Files: modal_dialog_interface.hpp Added Files: alert.hpp endian.hpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. --- NEW FILE: alert.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) */ /****************************************************************************************************/ #include <adobe/name.hpp> #include <utility> #include <boost/filesystem/path.hpp> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ // The Uber Alert API std::pair<adobe::name_t, bool> alert(const char* window_name, const char* message_text, adobe::name_t* first_button_name, adobe::name_t* last_button_name, const char* checkbox_name = 0, const boost::filesystem::path& icon_path = boost::filesystem::path(), std::size_t default_button_index = 0, std::size_t cancel_button_index = 1); /****************************************************************************************************/ struct alert_helper_t { typedef std::vector<adobe::name_t> name_set_t; alert_helper_t() : window_name_m(""), message_m("I'm trying to think but nothing happens!"), default_button_index_m(0), cancel_button_index_m(1) { } std::pair<adobe::name_t, bool> run() { if (name_set_m.empty()) name_set_m.push_back(adobe::static_name_t("OK")); adobe::name_t* first(&name_set_m[0]); return adobe::alert(window_name_m.c_str(), message_m.c_str(), first, first + name_set_m.size(), checkbox_name_m.empty() ? 0 : checkbox_name_m.c_str(), icon_path_m, default_button_index_m, cancel_button_index_m); } std::string window_name_m; std::string message_m; name_set_t name_set_m; std::string checkbox_name_m; boost::filesystem::path icon_path_m; std::size_t default_button_index_m; std::size_t cancel_button_index_m; }; /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ Index: modal_dialog_interface.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/modal_dialog_interface.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** modal_dialog_interface.hpp 3 Feb 2006 18:33:36 -0000 1.2 --- modal_dialog_interface.hpp 27 Feb 2006 20:41:58 -0000 1.3 *************** *** 7,14 **** /****************************************************************************************************/ - #include <utility> #include <adobe/dictionary.hpp> #include <adobe/array.hpp> /****************************************************************************************************/ --- 7,18 ---- /****************************************************************************************************/ #include <adobe/dictionary.hpp> #include <adobe/array.hpp> + #include <boost/function.hpp> + #include <boost/filesystem/path.hpp> + + #include <utility> + /****************************************************************************************************/ *************** *** 34,43 **** }; ! 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); /****************************************************************************************************/ --- 38,52 ---- }; ! ! typedef boost::function <bool (adobe::name_t, const adobe::value_t&)> action_callback_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, ! action_callback_t callback, ! const boost::filesystem::path& working_directory); /****************************************************************************************************/ --- NEW FILE: endian.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_ENDIAN_HPP #define ADOBE_ENDIAN_HPP /****************************************************************************************************/ #include <adobe/config.hpp> #include <boost/detail/endian.hpp> /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ struct endian { enum type { big, little, #if defined(BOOST_BIG_ENDIAN) platform = big, #elif defined(BOOST_LITTLE_ENDIAN) platform = little, #endif }; enum platform_test { is_big = platform == big, is_little = platform == little }; }; /*************************************************************************************************/ namespace implementation { /*************************************************************************************************/ template <bool NeedsIt> struct byteswap { template <typename T> void operator()(T& x) const { enum { size = sizeof(T), end = size >> 1 }; for (std::size_t i(0); i < end; ++i) std::swap(reinterpret_cast<char*>(&x)[i], reinterpret_cast<char*>(&x)[size - i - 1]); } }; template <> struct byteswap<false> { template <typename T> void operator()(T&) const { } }; /*************************************************************************************************/ } // namespace implementation /*************************************************************************************************/ template <adobe::endian::type SourceEndian> struct endian_swap { enum { need_swap = SourceEndian != adobe::endian::platform }; template <typename T> void operator()(T& x) const { adobe::implementation::byteswap<need_swap>()(x); } }; /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-27 20:39:12
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/gil_io_factory In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7147/adobe/test/gil_io_factory Log Message: Directory /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/gil_io_factory added to the repository |
From: Foster B. <fos...@us...> - 2006-02-27 20:39:11
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/extension/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7147/adobe/gil/extension/io Log Message: Directory /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/extension/io added to the repository |
From: Foster B. <fos...@us...> - 2006-02-27 20:39:08
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/extension/argb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7147/adobe/gil/extension/argb Log Message: Directory /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/extension/argb added to the repository |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:36
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/future/widgets/headers/mac Modified Files: os_utilities.hpp ui_core_implementation.hpp Added Files: label_t_impl.hpp Log Message: the state of things. We've been working to isolate static_text_t (now called label_t) but it has been slow going because we're trying to wrestle with perfecting the API and what effect that has on other components that were using label_t in a way that isn't in accordance with the new API we're trying to write. As it stands static_disabled_text_m is broken on both platforms, but everything else should be working better. Index: ui_core_implementation.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/mac/ui_core_implementation.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ui_core_implementation.hpp 3 Feb 2006 18:33:36 -0000 1.8 --- ui_core_implementation.hpp 23 Feb 2006 23:28:55 -0000 1.9 *************** *** 28,31 **** --- 28,33 ---- #include <adobe/array.hpp> + #include "label_t_impl.hpp" + /****************************************************************************************************/ *************** *** 606,665 **** /****************************************************************************************************/ - struct static_text_hit_handler_t : implementation::event_handler<implementation::static_text_hit_proc_t> - { - explicit static_text_hit_handler_t(static_text_t::implementation_t& widget) : - widget_m(widget) - { - insert_event(kEventClassControl, kEventControlClick); - } - - ::OSStatus handle_event( ::EventHandlerCallRef next, - ::EventRef event); - - static_text_t::implementation_t& widget_m; - }; - - /****************************************************************************************************/ - - struct static_text_t::implementation_t - { - - implementation_t(); - implementation_t(const implementation_t& rhs); - - void initialize(const Rect& bounds, const std::string& name); - - extents_t best_bounds(); - void set_bounds(const point_2d_t& position, const extents_t& extents); - - void set_name(const std::string& name); - - void set_theme(theme_t theme) { implementation::set_theme(*this, theme); } - void adorn_theme(theme_t theme) { implementation::adorn_theme(*this, theme); } - void unadorn_theme(theme_t theme) { implementation::unadorn_theme(*this, theme); } - - void set_active(bool make_active) { implementation::set_active(control_m, make_active); } - void set_visible(bool make_visible) { implementation::set_visible(control_m, make_visible); } - - long best_height_given_width(long width); - - void signal_hit(const implementation::static_text_hit_proc_t& proc); - - ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::static_text_t::implementation_t); - - ::ControlRef control_m; - theme_t theme_m; - metric_extractor_t metrics_m; - static_text_hit_handler_t hit_handler_m; - }; - - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - class mouse_in_out_event_tag_t { } ; --- 608,611 ---- *************** *** 752,757 **** long rows); ! static_text_t& get_label() { return name_m; } ! const static_text_t& get_label() const { return name_m; } extents_t best_bounds(); --- 698,703 ---- long rows); ! label_t& get_label() { return name_m; } ! const label_t& get_label() const { return name_m; } extents_t best_bounds(); *************** *** 781,807 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::edit_text_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! ::HIViewRef scroll_control_m; ! static_text_t name_m; ! std::string field_text_m; ! static_text_t static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! bool scrollable_m; ! bool password_m; ! long rows_m; ! long cols_m; ! long static_width_m; ! long static_height_m; ! long static_baseline_m; ! long edit_height_m; ! long edit_baseline_m; ! mouse_in_out_event_handler_t mouse_handler_m; ! edit_text_pre_handler_t pre_edit_handler_m; ! edit_text_post_handler_t post_edit_handler_m; ! edit_textview_validator_t textview_validation_handler_m; ! focus_handler_t focus_handler_m; }; --- 727,753 ---- ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::edit_text_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! ::HIViewRef scroll_control_m; ! label_t name_m; ! std::string field_text_m; ! label_t static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! bool scrollable_m; ! bool password_m; ! long rows_m; ! long cols_m; ! long static_width_m; ! long static_height_m; ! long static_baseline_m; ! long edit_height_m; ! long edit_baseline_m; ! mouse_in_out_event_handler_t mouse_handler_m; ! edit_text_pre_handler_t pre_edit_handler_m; ! edit_text_post_handler_t post_edit_handler_m; ! edit_textview_validator_t textview_validation_handler_m; ! focus_handler_t focus_handler_m; }; *************** *** 882,896 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::popup_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! std::string name_m; ! static_text_t static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! menu_items_t menu_items_m; ! popup_value_handler_t value_handler_m; ! popup_key_handler_t key_handler_m; ! focus_handler_t focus_handler_m; }; --- 828,842 ---- ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::popup_t::implementation_t); ! ::ControlRef control_m; ! theme_t theme_m; ! metric_extractor_t metrics_m; ! std::string name_m; ! label_t static_disabled_text_m; ! bool static_disabled_m; ! bool using_label_m; ! menu_items_t menu_items_m; ! popup_value_handler_t value_handler_m; ! popup_key_handler_t key_handler_m; ! focus_handler_t focus_handler_m; }; *************** *** 1039,1043 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::progress_bar_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::separator_t::implementation_t); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::static_text_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::edit_text_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::popup_t::implementation_t); --- 985,989 ---- ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::progress_bar_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::separator_t::implementation_t); ! ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::label_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::edit_text_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::popup_t::implementation_t); --- NEW FILE: label_t_impl.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_WIDGET_LABEL_T_IMPLEMENTATION_HPP #define ADOBE_WIDGET_LABEL_T_IMPLEMENTATION_HPP /****************************************************************************************************/ #include <adobe/future/widgets/headers/label_t.hpp> #include "os_utilities.hpp" #include "carbon_safe.hpp" #include "metric_extractor.hpp" /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ #if 0 struct label_hit_handler_t : implementation::event_handler<implementation::label_hit_proc_t> { explicit label_hit_handler_t(label_t::implementation_t& widget) : widget_m(widget) { insert_event(kEventClassControl, kEventControlClick); } ::OSStatus handle_event( ::EventHandlerCallRef next, ::EventRef event); label_t::implementation_t& widget_m; }; #endif /****************************************************************************************************/ struct label_t::implementation_t { implementation_t(const std::string& name, std::size_t characters, theme_t theme); implementation_t(const implementation_t& rhs); implementation_t& operator=(const implementation_t& rhs); extents_t::slice_t measure_horizontal(); extents_t::slice_t measure_vertical(const extents_t::slice_t& horizontal); void place(const point_2d_t& position, const extents_t& extents) { implementation::set_bounds(*this, position, extents); } void enable(bool make_enabled) { implementation::set_active(control_m, make_enabled); } #if 0 void signal_hit(const implementation::label_hit_proc_t& proc); #endif inline friend bool operator== (const adobe::label_t::implementation_t& x, const adobe::label_t::implementation_t& y) { return &x == &y; } ::ControlRef control_m; theme_t theme_m; metric_extractor_t metrics_m; std::size_t characters_m; #if 0 label_hit_handler_t hit_handler_m; #endif }; /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif /****************************************************************************************************/ Index: os_utilities.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/mac/os_utilities.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** os_utilities.hpp 3 Feb 2006 18:33:36 -0000 1.1 --- os_utilities.hpp 23 Feb 2006 23:28:55 -0000 1.2 *************** *** 348,351 **** --- 348,354 ---- /****************************************************************************************************/ + // this is using ATSUI on the backend, and should be replaced by measure_theme_text + // once we remove all the specializations for adobe::theme_t + adobe::extents_t get_text_dimensions(const std::string& text, adobe::theme_t theme); *************** *** 585,588 **** --- 588,595 ---- /****************************************************************************************************/ + + adobe::extents_t measure_theme_text(const std::string& text, adobe::theme_t theme); + + /****************************************************************************************************/ /****************************************************************************************************/ /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:36
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/future/widgets/sources Modified Files: client_assembler.cpp ui_core.cpp Added Files: label_t.cpp Log Message: the state of things. We've been working to isolate static_text_t (now called label_t) but it has been slow going because we're trying to wrestle with perfecting the API and what effect that has on other components that were using label_t in a way that isn't in accordance with the new API we're trying to write. As it stands static_disabled_text_m is broken on both platforms, but everything else should be working better. --- NEW FILE: label_t.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/widgets/headers/label_t.hpp> #include "label_t_impl.hpp" /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ label_t::label_t(const std::string& name, std::size_t characters, theme_t theme) : object_m(new implementation_t(name, characters, theme)) { } label_t::label_t(const label_t& rhs) : object_m(new implementation_t(*rhs.object_m)) { } label_t& label_t::operator= (const label_t& rhs) { *object_m = *rhs.object_m; return *this; } label_t::~label_t() { delete object_m; } extents_t::slice_t label_t::measure_horizontal() { return object_m->measure_horizontal(); } extents_t::slice_t label_t::measure_vertical(const extents_t::slice_t& horizontal) { return object_m->measure_vertical(horizontal); } void label_t::place(const point_2d_t& position, const extents_t& extents) { object_m->place(position, extents); } void label_t::enable(bool make_enabled) { object_m->enable(make_enabled); } bool operator == (const label_t& x, const label_t& y) { return *x.object_m == *y.object_m; } label_t::implementation_t& label_t::implementation() { assert(object_m); return *object_m; } const label_t::implementation_t& label_t::implementation() const { assert(object_m); return *object_m; } /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ Index: ui_core.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/ui_core.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ui_core.cpp 3 Feb 2006 18:33:37 -0000 1.7 --- ui_core.cpp 23 Feb 2006 23:28:55 -0000 1.8 *************** *** 38,42 **** ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DEFINITION(progress_bar_t); ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DEFINITION(separator_t); - ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DEFINITION(static_text_t); ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DEFINITION(edit_text_t); ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DEFINITION(popup_t); --- 38,41 ---- *************** *** 553,608 **** /****************************************************************************************************/ - static_text_t::static_text_t() : - object_m(new implementation_t()) - { } - - static_text_t::static_text_t(const static_text_t& rhs) : - object_m(new implementation_t(*rhs.object_m)) - { } - - static_text_t::~static_text_t() - { delete object_m; } - - void static_text_t::initialize(const std::string& name) - { object_m->initialize(initial_bounds_g, name); } - - extents_t static_text_t::best_bounds() - { return object_m->best_bounds(); } - - void static_text_t::set_bounds(const point_2d_t& position, const extents_t& geometry) - { object_m->set_bounds(position, geometry); } - - void static_text_t::set_name(const std::string& name) - { object_m->set_name(name); } - - void static_text_t::set_theme(theme_t theme) - { object_m->set_theme(theme); } - - void static_text_t::adorn_theme(theme_t theme) - { object_m->adorn_theme(theme); } - - void static_text_t::unadorn_theme(theme_t theme) - { object_m->unadorn_theme(theme); } - - void static_text_t::set_active(bool make_active) - { object_m->set_active(make_active); } - - void static_text_t::set_visible(bool make_visible) - { object_m->set_visible(make_visible); } - - long static_text_t::best_height_given_width(long width) - { return object_m->best_height_given_width(width); } - - void static_text_t::signal_hit(implementation::static_text_hit_proc_t proc) - { object_m->signal_hit(proc); } - - /****************************************************************************************************/ - - #if 0 - #pragma mark - - #endif - - /****************************************************************************************************/ - edit_text_t::edit_text_t() : object_m(new implementation_t()) --- 552,555 ---- *************** *** 908,912 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DEFINITION(adobe::progress_bar_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DEFINITION(adobe::separator_t); - ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DEFINITION(adobe::static_text_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DEFINITION(adobe::edit_text_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DEFINITION(adobe::popup_t); --- 855,858 ---- *************** *** 933,937 **** ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(progress_bar_t); ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(separator_t); - ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(static_text_t); ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(edit_text_t); ADOBE_IMPLEMENTATION_ACCESSOR_FUNCTIONALITY(popup_t); --- 879,882 ---- Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/client_assembler.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** client_assembler.cpp 3 Feb 2006 18:33:37 -0000 1.9 --- client_assembler.cpp 23 Feb 2006 23:28:55 -0000 1.10 *************** *** 19,22 **** --- 19,24 ---- #include <boost/bind.hpp> #include <boost/filesystem/path.hpp> + #include <boost/filesystem/operations.hpp> + #include <boost/filesystem/convenience.hpp> #include <boost/filesystem/fstream.hpp> *************** *** 36,39 **** --- 38,49 ---- #include <adobe/static_table.hpp> + #include <adobe/future/widgets/headers/label_t.hpp> + /* + #include <adobe/gil/extension/conceptspace/any_standard_image.hpp> + #include <adobe/gil/extension/io/io_factory.hpp> + #include <adobe/gil/extension/io/targa.hpp> + #include <adobe/gil/core/algorithm.hpp> + */ + #ifdef ADOBE_SERIALIZATION #include <adobe/future/iomanip.hpp> *************** *** 132,135 **** --- 142,146 ---- const adobe::static_name_t name_checkbox ("checkbox"); const adobe::static_name_t name_link ("link"); + const adobe::static_name_t name_label ("label"); const adobe::static_name_t name_separator ("separator"); const adobe::static_name_t name_slider ("slider"); *************** *** 137,141 **** const adobe::static_name_t name_edit_text ("edit_text"); const adobe::static_name_t name_edit_number ("edit_number"); - const adobe::static_name_t name_static_text ("static_text"); const adobe::static_name_t name_popup ("popup"); const adobe::static_name_t name_popup_cluster ("popup_cluster"); --- 148,151 ---- *************** *** 160,163 **** --- 170,174 ---- const adobe::static_name_t key_name ("name"); + const adobe::static_name_t key_image ("image"); const adobe::static_name_t key_value ("value"); const adobe::static_name_t key_tooltip ("tooltip"); *************** *** 638,658 **** /*************************************************************************************************/ - struct static_text_proxy_t : client_proxy_t, adobe::extents_slices_t - { - typedef adobe::static_text_t widget_type_t; - - explicit static_text_proxy_t(const adobe::dictionary_t& parameters, const adobe::factory_token_t&, const adobe::widget_node_t&); - - void calculate(adobe::eve_t::calculate_data_t&); - void calculate_vertical(adobe::eve_t::calculate_data_t& gdata, const adobe::eve_t::place_data_t& pdata); - void place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data); - - private: - bool wrap_m; - widget_type_t static_m; - }; - - /*************************************************************************************************/ - struct edit_number_proxy_t : client_proxy_t, adobe::extents_slices_t { --- 649,652 ---- *************** *** 894,902 **** /*************************************************************************************************/ ! void best_bounds_data_convert_slice(const adobe::extents_t& ideal, adobe::eve_t::calculate_data_t& result, adobe::extents_slices_t::slice_select_t slice) { - const adobe::extents_t::slice_t& src_slice(ideal.slice_m[slice]); - adobe::eve_t::calculate_data_t::slice_t& dst_slice(result.slice_m[slice]); - dst_slice.length_m = src_slice.length_m; dst_slice.outset_m = src_slice.outset_m; --- 888,894 ---- /*************************************************************************************************/ ! void to_calculate_data_slice(const adobe::extents_t::slice_t& src_slice, ! adobe::eve_t::calculate_data_t::slice_t& dst_slice) { dst_slice.length_m = src_slice.length_m; dst_slice.outset_m = src_slice.outset_m; *************** *** 909,912 **** --- 901,916 ---- /*************************************************************************************************/ + void to_extents_slice(const adobe::eve_t::calculate_data_t::slice_t& src_slice, adobe::extents_t::slice_t& dst_slice) + { + dst_slice.length_m = src_slice.length_m; + dst_slice.outset_m = src_slice.outset_m; + dst_slice.inset_m = src_slice.inset_m; + dst_slice.frame_m = src_slice.frame_m; + + adobe::copy(src_slice.guide_set_m, std::back_inserter(dst_slice.poi_m)); + } + + /*************************************************************************************************/ + } // namespace implementation *************** *** 927,932 **** adobe::eve_t::calculate_data_t measure_extents_converter(const adobe::extents_t& ideal, adobe::eve_t::calculate_data_t& result) { ! implementation::best_bounds_data_convert_slice(ideal, result, adobe::extents_slices_t::horizontal); ! implementation::best_bounds_data_convert_slice(ideal, result, adobe::extents_slices_t::vertical); return result; --- 931,939 ---- adobe::eve_t::calculate_data_t measure_extents_converter(const adobe::extents_t& ideal, adobe::eve_t::calculate_data_t& result) { ! implementation::to_calculate_data_slice(ideal.slice_m[adobe::extents_slices_t::horizontal], ! result.slice_m[adobe::extents_slices_t::horizontal]); ! ! implementation::to_calculate_data_slice(ideal.slice_m[adobe::extents_slices_t::vertical], ! result.slice_m[adobe::extents_slices_t::vertical]); return result; *************** *** 992,1004 **** /*************************************************************************************************/ - template <> - void calculate_vertical<static_text_proxy_t> - (static_text_proxy_t& t, adobe::eve_t::calculate_data_t& u, const adobe::eve_t::place_data_t& v) - { - t.calculate_vertical(u, v); - } - - /*************************************************************************************************/ - template <class T> void place(T& t, const adobe::eve_t::calculate_data_t& u, const adobe::eve_t::place_data_t& v) --- 999,1002 ---- *************** *** 1247,1314 **** } - /*************************************************************************************************/ - - #if 0 - #pragma mark - - #endif - - /*************************************************************************************************/ - - static_text_proxy_t::static_text_proxy_t( const adobe::dictionary_t& parameters, - const adobe::factory_token_t& token, - const adobe::widget_node_t& parent) : - client_proxy_t(parameters, token), - wrap_m(false) - { - parameters.get<bool>(key_wrap, wrap_m); - - static_m.initialize(name_m); - - set_up_control(*this, static_m, parent, token); - } - - /*************************************************************************************************/ - - enum { static_wrap_width = 100 }; - - void static_text_proxy_t::calculate(adobe::eve_t::calculate_data_t& geometry) - { - adobe::extents_t ideal(static_m.best_bounds()); - - if (wrap_m) - ideal.width() = std::min<long>(static_wrap_width, ideal.width()); - - geometry.slice_m[horizontal].length_m = ideal.width(); - - if (!wrap_m) - { - geometry.slice_m[vertical].length_m = ideal.height(); - - adobe::copy(ideal.slice_m[vertical].poi_m, - std::back_inserter<adobe::guide_set_t>(geometry.slice_m[vertical].guide_set_m)); - } - } - - /*************************************************************************************************/ - - void static_text_proxy_t::calculate_vertical(adobe::eve_t::calculate_data_t& gdata, const adobe::eve_t::place_data_t& pdata) - { - if (!wrap_m) return; - - gdata.slice_m[vertical].length_m = static_m.best_height_given_width(pdata.slice_m[horizontal].length_m); - } - - /*************************************************************************************************/ - - void static_text_proxy_t::place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data) - { - place_converter_result_t conv(place_data_converter(data)); - - #ifndef NDEBUG - overlay_m->place(overlay_token_m, conv.first, conv.second); - #endif - - static_m.set_bounds(conv.first, conv.second); - } /*************************************************************************************************/ --- 1245,1248 ---- *************** *** 2562,2565 **** --- 2496,2523 ---- template <typename T> + inline void generic_widget_measure_horizontal(T& widget, adobe::eve_t::calculate_data_t& geometry) + { + adobe::extents_t::slice_t h_slice(widget.measure_horizontal()); + + implementation::to_calculate_data_slice(h_slice, geometry.slice_m[adobe::extents_slices_t::horizontal]); + } + + /*************************************************************************************************/ + + template <typename T> + inline void generic_widget_measure_vertical(T& widget, adobe::eve_t::calculate_data_t& geometry) + { + adobe::extents_t::slice_t h_slice; + + implementation::to_extents_slice(geometry.slice_m[adobe::extents_slices_t::horizontal], h_slice); + + adobe::extents_t::slice_t v_slice(widget.measure_vertical(h_slice)); + + implementation::to_calculate_data_slice(v_slice, geometry.slice_m[adobe::extents_slices_t::vertical]); + } + + /*************************************************************************************************/ + + template <typename T> void generic_widget_place( T& widget, const adobe::eve_t::calculate_data_t&, *************** *** 3126,3130 **** size_enum_t size(parent.size_m); ! if (parameters.count(key_size)) size = enumerate_size(parameters.get<adobe::name_t>(key_size)); adobe::theme_t theme(size_to_theme(size)); --- 3084,3089 ---- size_enum_t size(parent.size_m); ! if (parameters.count(key_size)) ! size = enumerate_size(parameters.get<adobe::name_t>(key_size)); adobe::theme_t theme(size_to_theme(size)); *************** *** 3193,3196 **** --- 3152,3201 ---- #endif } + widget_node_t label_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token) + { + std::string name; + long characters(0); + size_enum_t size(parent.size_m); + + if (parameters.count(key_size)) + size = enumerate_size(parameters.get<adobe::name_t>(key_size)); + + parameters.get<std::string>(key_name, name); + parameters.get<long>(key_characters, characters); + + adobe::label_t* control(new adobe::label_t(name, characters, size_to_theme(size))); + + adobe::display_t::position_t display_token = adobe::insert(adobe::get_main_display(), parent.display_token_m, *control); + + adobe::display_t::position_t overlay_token = token.client_holder_m.overlay_m.insert(parent.overlay_token_m); + + adobe::eve_t::signal_suite_t signals; + + signals.eve_calculate_proc_m = boost::bind(&generic_widget_measure_horizontal<adobe::label_t>, boost::ref(*control), _1); + signals.eve_calculate_vertical_proc_m = boost::bind(&generic_widget_measure_vertical<adobe::label_t>, boost::ref(*control), _1); + + #ifndef NDEBUG + signals.eve_place_proc_m = boost::bind(&generic_widget_place<adobe::label_t>, boost::ref(*control), _1, _2, boost::ref(token.client_holder_m.overlay_m), overlay_token); + #else + signals.eve_place_proc_m = boost::bind(&generic_widget_place<adobe::label_t>, boost::ref(*control), _1, _2); + #endif + + adobe::eve_t::iterator eve_token = + token.client_holder_m.eve_m.add_view_element(parent.eve_token_m, + adobe::eve_t::insert_element_t( + adobe::eve_t::calculate_data_t(), + false, + parameters, + signals) + ); + + token.client_holder_m.assemblage_m.delete_on_destruction(control); + + #ifndef NDEBUG + return adobe::widget_node_t(size, eve_token, display_token, overlay_token); + #else + return adobe::widget_node_t(size, eve_token, display_token); + #endif + } widget_node_t edit_text_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token) { *************** *** 3201,3208 **** return wire_to_eve<edit_number_proxy_t>(token, parent, parameters); } - widget_node_t static_text_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token) - { - return wire_to_eve<static_text_proxy_t>(token, parent, parameters); - } widget_node_t popup_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token) { --- 3206,3209 ---- *************** *** 3269,3273 **** else if (name == name_edit_text) return edit_text_factory(parameters, parent, token); else if (name == name_edit_number) return edit_number_factory(parameters, parent, token); - else if (name == name_static_text) return static_text_factory(parameters, parent, token); else if (name == name_popup) return popup_factory(parameters, parent, token); else if (name == name_group) return group_factory(parameters, parent, token); --- 3270,3273 ---- *************** *** 3276,3279 **** --- 3276,3281 ---- else if (name == name_separator) return separator_factory(parameters, parent, token); else if (name == name_link) return link_factory(parameters, parent, token); + else if (name == name_label) return label_factory(parameters, parent, token); + else if (name == adobe::static_name_t("static_text")) return label_factory(parameters, parent, token); else if (name == name_progress_bar) return progress_bar_factory(parameters, parent, token); else if (name == name_tab_group) return tab_group_factory(parameters, parent, token); *************** *** 3345,3351 **** /*************************************************************************************************/ ! window_server_t::window_server_t(const char* directory_path, adobe::sheet_t& sheet) : sheet_m(sheet), ! directory_path_m(directory_path), widget_factory_m(adobe::default_factory) { } --- 3347,3353 ---- /*************************************************************************************************/ ! window_server_t::window_server_t(const boost::filesystem::path& working_directory, adobe::sheet_t& sheet) : sheet_m(sheet), ! directory_path_m(working_directory), widget_factory_m(adobe::default_factory) { } *************** *** 3362,3367 **** void window_server_t::push_back(const char* name, size_enum_t dialog_size) { ! iterator window(window_list_m.insert(window_list_m.end(), NULL)); ! boost::filesystem::path file_name(directory_path_m + "/" + name, boost::filesystem::native); boost::filesystem::ifstream stream(file_name); --- 3364,3369 ---- void window_server_t::push_back(const char* name, size_enum_t dialog_size) { ! iterator window(window_list_m.insert(window_list_m.end(), NULL)); ! boost::filesystem::path file_name(directory_path_m / name); boost::filesystem::ifstream stream(file_name); *************** *** 3388,3391 **** --- 3390,3394 ---- /*************************************************************************************************/ + void window_server_t::push_back(std::istream& data, adobe::name_t file_path, |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:35
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/config/compiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/config/compiler Modified Files: gcc.hpp visualc.hpp Log Message: the state of things. We've been working to isolate static_text_t (now called label_t) but it has been slow going because we're trying to wrestle with perfecting the API and what effect that has on other components that were using label_t in a way that isn't in accordance with the new API we're trying to write. As it stands static_disabled_text_m is broken on both platforms, but everything else should be working better. Index: gcc.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/config/compiler/gcc.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gcc.hpp 3 Feb 2006 18:33:35 -0000 1.3 --- gcc.hpp 23 Feb 2006 23:28:54 -0000 1.4 *************** *** 7,12 **** /*************************************************************************************************/ ! #ifndef ADOBE_CONFIG_COMPILER_DARWIN_HPP ! #define ADOBE_CONFIG_COMPILER_DARWIN_HPP /*************************************************************************************************/ --- 7,12 ---- /*************************************************************************************************/ ! #ifndef ADOBE_CONFIG_COMPILER_GCC_HPP ! #define ADOBE_CONFIG_COMPILER_GCC_HPP /*************************************************************************************************/ *************** *** 18,21 **** --- 18,27 ---- /*************************************************************************************************/ + #ifndef ADOBE_COMPILER_GCC + #define ADOBE_COMPILER_GCC 1 + #endif + + /*************************************************************************************************/ + // test exceptions here Index: visualc.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/config/compiler/visualc.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** visualc.hpp 3 Feb 2006 18:33:35 -0000 1.3 --- visualc.hpp 23 Feb 2006 23:28:54 -0000 1.4 *************** *** 18,21 **** --- 18,27 ---- /*************************************************************************************************/ + #ifndef ADOBE_COMPILER_MSVC + #define ADOBE_COMPILER_MSVC 1 + #endif + + /*************************************************************************************************/ + #ifndef ADOBE_TEST_MICROSOFT_NO_DEPRECATE #define ADOBE_TEST_MICROSOFT_NO_DEPRECATE 1 |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:35
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/test/begin/examples Modified Files: grow.eve named_function_suite.eve Log Message: the state of things. We've been working to isolate static_text_t (now called label_t) but it has been slow going because we're trying to wrestle with perfecting the API and what effect that has on other components that were using label_t in a way that isn't in accordance with the new API we're trying to write. As it stands static_disabled_text_m is broken on both platforms, but everything else should be working better. Index: grow.eve =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/examples/grow.eve,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** grow.eve 3 Feb 2006 18:33:38 -0000 1.2 --- grow.eve 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 19,23 **** "of this information or reproduction of this material is strictly forbidden " "unless prior written permission is obtained from Adobe Systems Incorporated." ! , wrap: true); button(name: "OK", bind: @done); } --- 19,23 ---- "of this information or reproduction of this material is strictly forbidden " "unless prior written permission is obtained from Adobe Systems Incorporated." ! , characters: 25); button(name: "OK", bind: @done); } Index: named_function_suite.eve =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/examples/named_function_suite.eve,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** named_function_suite.eve 3 Feb 2006 18:33:38 -0000 1.4 --- named_function_suite.eve 23 Feb 2006 23:28:56 -0000 1.5 *************** *** 13,17 **** column(child_horizontal: align_fill) { ! static_text(name: "This dialog is useful for testing the functionality of the named functions. Hit the OK button to see a result set containing values processed by the built-in functions.", wrap: true); group(name: "Contributing Test") --- 13,17 ---- column(child_horizontal: align_fill) { ! static_text(name: "This dialog is useful for testing the functionality of the named functions. Hit the OK button to see a result set containing values processed by the built-in functions.", characters: 25); group(name: "Contributing Test") |