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...> - 2005-04-13 16:21:23
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl/related In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2921/adobe-source/adobe/documentation/sources/asl/related Removed Files: widget_reference.dox Log Message: Beginning widget library documenation; more config.hpp options (thanks Boost!) --- widget_reference.dox DELETED --- |
|
From: Foster B. <fos...@us...> - 2005-04-13 16:19:36
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/widget_lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2063/widget_lib Log Message: Directory /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/widget_lib added to the repository |
|
From: Ralph T. <ra...@us...> - 2005-04-13 12:30:43
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25872/adobe/source Modified Files: eve.cpp Log Message: ASL now compiles on FreeBSD, and probably on Linux. The eve_smoke and adam_tutorial tests compile (with warnings) and run fine using GCC 3.4.2. Index: eve.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/source/eve.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** eve.cpp 4 Apr 2005 16:43:33 -0000 1.5 --- eve.cpp 13 Apr 2005 12:30:28 -0000 1.6 *************** *** 41,45 **** /*************************************************************************************************/ ! #ifdef ADOBE_PLATFORM_WIN #include <cmath> #endif --- 41,45 ---- /*************************************************************************************************/ ! #if defined(ADOBE_PLATFORM_WIN) || defined(ADOBE_PLATFORM_UNIX) #include <cmath> #endif |
|
From: Ralph T. <ra...@us...> - 2005-04-13 12:30:42
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25872/adobe Modified Files: cmath.hpp config.hpp Log Message: ASL now compiles on FreeBSD, and probably on Linux. The eve_smoke and adam_tutorial tests compile (with warnings) and run fine using GCC 3.4.2. Index: config.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/config.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config.hpp 12 Apr 2005 19:53:34 -0000 1.5 --- config.hpp 13 Apr 2005 12:30:27 -0000 1.6 *************** *** 54,57 **** --- 54,61 ---- #define ADOBE_PLATFORM_MAC 1 + #elif defined(__linux__) || defined(__unix) + + #define ADOBE_PLATFORM_UNIX 1 + #else Index: cmath.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/cmath.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** cmath.hpp 12 Apr 2005 19:29:00 -0000 1.5 --- cmath.hpp 13 Apr 2005 12:30:27 -0000 1.6 *************** *** 34,38 **** } // namespace adobe ! #elif defined ADOBE_PLATFORM_WIN namespace adobe { --- 34,38 ---- } // namespace adobe ! #elif defined(ADOBE_PLATFORM_WIN) || defined(ADOBE_PLATFORM_UNIX) namespace adobe { |
|
From: Foster B. <fos...@us...> - 2005-04-12 19:53:42
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18884/adobe-source/adobe Modified Files: config.hpp Log Message: Added cygwin to adobe/config.hpp Index: config.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/config.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config.hpp 30 Mar 2005 18:51:44 -0000 1.4 --- config.hpp 12 Apr 2005 19:53:34 -0000 1.5 *************** *** 44,48 **** /*************************************************************************************************/ ! #if defined(BOOST_MSVC) || defined(__MINGW32__) #define ADOBE_PLATFORM_WIN 1 --- 44,50 ---- /*************************************************************************************************/ ! // REVISIT (fbrereto) : Should cygwin be considered as part of the Windows platform target? ! ! #if defined(BOOST_MSVC) || defined(__MINGW32__) || defined(__CYGWIN__) #define ADOBE_PLATFORM_WIN 1 |
|
From: Foster B. <fos...@us...> - 2005-04-12 19:35:48
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7186/adobe-source/adobe/test/visual/sources Modified Files: client_assembler.cpp Log Message: param swap bug fixed Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** client_assembler.cpp 12 Apr 2005 17:24:47 -0000 1.7 --- client_assembler.cpp 12 Apr 2005 19:35:39 -0000 1.8 *************** *** 1833,1837 **** static_active_ref_m = &assemblage_m->hold_connection(adobe::assemblage_t::connection_t()); ! control_m.initialize(name_m, units_m.size(), digits_m, 1); control_m.set_static_disabled(go_static_m); --- 1833,1837 ---- static_active_ref_m = &assemblage_m->hold_connection(adobe::assemblage_t::connection_t()); ! control_m.initialize(name_m, digits_m, 1, !units_m.empty()); control_m.set_static_disabled(go_static_m); |
|
From: David C. <unc...@us...> - 2005-04-12 19:29:29
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2953/sandbox/adobe-source/adobe Modified Files: cmath.hpp Log Message: types not in std under gcc Index: cmath.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/cmath.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** cmath.hpp 11 Apr 2005 17:06:00 -0000 1.4 --- cmath.hpp 12 Apr 2005 19:29:00 -0000 1.5 *************** *** 26,30 **** #include <cmath> ! #if ADOBE_PLATFORM_MAC namespace adobe { --- 26,30 ---- #include <cmath> ! #if ADOBE_PLATFORM_MAC && defined(__MWERKS__) namespace adobe { |
|
From: Tobias S. <t_s...@us...> - 2005-04-12 19:23:44
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv519/adobe-source/adobe/future Modified Files: memory.hpp Log Message: Adds fixes needed to compile with GCC 3.4 (template "disambiguation" to work around a parser bug and a missing "typename" keyword). Index: memory.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/memory.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** memory.hpp 30 Mar 2005 17:15:54 -0000 1.2 --- memory.hpp 12 Apr 2005 19:23:07 -0000 1.3 *************** *** 164,168 **** static lht runtime_cast (std::auto_ptr<T>& x) { ! lht::element_type* result = dynamic_cast<typename lht::element_type*>(x.get()); if (result) x.release(); return lht(result); --- 164,169 ---- static lht runtime_cast (std::auto_ptr<T>& x) { ! typedef typename lht::element_type* dest_type; ! dest_type result = dynamic_cast<dest_type>(x.get()); if (result) x.release(); return lht(result); *************** *** 182,186 **** static lht runtime_cast (adobe::auto_ptr<T, Traits>& x) { ! lht::element_type* result = dynamic_cast<typename lht::element_type*>(x.get()); if (result) x.release(); return lht(result); --- 183,188 ---- static lht runtime_cast (adobe::auto_ptr<T, Traits>& x) { ! typedef typename lht::element_type* dest_type; ! dest_type result = dynamic_cast<dest_type>(x.get()); if (result) x.release(); return lht(result); *************** *** 200,204 **** static lht runtime_cast (adobe::auto_resource<T, Traits>& x) { ! lht::element_type* result = dynamic_cast<typename lht::element_type*>(x.get()); if (result) x.release(); return lht(result); --- 202,207 ---- static lht runtime_cast (adobe::auto_resource<T, Traits>& x) { ! typedef typename lht::element_type* dest_type; ! dest_type result = dynamic_cast<dest_type>(x.get()); if (result) x.release(); return lht(result); *************** *** 264,271 **** auto_resource(auto_resource&) throw(); ! template <typename Y> auto_resource(auto_resource<Y, typename traits_type::rebind<Y>::other>&) throw(); auto_resource& operator = (auto_resource&) throw(); ! template<typename Y> auto_resource& operator = (auto_resource<Y, typename traits_type::rebind<Y>::other>&) throw(); ~auto_resource() throw(); --- 267,274 ---- auto_resource(auto_resource&) throw(); ! template <typename Y> auto_resource(auto_resource<Y, typename traits_type::template rebind<Y>::other>&) throw(); auto_resource& operator = (auto_resource&) throw(); ! template<typename Y> auto_resource& operator = (auto_resource<Y, typename traits_type::template rebind<Y>::other>&) throw(); ~auto_resource() throw(); *************** *** 283,288 **** auto_resource(auto_resource_ref<X, Traits>) throw(); auto_resource& operator = (auto_resource_ref<X, Traits>) throw(); // addition ! template<typename Y> operator auto_resource_ref<Y, typename traits_type::rebind<Y>::other>() throw(); ! template<typename Y> operator auto_resource<Y, typename traits_type::rebind<Y>::other>() throw(); // Peter Dimov's safe_bool conversion --- 286,291 ---- auto_resource(auto_resource_ref<X, Traits>) throw(); auto_resource& operator = (auto_resource_ref<X, Traits>) throw(); // addition ! template<typename Y> operator auto_resource_ref<Y, typename traits_type::template rebind<Y>::other>() throw(); ! template<typename Y> operator auto_resource<Y, typename traits_type::template rebind<Y>::other>() throw(); // Peter Dimov's safe_bool conversion *************** *** 367,379 **** typedef typename traits_type::element_type element_type; typedef typename traits_type::pointer_type pointer_type; ! typedef typename inherited::auto_resource_ref<X*, Traits> auto_resource_ref_type; // 20.4.5.1 construct/copy/destroy: explicit auto_ptr(pointer_type p = 0) throw(); auto_ptr(auto_ptr& r) throw(); ! template <typename Y> auto_ptr(auto_ptr<Y, typename traits_type::rebind<Y*>::other>& r) throw(); auto_ptr& operator = (auto_ptr&) throw(); ! template<typename Y> auto_ptr& operator = (auto_ptr<Y, typename traits_type::rebind<Y*>::other>&) throw(); // construction and assignment from NULL --- 370,382 ---- typedef typename traits_type::element_type element_type; typedef typename traits_type::pointer_type pointer_type; ! typedef typename inherited::template auto_resource_ref<X*, Traits> auto_resource_ref_type; // 20.4.5.1 construct/copy/destroy: explicit auto_ptr(pointer_type p = 0) throw(); auto_ptr(auto_ptr& r) throw(); ! template <typename Y> auto_ptr(auto_ptr<Y, typename traits_type::template rebind<Y*>::other>& r) throw(); auto_ptr& operator = (auto_ptr&) throw(); ! template<typename Y> auto_ptr& operator = (auto_ptr<Y, typename traits_type::template rebind<Y*>::other>&) throw(); // construction and assignment from NULL *************** *** 396,400 **** auto_ptr(auto_resource_ref_type r) throw(); auto_ptr& operator = (auto_resource_ref_type) throw(); // addition ! template<typename Y> operator auto_ptr<Y, typename traits_type::rebind<Y*>::other>() throw(); }; --- 399,403 ---- auto_ptr(auto_resource_ref_type r) throw(); auto_ptr& operator = (auto_resource_ref_type) throw(); // addition ! template<typename Y> operator auto_ptr<Y, typename traits_type::template rebind<Y*>::other>() throw(); }; *************** *** 422,426 **** template <typename X, class Traits> template <typename Y> ! inline auto_resource <X, Traits>::auto_resource(auto_resource<Y, typename traits_type::rebind<Y>::other>& x) throw() : pointer_m(x.release()) { } --- 425,429 ---- template <typename X, class Traits> template <typename Y> ! inline auto_resource <X, Traits>::auto_resource(auto_resource<Y, typename traits_type::template rebind<Y>::other>& x) throw() : pointer_m(x.release()) { } *************** *** 436,440 **** template <typename Y> inline auto_resource<X, Traits>& auto_resource<X, Traits>::operator = ( ! auto_resource<Y, typename traits_type::rebind<Y>::other>& x) throw() { reset(x.release()); --- 439,443 ---- template <typename Y> inline auto_resource<X, Traits>& auto_resource<X, Traits>::operator = ( ! auto_resource<Y, typename traits_type::template rebind<Y>::other>& x) throw() { reset(x.release()); *************** *** 503,509 **** template <typename X, class Traits> template<typename Y> ! inline auto_resource<X, Traits>::operator typename auto_resource<X, Traits>::auto_resource_ref<Y, typename Traits::rebind<Y>::other>() throw() { ! auto_resource_ref<Y, typename traits_type::rebind<Y>::other> r; r.pointer_m = release(); return r; --- 506,512 ---- template <typename X, class Traits> template<typename Y> ! inline auto_resource<X, Traits>::operator typename auto_resource<X, Traits>::template auto_resource_ref<Y, typename Traits::template rebind<Y>::other>() throw() { ! auto_resource_ref<Y, typename traits_type::template rebind<Y>::other> r; r.pointer_m = release(); return r; *************** *** 512,518 **** template <typename X, class Traits> template<typename Y> ! inline auto_resource<X, Traits>::operator auto_resource<Y, typename Traits::rebind<Y>::other>() throw() { ! return auto_resource<Y, typename traits_type::rebind<Y>::other>(release()); } --- 515,521 ---- template <typename X, class Traits> template<typename Y> ! inline auto_resource<X, Traits>::operator auto_resource<Y, typename Traits::template rebind<Y>::other>() throw() { ! return auto_resource<Y, typename traits_type::template rebind<Y>::other>(release()); } *************** *** 556,560 **** template <typename X, class Traits> template <typename Y> ! inline auto_ptr<X, Traits>::auto_ptr(auto_ptr<Y, typename traits_type::rebind<Y*>::other>& r) throw() : inherited(r) { } --- 559,563 ---- template <typename X, class Traits> template <typename Y> ! inline auto_ptr<X, Traits>::auto_ptr(auto_ptr<Y, typename traits_type::template rebind<Y*>::other>& r) throw() : inherited(r) { } *************** *** 570,574 **** template<typename Y> inline auto_ptr<X, Traits>& auto_ptr<X, Traits>::operator = ( ! auto_ptr<Y, typename traits_type::rebind<Y*>::other>& r) throw() { inherited::operator = (r); --- 573,577 ---- template<typename Y> inline auto_ptr<X, Traits>& auto_ptr<X, Traits>::operator = ( ! auto_ptr<Y, typename traits_type::template rebind<Y*>::other>& r) throw() { inherited::operator = (r); *************** *** 661,667 **** template <typename X, class Traits> template<typename Y> ! inline auto_ptr<X, Traits>::operator auto_ptr<Y, typename Traits::rebind<Y*>::other>() throw() { ! return auto_ptr<Y, typename Traits::rebind<Y*>::other>(inherited::release()); } --- 664,670 ---- template <typename X, class Traits> template<typename Y> ! inline auto_ptr<X, Traits>::operator auto_ptr<Y, typename Traits::template rebind<Y*>::other>() throw() { ! return auto_ptr<Y, typename Traits::template rebind<Y*>::other>(inherited::release()); } |
|
From: Tobias S. <t_s...@us...> - 2005-04-12 18:55:02
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17624/adobe-source/adobe/source Modified Files: xstr.cpp Log Message: Removing invalid disambiguator ("template disambiguator outside of template") Index: xstr.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/source/xstr.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** xstr.cpp 12 Apr 2005 17:24:44 -0000 1.4 --- xstr.cpp 12 Apr 2005 18:54:52 -0000 1.5 *************** *** 856,860 **** { adobe::name_t name(first->first); ! adobe::name_t att_value(first->second.template get<adobe::name_t>()); result.push_back(std::make_pair(name, att_value)); --- 856,860 ---- { adobe::name_t name(first->first); ! adobe::name_t att_value(first->second.get<adobe::name_t>()); result.push_back(std::make_pair(name, att_value)); |
|
From: Foster B. <fos...@us...> - 2005-04-12 17:25:44
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/source Modified Files: xstr.cpp Log Message: Adding error diagnostics to xstr; beginning metrics work on Mac Begin Index: xstr.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/source/xstr.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xstr.cpp 11 Apr 2005 17:06:01 -0000 1.3 --- xstr.cpp 12 Apr 2005 17:24:44 -0000 1.4 *************** *** 712,723 **** att_value = ADOBE_QUOTE_P ! >> *( boost::spirit::print_p - ( boost::spirit::ch_p('<') | ADOBE_QUOTE_P ) ! )[boost::bind(assign_name, boost::ref(cur_attribute.second), _1, _2)] >> ADOBE_QUOTE_P | ADOBE_APOS_P ! >> *( boost::spirit::print_p - ( boost::spirit::ch_p('<') | ADOBE_APOS_P ) ! )[boost::bind(assign_name, boost::ref(cur_attribute.second), _1, _2)] >> ADOBE_APOS_P ; --- 712,723 ---- att_value = ADOBE_QUOTE_P ! >> (*( boost::spirit::print_p - ( boost::spirit::ch_p('<') | ADOBE_QUOTE_P ) ! ))[boost::bind(assign_name, boost::ref(cur_attribute.second), _1, _2)] >> ADOBE_QUOTE_P | ADOBE_APOS_P ! >> (*( boost::spirit::print_p - ( boost::spirit::ch_p('<') | ADOBE_APOS_P ) ! ))[boost::bind(assign_name, boost::ref(cur_attribute.second), _1, _2)] >> ADOBE_APOS_P ; |
|
From: Foster B. <fos...@us...> - 2005-04-12 17:25:44
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/test/visual/headers/mac Modified Files: ui_core_implementation.hpp Added Files: metrics.hpp Log Message: Adding error diagnostics to xstr; beginning metrics work on Mac Begin --- NEW FILE: metrics.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #ifndef ADOBE_METRICS_MAC_HPP #define ADOBE_METRICS_MAC_HPP /****************************************************************************************************/ #include <adobe/dictionary_fwd.hpp> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ dictionary_t widget_metrics(const dictionary_t& context); /****************************************************************************************************/ } /****************************************************************************************************/ #endif /****************************************************************************************************/ Index: ui_core_implementation.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/mac/ui_core_implementation.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ui_core_implementation.hpp 10 Apr 2005 01:24:35 -0000 1.3 --- ui_core_implementation.hpp 12 Apr 2005 17:24:46 -0000 1.4 *************** *** 52,90 **** /****************************************************************************************************/ ! extern const Rect initial_bounds_g; ! extern const CGRect cg_initial_bounds_g; ! ! /****************************************************************************************************/ ! ! // REVISIT (fbrereto) : I'd like to be able to set this up 1) so the fudges can be made on a ! // per-OS-version basis, 2) so they can be adjusted without requiring ! // a recompile, and 3) so they are dynamic based on the widget's theme settings. ! ! struct fudge_t : private rectangle_slices_t { ! struct slice_t ! { ! pair_long_t geometry_m; // affects the position and the length ! }; ! boost::array<slice_t, 2> slice_m; ! long baseline_m; ! fudge_t() : ! baseline_m(0) ! { } ! long& top() { return slice_m[vertical].geometry_m.first; } ! const long& top() const { return slice_m[vertical].geometry_m.first; } ! long& left() { return slice_m[horizontal].geometry_m.first; } ! const long& left() const { return slice_m[horizontal].geometry_m.first; } ! long& bottom() { return slice_m[vertical].geometry_m.second; } ! const long& bottom() const { return slice_m[vertical].geometry_m.second; } ! long& right() { return slice_m[horizontal].geometry_m.second; } ! const long& right() const { return slice_m[horizontal].geometry_m.second; } ! }; /****************************************************************************************************/ --- 52,78 ---- /****************************************************************************************************/ ! struct metric_extractor_t { ! explicit metric_extractor_t(const dictionary_t& dictionary) : ! dictionary_m(dictionary) ! { } ! long operator () (const name_t& tag) const ! { ! long result(0); ! dictionary_m.get(tag, result); ! return result; ! } ! private: ! dictionary_t dictionary_m; ! }; ! /****************************************************************************************************/ ! extern const Rect initial_bounds_g; ! extern const CGRect cg_initial_bounds_g; /****************************************************************************************************/ *************** *** 160,164 **** EventHandlerRef focus_callback_ref_m; rectangle_t geometry_m; // saving set_bounds param for essentials ! fudge_t fudges_m; // added in best_bounds (apply_fudges); subtracted in set_bounds (shed_fudges) }; --- 148,152 ---- EventHandlerRef focus_callback_ref_m; rectangle_t geometry_m; // saving set_bounds param for essentials ! metric_extractor_t metrics_m; }; |
|
From: Foster B. <fos...@us...> - 2005-04-12 17:25:29
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/test/visual Modified Files: visual.mcp Log Message: Adding error diagnostics to xstr; beginning metrics work on Mac Begin Index: visual.mcp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/visual.mcp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvssL8D5C and /tmp/cvs2NfAs8 differ |
|
From: Foster B. <fos...@us...> - 2005-04-12 17:25:29
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/test/visual/headers Modified Files: express_viewer.hpp ui_core.hpp Log Message: Adding error diagnostics to xstr; beginning metrics work on Mac Begin Index: ui_core.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/ui_core.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_core.hpp 10 Apr 2005 01:24:35 -0000 1.5 --- ui_core.hpp 12 Apr 2005 17:24:46 -0000 1.6 *************** *** 15,18 **** --- 15,19 ---- #include <boost/operators.hpp> + #include <adobe/config.hpp> #include <adobe/value.hpp> #include <adobe/dictionary.hpp> *************** *** 249,253 **** #if ADOBE_PLATFORM_MAC return format<adobe::value_t>(adobe::value_t(x)); ! #elif defined(BOOST_MSVC) // Stub for now because the above produces and internal compiler error in MSVC. std::stringstream stream; --- 250,254 ---- #if ADOBE_PLATFORM_MAC return format<adobe::value_t>(adobe::value_t(x)); ! #elif ADOBE_PLATFORM_WIN // Stub for now because the above produces and internal compiler error in MSVC. std::stringstream stream; *************** *** 262,266 **** #if ADOBE_PLATFORM_MAC return parse<adobe::value_t>(str, adobe::value_t(Numeric())).template get<Numeric>(); ! #elif defined(BOOST_MSVC) return Numeric(std::atof(str.c_str())); // Stub for now because the above produces and internal compiler error in MSVC. #endif --- 263,267 ---- #if ADOBE_PLATFORM_MAC return parse<adobe::value_t>(str, adobe::value_t(Numeric())).template get<Numeric>(); ! #elif ADOBE_PLATFORM_WIN return Numeric(std::atof(str.c_str())); // Stub for now because the above produces and internal compiler error in MSVC. #endif Index: express_viewer.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/express_viewer.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** express_viewer.hpp 23 Mar 2005 18:51:58 -0000 1.2 --- express_viewer.hpp 12 Apr 2005 17:24:45 -0000 1.3 *************** *** 14,19 **** --- 14,21 ---- #include "client_assembler.hpp" #include <adobe/adam.hpp> + #include <adobe/config.hpp> #include <string> + #include <iostream> /****************************************************************************************************/ *************** *** 24,27 **** --- 26,62 ---- // + /// The stream_sucker is used to extract the data available from a stream and + /// deposit it into a string. This is not very efficient but works for a + /// demo application. + /// + /// \param stream the stream to extract data from. + /// \return all of the data in the stream. + // + template<typename InputStream> + std::string stream_sucker( InputStream& stream ) + { + std::string result; + + if ( stream.is_open() ) + { + std::istream::char_type c( 0 ); + // + // Read from the stream character by character until we + // reach the end. + // + while( !stream.eof() ) + { + stream.get( c ); + if ( c == '\n' ) c = '\r'; + if ( !stream.eof() ) result += c; + } + } + + return result; + } + + /****************************************************************************************************/ + + // /// The simpleApplication class is implemented in express_viewer.cpp and defines /// the basic application operation. The simpleApplication class is a singleton, *************** *** 87,90 **** --- 122,134 ---- void _editor_op( adobe::name_t name, const adobe::value_t& value ); + #if ADOBE_PLATFORM_MAC + // + /// The Mac has inherently bad metric information provided to us from the OS + /// So here we load up an xstr glossary that contains for us metric information + /// on the various platform widgets. + // + void _load_metrics_glossary(); + #endif + public: // |
|
From: Foster B. <fos...@us...> - 2005-04-12 17:25:16
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/test/visual/sources Modified Files: client_assembler.cpp express_viewer.cpp Log Message: Adding error diagnostics to xstr; beginning metrics work on Mac Begin Index: express_viewer.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/express_viewer.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** express_viewer.cpp 31 Mar 2005 01:37:54 -0000 1.7 --- express_viewer.cpp 12 Apr 2005 17:24:47 -0000 1.8 *************** *** 14,17 **** --- 14,18 ---- #include <adobe/adam_evaluate.hpp> + #include <adobe/xstr.hpp> #ifndef NDEBUG *************** *** 72,107 **** /****************************************************************************************************/ - // - /// The stream_sucker is used to extract the data available from a stream and - /// deposit it into a string. - /// - /// \param stream the stream to extract data from. - /// \return all of the data in the stream. - // - template<typename InputStream> - std::string stream_sucker( InputStream& stream ) - { - std::string result; - - if ( stream.is_open() ) - { - std::istream::char_type c( 0 ); - // - // Read from the stream character by character until we - // reach the end. - // - while( !stream.eof() ) - { - stream.get( c ); - if ( c == '\n' ) c = '\r'; - if ( !stream.eof() ) result += c; - } - } - - return result; - } - - /****************************************************************************************************/ - simpleApplication::simpleApplication() : _sheet_m( 0 ), _holder_m( 0 ), --- 73,76 ---- *************** *** 134,137 **** --- 103,108 ---- #if ADOBE_PLATFORM_MAC + _load_metrics_glossary(); + // // We need to load the editor.adm and editor.eve files. *************** *** 175,179 **** editor_view_s->window_m->set_visible( true ); editor_view_s->window_m->draw_controls(); ! #elif defined(BOOST_MSVC) // REVISIT (fbrereto) Until we have the main window up and running on Win32, // we will treat Begin like a simple viewer application, --- 146,151 ---- editor_view_s->window_m->set_visible( true ); editor_view_s->window_m->draw_controls(); ! ! #elif ADOBE_PLATFORM_WIN // REVISIT (fbrereto) Until we have the main window up and running on Win32, // we will treat Begin like a simple viewer application, *************** *** 321,324 **** --- 293,315 ---- /****************************************************************************************************/ + #if ADOBE_PLATFORM_MAC + void simpleApplication::_load_metrics_glossary() + { + adobe::dictionary_t default_context(adobe::xstr_t::get_default_context()); + + default_context.write()[adobe::static_name_t("widget")] = adobe::value_t(adobe::static_name_t("unknown")); + default_context.write()[adobe::static_name_t("theme")] = adobe::value_t(adobe::static_name_t("normal")); + + adobe::xstr_t::set_default_context(default_context); + + std::ifstream metrics_glossary( ( _resource_dir_m / "metrics_glossary.xstr" ).native_file_string().c_str() ); + std::string glossary(stream_sucker(metrics_glossary)); + + adobe::xstr_t::assign_glossary(std::make_pair(&glossary[0], &glossary[0] + glossary.size())); + } + #endif + + /****************************************************************************************************/ + simpleApplication* simpleApplication::getInstance() { *************** *** 364,367 **** --- 355,366 ---- if ( !_holder_m ) { + #if ADOBE_PLATFORM_MAC + // We do this every time we load a window because we want to be able to see + // changes reflected in the glossary without needing to relaunch the + // application every time we make a change. + + _load_metrics_glossary(); + #endif + // // Note that the sheet is passed straight to the window_server Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** client_assembler.cpp 10 Apr 2005 01:24:35 -0000 1.6 --- client_assembler.cpp 12 Apr 2005 17:24:47 -0000 1.7 *************** *** 866,874 **** if (slice == adobe::rectangle_slices_t::horizontal) ! result.first.first = src_slice.position_m - src_slice.outset_m.first; else ! result.first.second = src_slice.position_m - src_slice.outset_m.first; ! dst_slice.length_m = src_slice.length_m + src_slice.outset_m.first + src_slice.outset_m.second; dst_slice.outset_m = src_slice.outset_m; --- 866,874 ---- if (slice == adobe::rectangle_slices_t::horizontal) ! result.first.first = src_slice.position_m; else ! result.first.second = src_slice.position_m; ! dst_slice.length_m = src_slice.length_m; dst_slice.outset_m = src_slice.outset_m; |
|
From: Foster B. <fos...@us...> - 2005-04-12 17:25:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/test/visual/resources Added Files: metrics_glossary.xstr Log Message: Adding error diagnostics to xstr; beginning metrics work on Mac Begin --- NEW FILE: metrics_glossary.xstr --- <xstr id='metric' widget='checkbox'>{ height: 16, width: 18, text_gap: 4, fudge_left: 2, fudge_top: -1, fudge_height: 2, fudge_baseline: 1, fudge_width: 4, outset_top: 2 }</xstr> <xstr id='metric' widget='checkbox' theme='small'>{ height: 14, width: 15, text_gap: 6, fudge_top: -1, fudge_left: 1, fudge_baseline: 1, fudge_height: 2, fudge_width: 3, outset_top: 2 }</xstr> <xstr id='metric' widget='checkbox' theme='mini'>{ height: 10, width: 10, text_gap: 4, outset_top: 1 }</xstr> <xstr id='metric' widget='radio_button'>{ height: 16, width: 19, fudge_left: 1, fudge_top: -1, fudge_width: 5, fudge_height: 1, outset_right: 1, outset_left: 1, outset_bottom: 1, text_gap: 4 }</xstr> <xstr id='metric' widget='radio_button' theme='small'>{ height: 13, width: 14, fudge_top: -1, fudge_baseline: -1, text_gap: 4 }</xstr> <xstr id='metric' widget='radio_button' theme='mini'>{ height: 10, width: 10, outset_bottom: 1, fudge_baseline: -1, text_gap: 4 }</xstr> |
|
From: Foster B. <fos...@us...> - 2005-04-12 17:25:01
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/test/visual/sources/mac Modified Files: main.cpp ui_core_implementation.cpp Added Files: metrics.cpp Log Message: Adding error diagnostics to xstr; beginning metrics work on Mac Begin --- NEW FILE: metrics.cpp --- /* Copyright 2005 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 "metrics.hpp" #include "report_exception.hpp" #include <adobe/xstr.hpp> #include <adobe/virtual_machine.hpp> #include <adobe/source/expression_parser.hpp> #include <adobe/dictionary.hpp> #include <adobe/array.hpp> #include <sstream> /****************************************************************************************************/ namespace { /****************************************************************************************************/ /****************************************************************************************************/ } // namespace /****************************************************************************************************/ #if 0 #pragma mark - #endif /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ dictionary_t widget_metrics(const dictionary_t& context) { dictionary_t result; try { std::string metric_xstr("<xstr id='metric'/>"); std::stringstream expression_stream(std::string(xstr_t(metric_xstr.c_str(), metric_xstr.size(), context).get())); expression_parser parser(expression_stream, line_position_t("widget_metrics")); array_t expression; parser.require_expression(expression); virtual_machine_t machine; machine.evaluate(expression); result = machine.back().value_m.template get<adobe::dictionary_t>(); } catch(...) { report_exception(); } return result; } /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ Index: main.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac/main.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** main.cpp 31 Mar 2005 22:50:43 -0000 1.6 --- main.cpp 12 Apr 2005 17:24:49 -0000 1.7 *************** *** 12,15 **** --- 12,17 ---- #include <boost/filesystem/convenience.hpp> + #include <adobe/xstr.hpp> + #include <sstream> #include <string> Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac/ui_core_implementation.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ui_core_implementation.cpp 10 Apr 2005 07:00:46 -0000 1.8 --- ui_core_implementation.cpp 12 Apr 2005 17:24:49 -0000 1.9 *************** *** 12,15 **** --- 12,16 ---- #include "report_exception.hpp" #include "display.hpp" + #include "metrics.hpp" #include <adobe/algorithm.hpp> *************** *** 42,141 **** /****************************************************************************************************/ ! } // namespace adobe ! ! /****************************************************************************************************/ ! ! enum metrics { ! gap = 6 // Measured as space from popup to label. ! }; ! ! /****************************************************************************************************/ ! ! namespace { ! ! /****************************************************************************************************/ ! ! #if 0 ! #pragma mark - ! #endif ! ! /****************************************************************************************************/ ! ! inline long theme_metric(ThemeMetric metric) ! { ! SInt32 value(0); ! ::GetThemeMetric(metric, &value); ! return value; ! } /****************************************************************************************************/ ! template <typename T> ! adobe::rectangle_t widget_metrics(adobe::theme_t /*theme*/) ! { return adobe::rectangle_t(); } /****************************************************************************************************/ ! template <> ! adobe::rectangle_t widget_metrics<adobe::checkbox_t::implementation_t>(adobe::theme_t theme) ! { ! adobe::rectangle_t result; ! ! theme &= adobe::theme_mask_s; ! ! if (theme == adobe::theme_mini_s) ! { ! result.width() += theme_metric(kThemeMetricMiniCheckBoxWidth); ! ! result.height() += theme_metric(kThemeMetricMiniCheckBoxHeight); ! } ! else if (theme == adobe::theme_small_s) ! { ! result.width() += theme_metric(kThemeMetricSmallCheckBoxWidth); ! ! result.height() += theme_metric(kThemeMetricSmallCheckBoxHeight); ! } ! else // if (theme == adobe::theme_normal_s) ! { ! result.width() += theme_metric(kThemeMetricCheckBoxWidth); ! ! result.height() += theme_metric(kThemeMetricCheckBoxHeight); ! } ! ! return result; ! } /****************************************************************************************************/ ! std::string get_control_title(ControlRef control); ! adobe::rectangle_t get_text_dimensions(const std::string& text, adobe::theme_t theme); /****************************************************************************************************/ ! template <typename T> ! adobe::rectangle_t widget_measurement(const T& widget) ! { ! std::string name(get_control_title(widget.control_m)); ! adobe::rectangle_t result(widget_metrics<T>(widget.theme_m)); ! adobe::rectangle_t text(get_text_dimensions(name, widget.theme_m)); ! ! result.width() += text.width(); ! ! if (name.size()) ! result.width() += gap; ! ! adobe::copy( text.slice_m[adobe::rectangle_slices_t::vertical].poi_m, ! std::back_inserter(result.slice_m[adobe::rectangle_slices_t::vertical].poi_m)); ! ! return result; ! } ! ! /****************************************************************************************************/ ! #if 0 ! #pragma mark - ! #endif /****************************************************************************************************/ --- 43,89 ---- /****************************************************************************************************/ ! #define ADOBE_WIDGET_TAG_BOILERPLATE(widget, static_tag) \ ! template <> name_t widget_tag<widget>(const widget&) { return static_name_t(static_tag); } ! template <typename T> name_t widget_tag(const T&) { return static_name_t("unknown"); } ! ADOBE_WIDGET_TAG_BOILERPLATE(adobe::checkbox_t::implementation_t, "checkbox") ! ADOBE_WIDGET_TAG_BOILERPLATE(adobe::radio_button_t::implementation_t, "radio_button") /****************************************************************************************************/ ! } // namespace adobe /****************************************************************************************************/ ! enum metrics { ! gap = 6 // Measured as space from popup to label. ! }; /****************************************************************************************************/ ! namespace { /****************************************************************************************************/ ! adobe::static_name_t k_attribute_theme("theme"); ! adobe::static_name_t k_attribute_theme_large("large"); ! adobe::static_name_t k_attribute_theme_normal("normal"); ! adobe::static_name_t k_attribute_theme_small("small"); ! adobe::static_name_t k_attribute_theme_mini("mini"); ! adobe::static_name_t k_attribute_widget("widget"); ! adobe::static_name_t k_metric_height("height"); ! adobe::static_name_t k_metric_width("width"); ! adobe::static_name_t k_metric_fudge_top("fudge_top"); ! adobe::static_name_t k_metric_fudge_left("fudge_left"); ! adobe::static_name_t k_metric_fudge_height("fudge_height"); ! adobe::static_name_t k_metric_fudge_width("fudge_width"); ! adobe::static_name_t k_metric_fudge_baseline("fudge_baseline"); ! adobe::static_name_t k_metric_outset_top("outset_top"); ! adobe::static_name_t k_metric_outset_left("outset_left"); ! adobe::static_name_t k_metric_outset_bottom("outset_bottom"); ! adobe::static_name_t k_metric_outset_right("outset_right"); ! adobe::static_name_t k_metric_text_gap("text_gap"); /****************************************************************************************************/ *************** *** 374,439 **** /****************************************************************************************************/ - adobe::fudge_t factory_fudge_table(const adobe::dictionary_t& ui_state) - { - typedef std::pair<adobe::dictionary_t, adobe::fudge_t> fudge_pair_t; - typedef std::vector<fudge_pair_t> fudge_table_t; - typedef fudge_table_t::iterator iterator; - - static bool inited(false); - static fudge_table_t fudge_table; - - if (!inited) - { - adobe::dictionary_t index; - adobe::dictionary_t::write_reference d(index.write()); - - // fill in the table here - - inited = true; - } - - iterator result(adobe::find_if(fudge_table, boost::bind(std::equal_to<fudge_pair_t::first_type>(), ui_state, boost::bind(&fudge_pair_t::first, _1)))); - - return result == fudge_table.end() ? adobe::fudge_t() : result->second; - } - - /****************************************************************************************************/ - - void apply_fudges(adobe::rectangle_t& geometry, const adobe::fudge_t& fudges) - { - geometry.slice_m[adobe::rectangle_slices_t::vertical].length_m += fudges.top() + fudges.bottom(); - geometry.slice_m[adobe::rectangle_slices_t::horizontal].length_m += fudges.left() + fudges.right(); - - #if 0 - geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.first += fudges.top(); - geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.second -= fudges.bottom() + fudges.top(); - geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.first += fudges.left(); - geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.second -= fudges.right() + fudges.left(); - #endif - - adobe::points_of_interest_t& poi(geometry.slice_m[adobe::rectangle_slices_t::vertical].poi_m); - - if (poi.size()) poi[0] += fudges.baseline_m; - } - - /****************************************************************************************************/ - - void shed_fudges(adobe::point_t& position, adobe::rectangle_t& geometry, const adobe::fudge_t& fudges) - { - position.second -= fudges.top(); - position.first -= fudges.left(); - - geometry.height() -= fudges.bottom(); - geometry.width() -= fudges.right(); - } - - /****************************************************************************************************/ - - #if 0 - #pragma mark - - #endif - - /****************************************************************************************************/ - template <typename T> void get_widget_data(::ControlRef widget, UInt32 part, UInt32 tag, T& data, bool throwing = true) --- 322,325 ---- *************** *** 2002,2005 **** --- 1888,1999 ---- /****************************************************************************************************/ + #if 0 + #pragma mark - + #endif + + /****************************************************************************************************/ + + template <typename Widget> + adobe::metric_extractor_t metric_extractor(const Widget& w) + { + adobe::static_name_t attribute_theme_value("unknown"); + adobe::dictionary_t context; + + switch (w.theme_m & adobe::theme_mask_s) + { + case adobe::theme_large_s: attribute_theme_value = k_attribute_theme_large; break; + case adobe::theme_normal_s: attribute_theme_value = k_attribute_theme_normal; break; + case adobe::theme_small_s: attribute_theme_value = k_attribute_theme_small; break; + case adobe::theme_mini_s: attribute_theme_value = k_attribute_theme_mini; break; + } + + adobe::dictionary_t::write_reference context_write(context.write()); + + context_write[k_attribute_theme] = adobe::value_t(attribute_theme_value); + context_write[k_attribute_widget] = adobe::value_t(widget_tag(w)); + + return adobe::metric_extractor_t(widget_metrics(context)); + } + + /****************************************************************************************************/ + + template <typename Widget> + adobe::rectangle_t widget_best_bounds(Widget& w, const std::string* first, const std::string* last) + { + adobe::rectangle_t result; + long text_height(0); + long text_width(0); + long text_baseline(-1); + + w.metrics_m = metric_extractor(w); + + for (; first != last; ++first) + { + adobe::rectangle_t geometry(get_text_dimensions(*first, w.theme_m)); + adobe::points_of_interest_t& poi(geometry.slice_m[adobe::rectangle_slices_t::vertical].poi_m); + + text_height = std::max(text_height, geometry.height()); + text_width = std::max(text_width, geometry.width()); + + if (poi.size()) + text_baseline = std::max(text_baseline, poi[0]); + } + + result.height() = w.metrics_m(k_metric_height) - w.metrics_m(k_metric_fudge_height); + result.width() = w.metrics_m(k_metric_width) - w.metrics_m(k_metric_fudge_width); + + if (text_width != 0) + result.width() += text_width + w.metrics_m(k_metric_text_gap); + + if (text_baseline != -1) + result.slice_m[adobe::rectangle_slices_t::vertical].poi_m.push_back(text_baseline - w.metrics_m(k_metric_fudge_baseline)); + + // adjust outsets in accordance with the fudges + + result.slice_m[adobe::rectangle_slices_t::vertical].outset_m.first += w.metrics_m(k_metric_outset_top); + result.slice_m[adobe::rectangle_slices_t::vertical].outset_m.second -= w.metrics_m(k_metric_outset_top) + w.metrics_m(k_metric_outset_bottom); + result.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.first += w.metrics_m(k_metric_outset_left); + result.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.second -= w.metrics_m(k_metric_outset_left) + w.metrics_m(k_metric_outset_right); + + return result; + } + + /****************************************************************************************************/ + + template <typename Widget> + inline adobe::rectangle_t widget_best_bounds(Widget& w, const std::string& name) + { + std::vector<std::string> name_set; + + if (!name.empty()) + name_set.push_back(name); + + return widget_best_bounds(w, &name_set[0], &name_set[0] + name_set.size()); + } + + /****************************************************************************************************/ + + #if 0 + #pragma mark - + #endif + + /****************************************************************************************************/ + + void shed_fudges(const adobe::control_t& control, adobe::point_t& position, adobe::rectangle_t& geometry) + { + position.first = position.first - control.metrics_m(k_metric_fudge_left) - geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.first; + position.second = position.second - control.metrics_m(k_metric_fudge_top) - geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.first; + + long outset_height( geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.first + + geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.second); + long outset_width( geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.first + + geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.second); + + geometry.height() += control.metrics_m(k_metric_fudge_height) + outset_height; + geometry.width() += control.metrics_m(k_metric_fudge_width) + outset_width; + } + + /****************************************************************************************************/ + } // namespace *************** *** 2347,2351 **** control_t::control_t() : ! control_m(0), focus_callback_ref_m(0), theme_m(theme_default_s) { } --- 2341,2345 ---- control_t::control_t() : ! control_m(0), focus_callback_ref_m(0), theme_m(theme_default_s), metrics_m(adobe::dictionary_t()) { } *************** *** 2353,2357 **** control_t::control_t(const control_t& rhs) : ! control_m(0), theme_m(rhs.theme_m), fudges_m(rhs.fudges_m) { } --- 2347,2351 ---- control_t::control_t(const control_t& rhs) : ! control_m(0), theme_m(rhs.theme_m), metrics_m(rhs.metrics_m) { } *************** *** 2387,2392 **** result.slice_m[rectangle_slices_t::vertical].poi_m.push_back(bounds.bottom - bounds.top + best_baseline); - apply_fudges(result, fudges_m); - return result; } --- 2381,2384 ---- *************** *** 2401,2405 **** rectangle_t geometry(geo); ! shed_fudges(position, geometry, fudges_m); Rect new_bounds = --- 2393,2397 ---- rectangle_t geometry(geo); ! shed_fudges(*this, position, geometry); Rect new_bounds = *************** *** 2439,2443 **** set_widget_data(control_m, kControlEntireControl, kControlFontStyleTag, new_style, false); - #if 0 try { --- 2431,2434 ---- *************** *** 2457,2461 **** catch (...) { } - #endif } --- 2448,2451 ---- *************** *** 2639,2643 **** assert(!control_m); ! fudges_m.bottom() = -1; ADOBE_REQUIRE_STATUS(::CreateGroupBoxControl( 0, &bounds, --- 2629,2633 ---- assert(!control_m); ! //fudges_m.bottom() = -1; ADOBE_REQUIRE_STATUS(::CreateGroupBoxControl( 0, &bounds, *************** *** 2705,2710 **** assert (!control_m); ! fudges_m.top() = 7; ! fudges_m.bottom() = -8; ControlTabSize size(kControlSizeNormal); --- 2695,2700 ---- assert (!control_m); ! //fudges_m.top() = 7; ! //fudges_m.bottom() = -8; ControlTabSize size(kControlSizeNormal); *************** *** 2916,2920 **** assert(first != last); ! fudges_m.bottom() = 1; std::copy(first, last, std::back_inserter<implementation_t::state_set_t>(state_set_m)); --- 2906,2910 ---- assert(first != last); ! //fudges_m.bottom() = 1; std::copy(first, last, std::back_inserter<implementation_t::state_set_t>(state_set_m)); *************** *** 3051,3062 **** radio_button_t::implementation_t::implementation_t() ! { ! // NOTE (fbrereto) : These fudges are different than checkbox fudges. ! fudges_m.top() = 2; ! fudges_m.left() = 2; ! fudges_m.bottom() = -5; ! fudges_m.right() = -4; ! fudges_m.baseline_m = -1; ! } /****************************************************************************************************/ --- 3041,3045 ---- radio_button_t::implementation_t::implementation_t() ! { } /****************************************************************************************************/ *************** *** 3089,3119 **** assert(control_m); ! rectangle_t result(_super::best_bounds()); ! ! if (get_control_title(control_m).empty()) ! { ! // No name? You'll get bogus measurements for the baseline. This fixes that. ! // also, the width is wrong; this fixes that, too. ! ! radio_button_t temp; ! ! temp.initialize("--"); ! ! temp.set_theme(theme_m); ! ! rectangle_t result2(temp.best_bounds()); ! ! points_of_interest_t& dst_poi(result.slice_m[rectangle_slices_t::vertical].poi_m); ! ! dst_poi = points_of_interest_t(); ! ! copy(result2.slice_m[rectangle_slices_t::vertical].poi_m, std::back_inserter(dst_poi)); ! ! if (dst_poi.size()) dst_poi[0] += fudges_m.baseline_m; // apply baseline adjustment to new baseline ! ! result.width() = result.height(); ! } ! ! return result; } --- 3072,3076 ---- assert(control_m); ! return widget_best_bounds(*this, get_control_title(control_m)); } *************** *** 3156,3167 **** checkbox_t::implementation_t::implementation_t() ! { ! // NOTE (fbrereto) : These fudges are different than radio_button fudges. ! fudges_m.top() = 3; ! fudges_m.left() = 2; ! fudges_m.bottom() = -7; ! fudges_m.right() = -4; ! fudges_m.baseline_m = -2; ! } /****************************************************************************************************/ --- 3113,3117 ---- checkbox_t::implementation_t::implementation_t() ! { } /****************************************************************************************************/ *************** *** 3193,3225 **** { assert(control_m); - #if 0 - return widget_measurement(*this); - #else - rectangle_t result(_super::best_bounds()); - - if (get_control_title(control_m).empty()) - { - // No name? You'll get bogus measurements for the baseline. This fixes that. - // also, the width is wrong; this fixes that, too. ! checkbox_t temp; ! ! temp.initialize("--"); ! ! temp.set_theme(theme_m); ! ! rectangle_t result2(temp.best_bounds()); ! ! points_of_interest_t& dst_poi(result.slice_m[rectangle_slices_t::vertical].poi_m); ! ! dst_poi = points_of_interest_t(); ! ! copy(result2.slice_m[rectangle_slices_t::vertical].poi_m, std::back_inserter(dst_poi)); ! ! result.width() = result.height(); ! } ! ! return result; ! #endif } --- 3143,3148 ---- { assert(control_m); ! return widget_best_bounds(*this, get_control_title(control_m)); } *************** *** 3499,3505 **** static_text_t::implementation_t::implementation_t() { ! fudges_m.top() = 2; ! fudges_m.bottom() = -4; ! fudges_m.baseline_m = -2; } --- 3422,3428 ---- static_text_t::implementation_t::implementation_t() { ! //fudges_m.top() = 2; ! //fudges_m.bottom() = -4; ! //fudges_m.baseline_m = -2; } *************** *** 3536,3541 **** rectangle_t result(get_text_dimensions(get_control_string(*this), theme_m)); - apply_fudges(result, fudges_m); - return result; } --- 3459,3462 ---- *************** *** 3693,3705 **** false, num_tags, &tags[0], &data[0])); ! fudges_m.top() = 3; ! fudges_m.left() = 3; ! fudges_m.bottom() = -6; ! fudges_m.right() = -6; } else { ! fudges_m.left() = 2; ! fudges_m.right() = -2; ADOBE_REQUIRE_STATUS(::CreateEditUnicodeTextControl(0, &bounds, CFSTR(""), --- 3614,3626 ---- false, num_tags, &tags[0], &data[0])); ! //fudges_m.top() = 3; ! //fudges_m.left() = 3; ! //fudges_m.bottom() = -6; ! //fudges_m.right() = -6; } else { ! //fudges_m.left() = 2; ! //fudges_m.right() = -2; ADOBE_REQUIRE_STATUS(::CreateEditUnicodeTextControl(0, &bounds, CFSTR(""), *************** *** 3719,3729 **** if (using_label_m) { - #if 0 - // This doesn't seem to do anything when enabled... - - get_label().implementation().fudges_m.left() += fudges_m.left(); - get_label().implementation().fudges_m.right() += fudges_m.right(); - #endif - get_label().initialize(name); get_label().adorn_theme(theme_adornment_label_s); --- 3640,3643 ---- *************** *** 3842,3846 **** if (scroll_control_m) { ! shed_fudges(position, geometry, fudges_m); Rect bounds = --- 3756,3760 ---- if (scroll_control_m) { ! shed_fudges(*this, position, geometry); Rect bounds = *************** *** 4040,4044 **** static_disabled_m(false), using_label_m(false), static_width_m(0) { ! fudges_m.bottom() = 1; } --- 3954,3958 ---- static_disabled_m(false), using_label_m(false), static_width_m(0) { ! //fudges_m.bottom() = 1; } *************** *** 4085,4090 **** if (!using_label_m) { ! fudges_m.left() = 1; ! fudges_m.right() = -1; } } --- 3999,4004 ---- if (!using_label_m) { ! //fudges_m.left() = 1; ! //fudges_m.right() = -1; } } *************** *** 4572,4608 **** ::SetControlReference(control_m, reinterpret_cast<SInt32>(this)); if (style == slider_points_not_s) { if (is_vertical) { ! fudges_m.left() = 3; ! fudges_m.right() = -10; } else { ! fudges_m.top() = 3; ! fudges_m.bottom() = -9; } } else if (style == slider_points_right_s) { ! fudges_m.left() = 2; ! fudges_m.right() = -6; } else if (style == slider_points_left_s) { ! fudges_m.left() = 8; ! fudges_m.right() = -10; } else if (style == slider_points_up_s) { ! fudges_m.top() = 8; ! fudges_m.bottom() = -9; } else if (style == slider_points_down_s) { ! fudges_m.top() = 2; ! fudges_m.bottom() = -5; } } --- 4486,4524 ---- ::SetControlReference(control_m, reinterpret_cast<SInt32>(this)); + #if 0 if (style == slider_points_not_s) { if (is_vertical) { ! //fudges_m.left() = 3; ! //fudges_m.right() = -10; } else { ! //fudges_m.top() = 3; ! //fudges_m.bottom() = -9; } } else if (style == slider_points_right_s) { ! //fudges_m.left() = 2; ! //fudges_m.right() = -6; } else if (style == slider_points_left_s) { ! //fudges_m.left() = 8; ! //fudges_m.right() = -10; } else if (style == slider_points_up_s) { ! //fudges_m.top() = 8; ! //fudges_m.bottom() = -9; } else if (style == slider_points_down_s) { ! //fudges_m.top() = 2; ! //fudges_m.bottom() = -5; } + #endif } |
|
From: Ralph T. <ra...@us...> - 2005-04-11 22:13:27
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv998/adobe-source/adobe/test/visual/sources/win Modified Files: event_dispatcher.cpp Log Message: The command modifier is being removed, this change means that it is no longer referenced in the Win32-specific part of ui-core. Index: event_dispatcher.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win/event_dispatcher.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** event_dispatcher.cpp 5 Apr 2005 05:46:05 -0000 1.1 --- event_dispatcher.cpp 11 Apr 2005 22:13:16 -0000 1.2 *************** *** 21,28 **** #define MAPMOD(osmod, adobemod) if (os_modifiers == (osmod)) result = result | (adobemod) // ! // Note that VK_MENU is the ALT key, and that VK_APPS is the "popup menu" key. ! // If I plug my keyboard into a Mac then the Windows-logo key becomes the Apple ! // key (also called the command key). However, the Windows-logo key brings up ! // the start menu, so I'm using the "popup menu" key for command instead. // MAPMOD(VK_CAPITAL, adobe::modifiers_caps_lock_s); --- 21,25 ---- #define MAPMOD(osmod, adobemod) if (os_modifiers == (osmod)) result = result | (adobemod) // ! // Note that VK_MENU is the ALT key. // MAPMOD(VK_CAPITAL, adobe::modifiers_caps_lock_s); *************** *** 30,34 **** MAPMOD(VK_SHIFT, adobe::modifiers_any_shift_s); MAPMOD(VK_MENU, adobe::modifiers_any_option_s); - MAPMOD(VK_APPS, adobe::modifiers_any_command_s); return result; --- 27,30 ---- |
|
From: Foster B. <fos...@us...> - 2005-04-11 17:06:09
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9995/adobe-source/adobe/source Modified Files: xstr.cpp Log Message: xstr error handling progress; small change to cmath to get it compiling again in MWCW Index: xstr.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/source/xstr.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xstr.cpp 7 Apr 2005 23:35:15 -0000 1.2 --- xstr.cpp 11 Apr 2005 17:06:01 -0000 1.3 *************** *** 25,31 **** #endif ! //#define BOOST_SPIRIT_DEBUG 1 #include <boost/spirit/core.hpp> #ifdef BOOST_SPIRIT_DEBUG #include <boost/spirit/debug.hpp> --- 25,36 ---- #endif ! #if 0 ! #define BOOST_SPIRIT_DEBUG 1 ! #endif ! ! #define BOOST_SPIRIT_THREADSAFE 1 #include <boost/spirit/core.hpp> + #include <boost/spirit/error_handling/exceptions.hpp> #ifdef BOOST_SPIRIT_DEBUG #include <boost/spirit/debug.hpp> *************** *** 37,41 **** #if !defined(NDEBUG) && defined(ADOBE_SERIALIZATION) ! #define DOING_SERIALIZATION 0 #endif --- 42,46 ---- #if !defined(NDEBUG) && defined(ADOBE_SERIALIZATION) ! #define DOING_SERIALIZATION 1 #endif *************** *** 454,464 **** /*************************************************************************************************/ - void assign_name(adobe::name_t& name, const char* first, const char* last) - { - name = adobe::name_t(first, last - first); - } - - /*************************************************************************************************/ - typedef std::vector<node_t> node_set_t; --- 459,462 ---- *************** *** 482,485 **** --- 480,496 ---- /*************************************************************************************************/ + #if 0 + #pragma mark - + #endif + + /*************************************************************************************************/ + + void assign_name(adobe::name_t& name, const char* first, const char* last) + { + name = adobe::name_t(first, last - first); + } + + /*************************************************************************************************/ + void push_and_clear_node(node_set_t& node_set, node_t& new_node) { *************** *** 506,509 **** --- 517,522 ---- private: + friend struct error_handler_t; + node_t::attribute_t cur_attribute; node_t cur_node; *************** *** 515,520 **** // XML the grammar is clipped in places. - boost::spirit::rule<> s; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-S boost::spirit::rule<> document; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-document boost::spirit::rule<> element; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-element boost::spirit::rule<> empty_elem_tag; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-EmptyElemTag --- 528,533 ---- // XML the grammar is clipped in places. boost::spirit::rule<> document; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-document + boost::spirit::rule<> s; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-S boost::spirit::rule<> element; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-element boost::spirit::rule<> empty_elem_tag; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-EmptyElemTag *************** *** 528,554 **** boost::spirit::rule<> content; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-content boost::spirit::rule<> att_value; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-AttValue }; /*************************************************************************************************/ ! xstr_parser::xstr_parser(node_set_t& node_set) { ! s = +(boost::spirit::space_p); ! document = !s >> *(element[boost::bind(&push_and_clear_node, boost::ref(node_set), boost::ref(cur_node))] >> !s); ! element = (s_tag >> content[boost::bind(assign_name, boost::ref(cur_node.value_m), _1, _2)] >> e_tag) | empty_elem_tag; ! empty_elem_tag = "<xstr" >> *(s >> attribute) >> !s >> "/>"; ! s_tag = "<xstr" >> *(s >> attribute[boost::spirit::push_back_a(cur_node.attribute_set_m, cur_attribute)]) >> !s >> '>'; ! e_tag = "</xstr" >> !s >> '>'; ! name_start_char = boost::spirit::alpha_p | '_' | ':'; ! name_char = name_start_char | boost::spirit::digit_p | '-' | '.'; ! name = name_start_char >> *(name_char); ! eq = !s >> '=' >> !s; ! attribute = name[boost::bind(assign_name, boost::ref(cur_attribute.first), _1, _2)] >> eq >> att_value; ! content = *(boost::spirit::print_p - '<'); ! att_value = '\"' >> (*(boost::spirit::print_p - '<' - '&' - '\"'))[boost::bind(assign_name, boost::ref(cur_attribute.second), _1, _2)] >> '\"' | ! '\'' >> (*(boost::spirit::print_p - '<' - '&' - '\''))[boost::bind(assign_name, boost::ref(cur_attribute.second), _1, _2)] >> '\''; - BOOST_SPIRIT_DEBUG_NODE(s); BOOST_SPIRIT_DEBUG_NODE(document); BOOST_SPIRIT_DEBUG_NODE(element); BOOST_SPIRIT_DEBUG_NODE(empty_elem_tag); --- 541,752 ---- boost::spirit::rule<> content; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-content boost::spirit::rule<> att_value; // http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-AttValue + + // custom tags that aren't a part of the XML grammar but ease error handling + boost::spirit::rule<> xstr_tag; + boost::spirit::rule<> tag_close_token; + boost::spirit::rule<> empty_tag_close_token; + + // error handling stuff + + enum parser_error_t + { + error_expected_open_token_s, + error_expected_xstr_name_s, + error_expected_close_token_s, + error_expected_empty_elem_close_token_s, + error_expected_eq_s, + error_expected_attribute_value_s + }; + + struct error_handler_t + { + error_handler_t(xstr_parser* parser) : + parser_m(parser) + { } + + template <typename ScannerT, typename ErrorT> + boost::spirit::error_status<> operator()(ScannerT const& /*scan*/, ErrorT const& /*error*/) const; + + private: + std::string err_to_string(parser_error_t error) const; + + xstr_parser* parser_m; + }; + + boost::spirit::guard<parser_error_t> guard_m; + boost::spirit::assertion<parser_error_t> expect_open_token; + boost::spirit::assertion<parser_error_t> expect_name; + boost::spirit::assertion<parser_error_t> expect_empty_elem_close_token; + boost::spirit::assertion<parser_error_t> expect_close_token; + boost::spirit::assertion<parser_error_t> expect_eq; + boost::spirit::assertion<parser_error_t> expect_att_value; + adobe::xstr_t::parse_range_t parse_range_m; + std::string error_message_m; }; /*************************************************************************************************/ ! void reset_error(std::string& error_message) { ! if (!error_message.empty()) ! { ! error_message = std::string(); ! ! #ifdef BOOST_SPIRIT_DEBUG ! std::cerr << " ### Resetting Error String"; ! #endif ! } ! } ! ! /*************************************************************************************************/ ! ! xstr_parser::xstr_parser(node_set_t& node_set) : ! expect_open_token(error_expected_open_token_s), ! expect_name(error_expected_xstr_name_s), ! expect_close_token(error_expected_close_token_s), ! expect_empty_elem_close_token(error_expected_empty_elem_close_token_s), ! expect_eq(error_expected_eq_s), ! expect_att_value(error_expected_attribute_value_s) ! { ! #define ADOBE_QUOTE_P boost::spirit::ch_p('\"') ! #define ADOBE_APOS_P boost::spirit::ch_p('\'') ! #define ADOBE_RESET_ERROR boost::bind(reset_error, boost::ref(error_message_m)) ! ! document ! = guard_m ! ( ! !s % element[boost::bind(&push_and_clear_node, boost::ref(node_set), boost::ref(cur_node))] ! )[error_handler_t(this)] ! ; ! ! ! s ! = +( boost::spirit::space_p ) ! ; ! ! ! element ! = ( s_tag ! >> content[boost::bind(assign_name, boost::ref(cur_node.value_m), _1, _2)] ! >> e_tag ! ) ! | empty_elem_tag ! ; ! ! ! empty_elem_tag ! = guard_m ! ( ! expect_open_token( boost::spirit::ch_p('<')[ADOBE_RESET_ERROR] ) ! >> xstr_tag ! >> *( s >> attribute ) ! >> !s ! >> empty_tag_close_token ! )[error_handler_t(this)] ! ; ! ! ! s_tag ! = guard_m ! ( ! expect_open_token( boost::spirit::ch_p('<')[ADOBE_RESET_ERROR] ) ! >> xstr_tag ! >> *( s ! >> attribute[boost::spirit::push_back_a(cur_node.attribute_set_m, cur_attribute)] ! ) ! >> !s ! >> tag_close_token ! )[error_handler_t(this)] ! ; ! ! ! e_tag ! = guard_m ! ( ! expect_open_token( boost::spirit::str_p("</")[ADOBE_RESET_ERROR] ) ! >> xstr_tag ! >> !s ! >> tag_close_token ! )[error_handler_t(this)] ! ; ! ! ! name_start_char ! = boost::spirit::alpha_p | '_' | ':' ! ; ! ! ! name_char ! = name_start_char | boost::spirit::digit_p | '-' | '.' ! ; ! ! ! name ! = name_start_char >> *( name_char ) ! ; ! ! ! eq ! = guard_m ! ( ! !s >> expect_eq( boost::spirit::ch_p('=')[ADOBE_RESET_ERROR] ) >> !s ! )[error_handler_t(this)] ! ; ! ! ! attribute ! = guard_m ! ( ! name[boost::bind(assign_name, boost::ref(cur_attribute.first), _1, _2)] ! >> eq ! >> expect_att_value( att_value[ADOBE_RESET_ERROR] ) ! )[error_handler_t(this)] ! ; ! ! ! content ! = *( boost::spirit::print_p - '<' ) ! ; ! ! ! att_value ! = ADOBE_QUOTE_P ! >> *( boost::spirit::print_p ! - ( boost::spirit::ch_p('<') | ADOBE_QUOTE_P ) ! )[boost::bind(assign_name, boost::ref(cur_attribute.second), _1, _2)] ! >> ADOBE_QUOTE_P ! | ADOBE_APOS_P ! >> *( boost::spirit::print_p ! - ( boost::spirit::ch_p('<') | ADOBE_APOS_P ) ! )[boost::bind(assign_name, boost::ref(cur_attribute.second), _1, _2)] ! >> ADOBE_APOS_P ! ; ! ! ! xstr_tag ! = guard_m ! ( ! expect_name( boost::spirit::str_p("xstr")[ADOBE_RESET_ERROR] ) ! )[error_handler_t(this)] ! ; ! ! ! tag_close_token ! = guard_m ! ( ! expect_close_token( boost::spirit::str_p(">")[ADOBE_RESET_ERROR] ) ! )[error_handler_t(this)] ! ; ! ! ! empty_tag_close_token ! = guard_m ! ( ! expect_empty_elem_close_token( boost::spirit::str_p("/>")[ADOBE_RESET_ERROR] ) ! )[error_handler_t(this)] ! ; BOOST_SPIRIT_DEBUG_NODE(document); + BOOST_SPIRIT_DEBUG_NODE(s); BOOST_SPIRIT_DEBUG_NODE(element); BOOST_SPIRIT_DEBUG_NODE(empty_elem_tag); *************** *** 562,565 **** --- 760,766 ---- BOOST_SPIRIT_DEBUG_NODE(content); BOOST_SPIRIT_DEBUG_NODE(att_value); + BOOST_SPIRIT_DEBUG_NODE(xstr_tag); + BOOST_SPIRIT_DEBUG_NODE(tag_close_token); + BOOST_SPIRIT_DEBUG_NODE(empty_tag_close_token); } *************** *** 568,579 **** void xstr_parser::do_parse(const adobe::xstr_t::parse_range_t& parse_range) { std::string definition(parse_range.first, parse_range.second); if (!boost::spirit::parse(definition.c_str(), document).full) ! throw std::runtime_error("xstr: parse string Ill-formed"); } /*************************************************************************************************/ void copy_to_xstr_store(const node_set_t::value_type& x) { --- 769,836 ---- void xstr_parser::do_parse(const adobe::xstr_t::parse_range_t& parse_range) { + parse_range_m = parse_range; + std::string definition(parse_range.first, parse_range.second); if (!boost::spirit::parse(definition.c_str(), document).full) ! throw std::runtime_error(error_message_m); } /*************************************************************************************************/ + std::string xstr_parser::error_handler_t::err_to_string(parser_error_t error) const + { + switch (error) + { + case error_expected_open_token_s: return "Expected '<'"; break; + case error_expected_xstr_name_s: return "Expected 'xstr'"; break; + case error_expected_close_token_s: return "Expected '>'"; break; + case error_expected_empty_elem_close_token_s: return "Expected '/>'"; break; + case error_expected_eq_s: return "Expected '='"; break; + case error_expected_attribute_value_s: return "Attribute ill-formed"; break; + } + + return "Expected something else"; + } + + /*************************************************************************************************/ + + template <typename ScannerT, typename ErrorT> + boost::spirit::error_status<> xstr_parser::error_handler_t::operator () (ScannerT const& scan, ErrorT const& error) const + { + typedef typename ScannerT::value_t char_t; + + const char_t* first(scan.first); + const char_t* last(first + std::min(20, scan.last - scan.first)); + + #ifdef BOOST_SPIRIT_DEBUG + std::cerr << " ### Parse Exception"; + #endif + if (parser_m->error_message_m.empty()) + { + #ifdef BOOST_SPIRIT_DEBUG + std::cerr << " ### Setting Error String"; + #endif + std::string err("xstr: "); + + err += err_to_string(error.descriptor); + err += "; found: \""; + err += std::string(first, last); + err += "\""; + + parser_m->error_message_m = err; + } + + return boost::spirit::error_status<>(boost::spirit::error_status<>::fail); + } + + /*************************************************************************************************/ + + #if 0 + #pragma mark - + #endif + + /*************************************************************************************************/ + void copy_to_xstr_store(const node_set_t::value_type& x) { |
|
From: Foster B. <fos...@us...> - 2005-04-11 17:06:09
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9995/adobe-source/adobe Modified Files: cmath.hpp Log Message: xstr error handling progress; small change to cmath to get it compiling again in MWCW Index: cmath.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/cmath.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cmath.hpp 10 Apr 2005 08:15:14 -0000 1.3 --- cmath.hpp 11 Apr 2005 17:06:00 -0000 1.4 *************** *** 22,27 **** #define ADOBE_CMATH_HPP ! #include <boost/config.hpp> ! #include "config.hpp" #include <cmath> --- 22,26 ---- #define ADOBE_CMATH_HPP ! #include <adobe/config.hpp> #include <cmath> |
|
From: Ralph T. <ra...@us...> - 2005-04-11 03:20:12
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26361/adobe-source/adobe/test/visual/sources/win Modified Files: ui_core_implementation.cpp Log Message: Checkbox widgets can no longer be "clicked off". This commit fixes bug 1179561 - https://sourceforge.net/tracker/index.php?func=detail&aid=1179561&group_id=132417&atid=724218 Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win/ui_core_implementation.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ui_core_implementation.cpp 10 Apr 2005 01:24:36 -0000 1.14 --- ui_core_implementation.cpp 11 Apr 2005 03:20:02 -0000 1.15 *************** *** 2453,2457 **** void radio_button_t::implementation_t::user_hit() { ! set_value(!is_checked_m); if (!hit_proc_m.empty()) hit_proc_m(modifiers_t(), is_checked_m); --- 2453,2457 ---- void radio_button_t::implementation_t::user_hit() { ! set_value(true); if (!hit_proc_m.empty()) hit_proc_m(modifiers_t(), is_checked_m); |
|
From: Ralph T. <ra...@us...> - 2005-04-10 08:15:25
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30532/adobe-source/adobe/test/visual Modified Files: Jamfile Log Message: These are some of Tobias Schwinger's changes to make ASL (and visual) build with the MinGW GCC compiler on Windows. More information on the effort is in https://sourceforge.net/tracker/?func=detail&atid=724218&aid=1180074&group_id=132417 . cmath.hpp: use ADOBE_PLATFORM_WIN instead of BOOST_MSVC eve.hpp: reorder member variable definitions to avoid initialization warnings. future/assemblage.hpp: include boost/bind.hpp, because it is used later in the file. source/istream.cpp: reorder member variable initialization list to avoid warnings. test/eve_smoke/main.cpp: added a newline to the end of the file. test/visual/Jamfile: add correct link flags for MinGW toolset, only include resource file for MSVC build. I will commit more of Tobias changes once I've had the opportunity to test them (the changes which remain should always be in bug 1180074). Index: Jamfile =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/Jamfile,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Jamfile 10 Apr 2005 07:00:45 -0000 1.7 --- Jamfile 10 Apr 2005 08:15:16 -0000 1.8 *************** *** 10,14 **** PLATFORM_HEADERS = headers/win resources ; PLATFORM_SOURCE_DIR = sources/win ; ! PLATFORM_SOURCES = sources/win/metrics.cpp sources/win/event_dispatcher.cpp resources/resources.rc ; # # These two definitions say that we're targetting Windows XP. That --- 10,21 ---- PLATFORM_HEADERS = headers/win resources ; PLATFORM_SOURCE_DIR = sources/win ; ! # ! # Note that the resource script is also included in an MSVC build ! # by the project requirements section. ! # ! PLATFORM_SOURCES = ! sources/win/metrics.cpp ! sources/win/event_dispatcher.cpp ! ; # # These two definitions say that we're targetting Windows XP. That *************** *** 26,30 **** --- 33,46 ---- project adobe/visual : requirements <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib /subsystem:windows" + : requirements <toolset>mingw:<linkflags>"-lgdi32 -luser32 -lcomctl32" : requirements <toolset>darwin:<linkflags>"-framework Carbon" + # + # Currently MSVC is the only windows compiler which Boost knows how + # to make generate resource files, hence the predicate for including + # resources.rc in the build. The correct fix for this Jammery is to + # tell Boost.Build about MinGW's resource compiler (obviously this + # will have to be added to Boost, not ASL). + # + : requirements <toolset>msvc:<source>resources/resources.rc : requirements <include>headers <link>static ; |
|
From: Ralph T. <ra...@us...> - 2005-04-10 08:15:24
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/eve_smoke In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30532/adobe-source/adobe/test/eve_smoke Modified Files: main.cpp Log Message: These are some of Tobias Schwinger's changes to make ASL (and visual) build with the MinGW GCC compiler on Windows. More information on the effort is in https://sourceforge.net/tracker/?func=detail&atid=724218&aid=1180074&group_id=132417 . cmath.hpp: use ADOBE_PLATFORM_WIN instead of BOOST_MSVC eve.hpp: reorder member variable definitions to avoid initialization warnings. future/assemblage.hpp: include boost/bind.hpp, because it is used later in the file. source/istream.cpp: reorder member variable initialization list to avoid warnings. test/eve_smoke/main.cpp: added a newline to the end of the file. test/visual/Jamfile: add correct link flags for MinGW toolset, only include resource file for MSVC build. I will commit more of Tobias changes once I've had the opportunity to test them (the changes which remain should always be in bug 1180074). Index: main.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/eve_smoke/main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.cpp 30 Mar 2005 22:34:36 -0000 1.1 --- main.cpp 10 Apr 2005 08:15:15 -0000 1.2 *************** *** 136,138 **** return success ? 0 : 1; ! } \ No newline at end of file --- 136,139 ---- return success ? 0 : 1; ! } ! |
|
From: Ralph T. <ra...@us...> - 2005-04-10 08:15:23
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30532/adobe-source/adobe/source Modified Files: istream.cpp Log Message: These are some of Tobias Schwinger's changes to make ASL (and visual) build with the MinGW GCC compiler on Windows. More information on the effort is in https://sourceforge.net/tracker/?func=detail&atid=724218&aid=1180074&group_id=132417 . cmath.hpp: use ADOBE_PLATFORM_WIN instead of BOOST_MSVC eve.hpp: reorder member variable definitions to avoid initialization warnings. future/assemblage.hpp: include boost/bind.hpp, because it is used later in the file. source/istream.cpp: reorder member variable initialization list to avoid warnings. test/eve_smoke/main.cpp: added a newline to the end of the file. test/visual/Jamfile: add correct link flags for MinGW toolset, only include resource file for MSVC build. I will commit more of Tobias changes once I've had the opportunity to test them (the changes which remain should always be in bug 1180074). Index: istream.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/source/istream.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** istream.cpp 19 Mar 2005 00:16:43 -0000 1.1 --- istream.cpp 10 Apr 2005 08:15:15 -0000 1.2 *************** *** 21,28 **** line_position_t::line_position_t(const char* stream_name, int line_number, std::streampos line_start, std::streampos position) : - stream_name_m(stream_name), line_number_m(line_number), line_start_m(line_start), ! position_m(position) { } --- 21,28 ---- line_position_t::line_position_t(const char* stream_name, int line_number, std::streampos line_start, std::streampos position) : line_number_m(line_number), line_start_m(line_start), ! position_m(position), ! stream_name_m(stream_name) { } |
|
From: Ralph T. <ra...@us...> - 2005-04-10 08:15:23
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30532/adobe-source/adobe/future Modified Files: assemblage.hpp Log Message: These are some of Tobias Schwinger's changes to make ASL (and visual) build with the MinGW GCC compiler on Windows. More information on the effort is in https://sourceforge.net/tracker/?func=detail&atid=724218&aid=1180074&group_id=132417 . cmath.hpp: use ADOBE_PLATFORM_WIN instead of BOOST_MSVC eve.hpp: reorder member variable definitions to avoid initialization warnings. future/assemblage.hpp: include boost/bind.hpp, because it is used later in the file. source/istream.cpp: reorder member variable initialization list to avoid warnings. test/eve_smoke/main.cpp: added a newline to the end of the file. test/visual/Jamfile: add correct link flags for MinGW toolset, only include resource file for MSVC build. I will commit more of Tobias changes once I've had the opportunity to test them (the changes which remain should always be in bug 1180074). Index: assemblage.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/assemblage.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** assemblage.hpp 30 Mar 2005 01:46:18 -0000 1.2 --- assemblage.hpp 10 Apr 2005 08:15:14 -0000 1.3 *************** *** 13,16 **** --- 13,17 ---- #include <vector> + #include <boost/bind.hpp> #include <boost/signal.hpp> #include <boost/function.hpp> |
|
From: Ralph T. <ra...@us...> - 2005-04-10 08:15:23
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30532/adobe-source/adobe Modified Files: cmath.hpp eve.hpp Log Message: These are some of Tobias Schwinger's changes to make ASL (and visual) build with the MinGW GCC compiler on Windows. More information on the effort is in https://sourceforge.net/tracker/?func=detail&atid=724218&aid=1180074&group_id=132417 . cmath.hpp: use ADOBE_PLATFORM_WIN instead of BOOST_MSVC eve.hpp: reorder member variable definitions to avoid initialization warnings. future/assemblage.hpp: include boost/bind.hpp, because it is used later in the file. source/istream.cpp: reorder member variable initialization list to avoid warnings. test/eve_smoke/main.cpp: added a newline to the end of the file. test/visual/Jamfile: add correct link flags for MinGW toolset, only include resource file for MSVC build. I will commit more of Tobias changes once I've had the opportunity to test them (the changes which remain should always be in bug 1180074). Index: eve.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/eve.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** eve.hpp 19 Mar 2005 00:16:38 -0000 1.1 --- eve.hpp 10 Apr 2005 08:15:14 -0000 1.2 *************** *** 147,154 **** }; - spacing_t spacing_m; - boost::array<slice_t, 2> slice_m; long indent_m; bool create_m; // containers only --- 147,154 ---- }; long indent_m; bool create_m; + spacing_t spacing_m; + boost::array<slice_t, 2> slice_m; // containers only Index: cmath.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/cmath.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cmath.hpp 3 Apr 2005 00:29:55 -0000 1.2 --- cmath.hpp 10 Apr 2005 08:15:14 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- #include <boost/config.hpp> + #include "config.hpp" #include <cmath> *************** *** 34,38 **** } // namespace adobe ! #elif defined BOOST_MSVC namespace adobe { --- 35,39 ---- } // namespace adobe ! #elif defined ADOBE_PLATFORM_WIN namespace adobe { |