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-23 23:29:34
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/future/widgets/sources/mac Modified Files: metrics.cpp os_utilities.cpp ui_core_implementation.cpp Added Files: label_t_impl.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. Index: metrics.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/mac/metrics.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** metrics.cpp 3 Feb 2006 18:33:37 -0000 1.6 --- metrics.cpp 23 Feb 2006 23:28:55 -0000 1.7 *************** *** 15,18 **** --- 15,19 ---- #include <adobe/dictionary.hpp> #include <adobe/array.hpp> + #include <adobe/once.hpp> #include <sstream> *************** *** 20,23 **** --- 21,49 ---- /****************************************************************************************************/ + ADOBE_ONCE_DECLARATION(mac_metrics_once) + + /****************************************************************************************************/ + + namespace { + + /****************************************************************************************************/ + + ADOBE_THREAD_LOCAL_STORAGE(adobe::virtual_machine_t, metrics_vm) + + /*************************************************************************************************/ + + void init_mac_metrics_once() + { + // initialize the thread-specific virtual machine + + ADOBE_THREAD_LOCAL_STORAGE_INITIALIZE(metrics_vm); + } + + /****************************************************************************************************/ + + } // namespace + + /****************************************************************************************************/ + namespace adobe { *************** *** 26,29 **** --- 52,57 ---- adobe::dictionary_t widget_metrics(const std::string& xstr, const adobe::dictionary_t& context) { + ADOBE_ONCE_INSTANCE(mac_metrics_once); + std::vector<adobe::attribute_set_t::value_type> context_attribute_set; *************** *** 55,63 **** parser.require_expression(expression); ! virtual_machine_t machine; ! machine.evaluate(expression); ! return machine.back().value_m.get<adobe::dictionary_t>(); } --- 83,93 ---- parser.require_expression(expression); ! ADOBE_THREAD_LOCAL_STORAGE_ACCESS(metrics_vm).evaluate(expression); ! adobe::dictionary_t result(ADOBE_THREAD_LOCAL_STORAGE_ACCESS(metrics_vm).back().value_m.get<adobe::dictionary_t>()); ! ADOBE_THREAD_LOCAL_STORAGE_ACCESS(metrics_vm).pop_back(); ! ! return result; } *************** *** 66,68 **** --- 96,102 ---- } // namespace adobe + /*************************************************************************************************/ + + ADOBE_ONCE_DEFINITION(mac_metrics_once, init_mac_metrics_once) + /****************************************************************************************************/ Index: os_utilities.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/mac/os_utilities.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** os_utilities.cpp 3 Feb 2006 18:33:37 -0000 1.1 --- os_utilities.cpp 23 Feb 2006 23:28:55 -0000 1.2 *************** *** 227,230 **** --- 227,256 ---- /****************************************************************************************************/ + adobe::extents_t measure_theme_text(const std::string& text, adobe::theme_t theme) + { + adobe::extents_t result; + ::Point io_bounds = { 0 }; + ::SInt16 out_baseline(0); + + adobe::auto_resource< ::CFStringRef > auto_cfstring(string_to_cfstring(text)); + + ::ADOBE_REQUIRE_STATUS(::GetThemeTextDimensions( + auto_cfstring.get(), + implementation::theme_to_ThemeFontID(theme), + kThemeStateActive, + false, + &io_bounds, + &out_baseline)); + + result.width() = io_bounds.h; + result.height() = io_bounds.v; + + result.vertical().poi_m.push_back(io_bounds.v + out_baseline); + + return result; + } + + /****************************************************************************************************/ + void theme_to_rec(const adobe::theme_t& style, ControlFontStyleRec& style_rec) { *************** *** 241,249 **** switch (masked) { ! case adobe::theme_large_s: result.size = 14; break; ! case adobe::theme_small_s: result.size = 10; break; ! case adobe::theme_mini_s: result.size = 9; break; case adobe::theme_normal_s: ! default: result.size = 12; break; } } --- 267,275 ---- switch (masked) { ! case adobe::theme_large_s: result.size = 16; break; ! case adobe::theme_small_s: result.size = 12; break; ! case adobe::theme_mini_s: result.size = 11; break; case adobe::theme_normal_s: ! default: result.size = 14; break; } } Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/mac/ui_core_implementation.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ui_core_implementation.cpp 3 Feb 2006 18:33:37 -0000 1.10 --- ui_core_implementation.cpp 23 Feb 2006 23:28:55 -0000 1.11 *************** *** 89,92 **** --- 89,106 ---- /****************************************************************************************************/ + adobe::extents_t measure_label_text(const std::string& text, adobe::theme_t theme) + { + adobe::label_t label(text, 0, theme); + adobe::extents_t result; + + result.horizontal() = label.measure_horizontal(); + + result.vertical() = label.measure_vertical(result.horizontal()); + + return result; + } + + /****************************************************************************************************/ + const adobe::metric_extractor_t& global_metrics() { *************** *** 534,549 **** extents_t window_t::implementation_t::measure() { ! extents_t result; ! static_text_t temp; adobe::implementation::set_metric_extractor(*this); ! temp.initialize(implementation::get_name(window_m)); ! temp.set_theme(theme_m); ! ! extents_t temp_measure(temp.best_bounds()); ! ! result.width() = temp_measure.width() + metrics_m(adobe::implementation::k_metric_spacing); ! result.height() = temp_measure.height(); return adobe::implementation::apply_fudges(*this, result); --- 548,556 ---- extents_t window_t::implementation_t::measure() { ! extents_t result(measure_label_text(implementation::get_name(window_m), theme_m)); adobe::implementation::set_metric_extractor(*this); ! result.width() += metrics_m(adobe::implementation::k_metric_spacing); return adobe::implementation::apply_fudges(*this, result); *************** *** 743,759 **** // we have to do it for them. ! adobe::extents_t result; adobe::implementation::set_metric_extractor(*this); ! static_text_t temp; ! ! temp.initialize(implementation::get_name(control_m)); ! temp.set_theme(theme_m); ! ! adobe::extents_t temp_measure(temp.best_bounds()); ! result.width() += temp_measure.width() + metrics_m(adobe::implementation::k_metric_spacing); ! result.vertical().frame_m.first = temp_measure.height(); return adobe::implementation::apply_fudges(*this, result); --- 750,760 ---- // we have to do it for them. ! adobe::extents_t result(measure_label_text(implementation::get_name(control_m), theme_m)); adobe::implementation::set_metric_extractor(*this); ! result.width() += metrics_m(adobe::implementation::k_metric_spacing); ! result.vertical().frame_m.first = result.height(); return adobe::implementation::apply_fudges(*this, result); *************** *** 882,893 **** for (tab_set_t::iterator first(items_m.begin()), last(items_m.end()); first != last; ++first) { ! static_text_t temp; ! ! temp.initialize(first->name_m); ! temp.set_theme(theme_m); ! ! adobe::extents_t temp_measure(temp.best_bounds()); result.width() += temp_measure.width() + metrics_m(adobe::implementation::k_metric_spacing); result.vertical().frame_m.first = std::max(result.vertical().frame_m.first, temp_measure.height()); } --- 883,890 ---- for (tab_set_t::iterator first(items_m.begin()), last(items_m.end()); first != last; ++first) { ! adobe::extents_t temp_measure(measure_label_text(first->name_m, theme_m)); result.width() += temp_measure.width() + metrics_m(adobe::implementation::k_metric_spacing); + result.vertical().frame_m.first = std::max(result.vertical().frame_m.first, temp_measure.height()); } *************** *** 1863,2048 **** /****************************************************************************************************/ - ADOBE_WIDGET_TAG_BOILERPLATE(adobe::static_text_t::implementation_t, "<xstr id='metric:static_text'/>"); - - /****************************************************************************************************/ - - namespace implementation { - - /****************************************************************************************************/ - - template <> - std::string get_name<adobe::static_text_t::implementation_t>(const adobe::static_text_t::implementation_t& widget) - { - if (!widget.control_m) return std::string(); - - ::CFStringRef cfstring; - - get_widget_data(widget.control_m, kControlEntireControl, kControlStaticTextCFStringTag, cfstring); - - adobe::auto_resource< ::CFStringRef > auto_cfstring(cfstring); - - return cfstring_to_string(cfstring); - } - - /****************************************************************************************************/ - - template <> - void set_name< adobe::static_text_t::implementation_t >(adobe::static_text_t::implementation_t& control, const std::string& name) - { - set_widget_data( - control.control_m, - kControlEntireControl, - kControlStaticTextCFStringTag, - implementation::localize_to_cfstring(name).get()); - } - - /****************************************************************************************************/ - - } // namespace implementation - - /****************************************************************************************************/ - - ::OSStatus static_text_hit_handler_t::handle_event( ::EventHandlerCallRef next, - ::EventRef event) - { - if (user_data_m.empty()) - return eventNotHandledErr; - - ::UInt32 modifiers; - - implementation::get_event_parameter<kEventParamKeyModifiers>(event, modifiers); - - user_data_m(implementation::convert_modifiers(modifiers)); - - return noErr; - } - - /****************************************************************************************************/ - - static_text_t::implementation_t::implementation_t() : - control_m(0), - theme_m(adobe::theme_normal_s), - hit_handler_m(*this) - { } - - /****************************************************************************************************/ - - static_text_t::implementation_t::implementation_t(const implementation_t& rhs) : - control_m(0), - hit_handler_m(*this) - { - Rect bounds = { 0 }; - - implementation::get_bounds(rhs.control_m, bounds); - - initialize(bounds, implementation::get_name(rhs)); - - set_theme(rhs.theme_m); - } - - /****************************************************************************************************/ - - void static_text_t::implementation_t::initialize( const Rect& bounds, - const std::string& name) - { - assert(!control_m); - - ADOBE_REQUIRE_STATUS(::CreateStaticTextControl( 0, &bounds, - implementation::localize_to_cfstring(name).get(), - NULL, &control_m)); - } - - /****************************************************************************************************/ - - /* - REVISIT (sparent) : This is the basic code for how we _should_ measure static texts. There - may be an issue with word-wrapped text (I didn't touch that case, I'm not sure how it works. - - This fixes our alignment tests, and wrapped text still works, so I'm going to let this go for - the re-write. - */ - - extents_t static_text_t::implementation_t::best_bounds() - { - assert(control_m); - - adobe::extents_t result; - ::CFStringRef cfstring; - ::Point io_bounds = { 0 }; - ::SInt16 out_baseline(0); - - adobe::implementation::set_metric_extractor(*this); - - implementation::get_widget_data(control_m, kControlEntireControl, kControlStaticTextCFStringTag, cfstring); - - adobe::auto_resource< ::CFStringRef > auto_cfstring(cfstring); - - ::ADOBE_REQUIRE_STATUS(::GetThemeTextDimensions( - cfstring, - implementation::theme_to_ThemeFontID(theme_m), - kThemeStateActive, - false, - &io_bounds, - &out_baseline)); - - result.height() = io_bounds.v; - result.width() = io_bounds.h; - - result.vertical().poi_m.push_back(result.height() + out_baseline); - - return implementation::apply_fudges(*this, result); - } - - /****************************************************************************************************/ - - void static_text_t::implementation_t::set_bounds(const point_2d_t& position, const extents_t& extents) - { - assert(control_m); - - implementation::set_bounds(*this, position, extents); - } - - /****************************************************************************************************/ - - void static_text_t::implementation_t::set_name(const std::string& name) - { - assert(control_m); - - implementation::set_name(*this, name); - } - - /****************************************************************************************************/ - - long static_text_t::implementation_t::best_height_given_width(long width) - { - assert(control_m); - - ::Rect static_bounds = { 0, 0, 10, static_cast<short>(width) }; - - implementation::set_bounds(control_m, static_bounds); - - adobe::extents_t best_bounds_result(implementation::measure(*this)); - - return best_bounds_result.height(); - } - - /****************************************************************************************************/ - - void static_text_t::implementation_t::signal_hit(const implementation::static_text_hit_proc_t& proc) - { - assert(control_m); - - hit_handler_m.set_user_data(proc); - hit_handler_m.install(control_m); - } - - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - /****************************************************************************************************/ - ADOBE_WIDGET_TAG_BOILERPLATE(adobe::edit_text_t::implementation_t, "<xstr id='metric:edit_text'/>"); --- 1860,1863 ---- *************** *** 2138,2142 **** void set_name<adobe::edit_text_t::implementation_t>(adobe::edit_text_t::implementation_t& widget, const std::string& name) { ! widget.get_label().set_name(name); } --- 1953,1957 ---- void set_name<adobe::edit_text_t::implementation_t>(adobe::edit_text_t::implementation_t& widget, const std::string& name) { ! widget.get_label() = label_t(name, 0, widget.theme_m); } *************** *** 2170,2173 **** --- 1985,2009 ---- /****************************************************************************************************/ + template <> + void set_theme<adobe::edit_text_t::implementation_t>(adobe::edit_text_t::implementation_t& edit_text, + adobe::theme_t theme) + { + edit_text.theme_m = theme; + + if (edit_text.scrollable_m) + { + ::TXNObject textview(::HITextViewGetTXNObject(edit_text.control_m)); + + implementation::set_theme(textview, theme); + } + else + implementation::set_theme(edit_text.control_m, theme); + + if (edit_text.using_label_m) + edit_text.get_label() = label_t(implementation::get_name(edit_text.get_label().implementation()), 0, theme); + } + + /****************************************************************************************************/ + } // namespace implementation *************** *** 2273,2283 **** command.commandID == kHICommandRedo) { ! ::TXNObject textview(::HITextViewGetTXNObject(edit_text.control_m)); ! ::OSStatus result = edit_text.post_edit_handler_m.handle_event(next, event); ! ! // Forces the text coming in to the theme of the widget ! implementation::set_theme(textview, edit_text.theme_m); ! ! return result; } --- 2109,2113 ---- command.commandID == kHICommandRedo) { ! return edit_text.post_edit_handler_m.handle_event(next, event); } *************** *** 2291,2294 **** --- 2121,2126 ---- theme_m(adobe::theme_normal_s), scroll_control_m(0), + name_m("dummy", 0, adobe::theme_normal_s), + static_disabled_text_m("dummy", 0, adobe::theme_normal_s), static_disabled_m(false), using_label_m(false), *************** *** 2308,2311 **** --- 2140,2144 ---- name_m(rhs.name_m), field_text_m(rhs.field_text_m), + static_disabled_text_m(rhs.static_disabled_text_m), static_disabled_m(rhs.static_disabled_m), using_label_m(rhs.using_label_m), *************** *** 2375,2379 **** ::HIViewSetVisible(scroll_control_m, true); ! ::ADOBE_REQUIRE_STATUS(::HITextViewCreate(NULL, 0, 0, &control_m)); ::HIViewSetVisible(control_m, true); --- 2208,2217 ---- ::HIViewSetVisible(scroll_control_m, true); ! ::ADOBE_REQUIRE_STATUS(::HITextViewCreate(NULL, ! 0, ! kTXNMonostyledTextMask | ! kTXNWantHScrollBarMask | ! kTXNWantVScrollBarMask, ! &control_m)); ::HIViewSetVisible(control_m, true); *************** *** 2405,2418 **** } ! static_disabled_text_m.initialize("dummy"); ! static_disabled_text_m.set_visible(false); ::SetControlReference(control_m, reinterpret_cast< ::SInt32 >(this)); if (using_label_m) ! { ! get_label().initialize(name); ! get_label().adorn_theme(theme_adornment_label_s); ! } } --- 2243,2252 ---- } ! //static_disabled_text_m.set_visible(false); ::SetControlReference(control_m, reinterpret_cast< ::SInt32 >(this)); if (using_label_m) ! get_label() = label_t(name, 0, theme_m); } *************** *** 2428,2444 **** if (rows_m > 1) { ! static_text_t temp; ! ! temp.initialize(base_text); ! temp.set_theme(theme_m); ! ! #if 0 ! // measure the control directly because we don't apply the ! // fudges yet; we want to do that with the edit text values ! ! result = implementation::measure(temp.implementation().control_m); ! #else ! result = temp.best_bounds(); ! #endif result.height() *= rows_m; --- 2262,2266 ---- if (rows_m > 1) { ! result = measure_label_text(base_text, theme_m); result.height() *= rows_m; *************** *** 2466,2470 **** return result; ! adobe::extents_t label_bounds(get_label().best_bounds()); if (result.vertical().poi_m.size() && label_bounds.vertical().poi_m.size()) --- 2288,2292 ---- return result; ! adobe::extents_t label_bounds(implementation::measure_theme_text(implementation::get_name(get_label().implementation()), theme_m)); if (result.vertical().poi_m.size() && label_bounds.vertical().poi_m.size()) *************** *** 2509,2513 **** label_position.y_m += baseline - static_baseline_m; ! get_label().set_bounds(label_position, label_extents); position.x_m += label_extents.width() + global_metrics()(implementation::k_metric_gap); --- 2331,2335 ---- label_position.y_m += baseline - static_baseline_m; ! get_label().place(label_position, label_extents); position.x_m += label_extents.width() + global_metrics()(implementation::k_metric_gap); *************** *** 2551,2555 **** rect.width() = bounds.right - bounds.left; ! static_disabled_text_m.set_bounds(position, rect); } } --- 2373,2377 ---- rect.width() = bounds.right - bounds.left; ! static_disabled_text_m.place(position, rect); } } *************** *** 2580,2593 **** rect.width() = bounds.right - bounds.left; ! static_disabled_text_m.set_bounds(position, rect); ! static_disabled_text_m.set_name(implementation::get_field_text(*this)); } set_visible(active); ! static_disabled_text_m.set_visible(!active); ! ! // REVISIT : (fbrereto) Should we be disabling the label, or only the edit field? ! //if (using_label_m) ! // get_label().set_active(active); } else --- 2402,2411 ---- rect.width() = bounds.right - bounds.left; ! static_disabled_text_m = label_t(implementation::get_field_text(*this), 0, theme_m); ! static_disabled_text_m.place(position, rect); } set_visible(active); ! //static_disabled_text_m.set_visible(!active); } else *************** *** 2603,2608 **** if (!using_label_m) return; ! if (!static_disabled_m || scrollable_m) ! get_label().set_visible(make_visible); } --- 2421,2426 ---- if (!using_label_m) return; ! // if (!static_disabled_m || scrollable_m) ! // get_label().set_visible(make_visible); } *************** *** 2611,2629 **** void edit_text_t::implementation_t::set_theme(theme_t theme) { ! theme_m = theme; ! ! if (scrollable_m) ! { ! ::TXNObject textview(::HITextViewGetTXNObject(control_m)); ! ! implementation::set_theme(textview, theme); ! } ! else ! implementation::set_theme(control_m, theme); ! ! static_disabled_text_m.set_theme(theme); ! ! if (using_label_m) ! get_label().adorn_theme(theme & ~theme_adornment_mask_s); } --- 2429,2433 ---- void edit_text_t::implementation_t::set_theme(theme_t theme) { ! implementation::set_theme(*this, theme); } *************** *** 2634,2641 **** implementation::adorn_theme(*this, theme); - static_disabled_text_m.adorn_theme(theme); - if (using_label_m) ! get_label().adorn_theme(theme & ~theme_adornment_mask_s); } --- 2438,2443 ---- implementation::adorn_theme(*this, theme); if (using_label_m) ! get_label() = label_t(implementation::get_name(get_label().implementation()), 0, theme_m); } *************** *** 2646,2653 **** implementation::unadorn_theme(*this, theme); - static_disabled_text_m.unadorn_theme(theme); - if (using_label_m) ! get_label().unadorn_theme(theme & ~theme_adornment_mask_s); } --- 2448,2453 ---- implementation::unadorn_theme(*this, theme); if (using_label_m) ! get_label() = label_t(implementation::get_name(get_label().implementation()), 0, theme_m); } *************** *** 2734,2738 **** void edit_text_t::implementation_t::signal_label_hit(const implementation::edit_text_label_hit_proc_t& proc) { ! get_label().signal_hit(proc); } --- 2534,2538 ---- void edit_text_t::implementation_t::signal_label_hit(const implementation::edit_text_label_hit_proc_t& proc) { ! //get_label().signal_hit(proc); } *************** *** 2898,2901 **** --- 2698,2702 ---- control_m(0), theme_m(adobe::theme_normal_s), + static_disabled_text_m("dummy", 0, adobe::theme_normal_s), static_disabled_m(false), using_label_m(false), *************** *** 2907,2914 **** popup_t::implementation_t::implementation_t(const implementation_t& rhs) : control_m(0), static_disabled_m(rhs.static_disabled_m), value_handler_m(*this) { ! Rect bounds = { 0 }; implementation::get_bounds(rhs.control_m, bounds); --- 2708,2716 ---- popup_t::implementation_t::implementation_t(const implementation_t& rhs) : control_m(0), + static_disabled_text_m(rhs.static_disabled_text_m), static_disabled_m(rhs.static_disabled_m), value_handler_m(*this) { ! ::Rect bounds = { 0 }; implementation::get_bounds(rhs.control_m, bounds); *************** *** 2937,2942 **** key_handler_m.install(control_m); ! static_disabled_text_m.initialize("dummy"); ! static_disabled_text_m.set_visible(false); using_label_m = !name.empty(); --- 2739,2743 ---- key_handler_m.install(control_m); ! // static_disabled_text_m.set_visible(false); using_label_m = !name.empty(); *************** *** 2955,2965 **** if (!using_label_m) return result; ! static_text_t temp; ! ! temp.initialize(name_m); ! ! temp.set_theme(theme_m); ! ! result.horizontal().poi_m.push_back(temp.best_bounds().width()); return result; --- 2756,2760 ---- if (!using_label_m) return result; ! result.horizontal().poi_m.push_back(measure_label_text(name_m, theme_m).width()); return result; *************** *** 2988,2992 **** rect.width() = bounds.right - bounds.left; ! static_disabled_text_m.set_bounds(position, rect); } } --- 2783,2787 ---- rect.width() = bounds.right - bounds.left; ! static_disabled_text_m.place(position, rect); } } *************** *** 3016,3025 **** rect.width() = bounds.right - bounds.left; ! static_disabled_text_m.set_bounds(position, rect); ! static_disabled_text_m.set_name(implementation::get_field_text(*this)); } set_visible(active); ! static_disabled_text_m.set_visible(!active); } else --- 2811,2820 ---- rect.width() = bounds.right - bounds.left; ! static_disabled_text_m = label_t(implementation::get_field_text(*this), 0, theme_m); ! static_disabled_text_m.place(position, rect); } set_visible(active); ! // static_disabled_text_m.set_visible(!active); } else *************** *** 3033,3037 **** implementation::set_theme(*this, theme); ! static_disabled_text_m.set_theme(theme & ~theme_adornment_mask_s); } --- 2828,2832 ---- implementation::set_theme(*this, theme); ! static_disabled_text_m = label_t("dummy", 0, theme_m); } *************** *** 3042,3046 **** implementation::adorn_theme(*this, theme); ! static_disabled_text_m.adorn_theme(theme & ~theme_adornment_mask_s); } --- 2837,2841 ---- implementation::adorn_theme(*this, theme); ! static_disabled_text_m = label_t("dummy", 0, theme_m); } *************** *** 3051,3055 **** implementation::unadorn_theme(*this, theme); ! static_disabled_text_m.unadorn_theme(theme & ~theme_adornment_mask_s); } --- 2846,2850 ---- implementation::unadorn_theme(*this, theme); ! static_disabled_text_m = label_t("dummy", 0, theme_m); } *************** *** 3563,3567 **** ADOBE_SERIALIZABLE_EQUALITY_IMPLEMENTATION_DEFINITION(adobe::separator_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_IMPLEMENTATION_DEFINITION(adobe::progress_bar_t::implementation_t); - ADOBE_SERIALIZABLE_EQUALITY_IMPLEMENTATION_DEFINITION(adobe::static_text_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_IMPLEMENTATION_DEFINITION(adobe::edit_text_t::implementation_t); ADOBE_SERIALIZABLE_EQUALITY_IMPLEMENTATION_DEFINITION(adobe::popup_t::implementation_t); --- 3358,3361 ---- *************** *** 3598,3605 **** /****************************************************************************************************/ - - ADOBE_VIEW_FOR_ELEMENT_AND_INSERT_BOILERPLATE_SPECIALIZATION(static_text_t); - - /****************************************************************************************************/ /* Non-default specialization for window_t */ --- 3392,3395 ---- --- NEW FILE: label_t_impl.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" #include "display.hpp" #include "ui_overlay.hpp" /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ namespace implementation { /****************************************************************************************************/ template <> std::string get_name<adobe::label_t::implementation_t>(const adobe::label_t::implementation_t& widget) { if (!widget.control_m) return std::string(); ::CFStringRef cfstring; get_widget_data(widget.control_m, kControlEntireControl, kControlStaticTextCFStringTag, cfstring); adobe::auto_resource< ::CFStringRef > auto_cfstring(cfstring); return cfstring_to_string(cfstring); } /****************************************************************************************************/ template <> void set_name< adobe::label_t::implementation_t >(adobe::label_t::implementation_t& control, const std::string& name) { set_widget_data( control.control_m, kControlEntireControl, kControlStaticTextCFStringTag, implementation::localize_to_cfstring(name).get()); } /****************************************************************************************************/ } // namespace implementation /****************************************************************************************************/ ADOBE_WIDGET_TAG_BOILERPLATE(adobe::label_t::implementation_t, "<xstr id='metric:label'/>"); /****************************************************************************************************/ #if 0 ::OSStatus label_hit_handler_t::handle_event(::EventHandlerCallRef next, ::EventRef event) { if (user_data_m.empty()) return eventNotHandledErr; ::UInt32 modifiers; implementation::get_event_parameter<kEventParamKeyModifiers>(event, modifiers); user_data_m(implementation::convert_modifiers(modifiers)); return noErr; } #endif /****************************************************************************************************/ label_t::implementation_t::implementation_t(const std::string& name, std::size_t characters, theme_t theme) : characters_m(0) #if 0 , hit_handler_m(*this) #endif { ::Rect bounds = { 0, 0, 2048, 2048 }; ADOBE_REQUIRE_STATUS(::CreateStaticTextControl( 0, &bounds, implementation::localize_to_cfstring(name).get(), NULL, &control_m)); implementation::set_theme(*this, theme); } /****************************************************************************************************/ label_t::implementation_t::implementation_t(const implementation_t& rhs) : characters_m(rhs.characters_m) #if 0 , hit_handler_m(*this) #endif { ::Rect bounds = { 0 }; implementation::get_bounds(rhs.control_m, bounds); ADOBE_REQUIRE_STATUS(::CreateStaticTextControl( 0, &bounds, implementation::string_to_cfstring(implementation::get_name(rhs)).get(), NULL, &control_m)); implementation::set_theme(*this, rhs.theme_m); } /****************************************************************************************************/ label_t::implementation_t& label_t::implementation_t::operator= (const implementation_t& rhs) { if (control_m) ::DisposeControl(control_m); ::Rect bounds = { 0 }; implementation::get_bounds(rhs.control_m, bounds); ADOBE_REQUIRE_STATUS(::CreateStaticTextControl( 0, &bounds, implementation::string_to_cfstring(implementation::get_name(rhs)).get(), NULL, &control_m)); implementation::set_theme(*this, rhs.theme_m); return *this; } /****************************************************************************************************/ extents_t::slice_t label_t::implementation_t::measure_horizontal() { assert(control_m); adobe::extents_t result; ::CFStringRef cfstring; ::Point io_bounds = { 0 }; ::SInt16 out_baseline(0); adobe::implementation::set_metric_extractor(*this); implementation::get_widget_data(control_m, kControlEntireControl, kControlStaticTextCFStringTag, cfstring); adobe::auto_resource< ::CFStringRef > auto_cfstring(cfstring); ::ADOBE_REQUIRE_STATUS(::GetThemeTextDimensions( cfstring, implementation::theme_to_ThemeFontID(theme_m), kThemeStateActive, false, &io_bounds, &out_baseline)); result.width() = io_bounds.h; result = implementation::apply_fudges(*this, result); return result.horizontal(); } /****************************************************************************************************/ extents_t::slice_t label_t::implementation_t::measure_vertical(const extents_t::slice_t& horizontal) { assert(control_m); ::Rect static_bounds = { 0, 0, 10, static_cast<short>(horizontal.length_m) }; implementation::set_bounds(control_m, static_bounds); adobe::extents_t result(implementation::measure(*this)); result = implementation::apply_fudges(*this, result); return result.vertical(); } /****************************************************************************************************/ #if 0 void label_t::implementation_t::signal_hit(const implementation::label_hit_proc_t& proc) { assert(control_m); hit_handler_m.set_user_data(proc); hit_handler_m.install(control_m); } #endif /****************************************************************************************************/ template <> ::HIViewRef view_for_element< ::HIViewRef, adobe::label_t >(adobe::label_t& widget) { return widget.implementation().control_m; } /****************************************************************************************************/ template <> \ display_t::position_t insert<adobe::label_t>(display_t& display, display_t::position_t& parent, adobe::label_t& element) { ::HIViewRef ref(adobe::view_for_element< ::HIViewRef >(element)); return display.insert<HIViewRef>(parent, ref); } /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:34
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/source Modified Files: basic_sheet.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. Index: basic_sheet.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/source/basic_sheet.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** basic_sheet.cpp 3 Feb 2006 18:33:38 -0000 1.2 --- basic_sheet.cpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 100,102 **** } // namespace adobe ! /*************************************************************************************************/ \ No newline at end of file --- 100,102 ---- } // namespace adobe ! /*************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:34
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/future/widgets Modified Files: Jamfile.v2 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: Jamfile.v2 =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/Jamfile.v2,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Jamfile.v2 3 Feb 2006 18:33:36 -0000 1.8 --- Jamfile.v2 23 Feb 2006 23:28:55 -0000 1.9 *************** *** 14,17 **** --- 14,18 ---- ui_core_common ui_core + label_t ; *************** *** 23,26 **** --- 24,28 ---- ui_overlay ui_core_implementation + label_t_impl ; |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:33
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/bin Modified Files: build.sh 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: build.sh =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/bin/build.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** build.sh 3 Feb 2006 18:33:35 -0000 1.5 --- build.sh 23 Feb 2006 23:28:54 -0000 1.6 *************** *** 21,25 **** # Assuming the client only needs to run this once, we always build bjam ! if [ -e bjam ]; then if test_path cmd ; then echo_run rm bjam.exe --- 21,25 ---- # Assuming the client only needs to run this once, we always build bjam ! if [ -e bjam ] ; then if test_path cmd ; then echo_run rm bjam.exe *************** *** 35,53 **** TEMP_HOME="/tmp/adobe-source" ! if [ "$HOME" == "" ]; then HOME=$TEMP_HOME fi ! if [ ! -d "$HOME" ]; then echo_run mkdir -p "$HOME" fi ! if [ ! -e "$HOME/user-config.jam" -o "$HOME" == "$TEMP_HOME"]; then if [ "`uname`" == "Darwin" ]; then echo "import toolset : using ; using darwin ;" > "$HOME/user-config.jam" else ! if [ -d "$PROGRAMFILES/Microsoft Visual Studio .NET 2003/" ]; then echo "import msvc-config ; import toolset : using ; using gcc ;" > "$HOME/user-config.jam" ! elif [ -d "$PROGRAMFILES/Microsoft Visual Studio 8/" ]; then echo "import msvc-config ; import toolset : using ; using gcc ;" > "$HOME/user-config.jam" else --- 35,53 ---- TEMP_HOME="/tmp/adobe-source" ! if [ "$HOME" == "" ] ; then HOME=$TEMP_HOME fi ! if [ ! -d "$HOME" ] ; then echo_run mkdir -p "$HOME" fi ! if [[ ! -e "$HOME/user-config.jam" || "$HOME" == "$TEMP_HOME" ]] ; then if [ "`uname`" == "Darwin" ]; then echo "import toolset : using ; using darwin ;" > "$HOME/user-config.jam" else ! if [ -d "$PROGRAMFILES/Microsoft Visual Studio .NET 2003/" ] ; then echo "import msvc-config ; import toolset : using ; using gcc ;" > "$HOME/user-config.jam" ! elif [ -d "$PROGRAMFILES/Microsoft Visual Studio 8/" ] ; then echo "import msvc-config ; import toolset : using ; using gcc ;" > "$HOME/user-config.jam" else *************** *** 59,63 **** MODE="debug release" ! if [ "$1" != "" ]; then MODE=$1 fi --- 59,63 ---- MODE="debug release" ! if [ "$1" != "" ] ; then MODE=$1 fi |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:33
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe Modified Files: algorithm.hpp functional.hpp iterator.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: iterator.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/iterator.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** iterator.hpp 3 Feb 2006 18:33:35 -0000 1.10 --- iterator.hpp 23 Feb 2006 23:28:54 -0000 1.11 *************** *** 312,315 **** --- 312,392 ---- }; + //////////////////////////////////////////////////////////////////////////////////////// + /// + // STEP ITERATOR ADAPTOR + /// \brief step iterator adaptor + /// + /// An adaptor over an existing iterator that changes the step unit + /// (i.e. distance(it,it+1)) by a given predicate. Instead of calling base's + /// operators ++, --, +=, -=, etc. the adaptor is using the passed policy object S_FN + /// for advancing and for computing the distance between iterators. + /// + //////////////////////////////////////////////////////////////////////////////////////// + + template <typename DERIVED, // type of the derived class + typename IT, // Models Iterator + typename S_FN> // A policy object that can compute the distance between two iterators of type IT + // and can advance an iterator of type IT a given number of IT's units + class step_iterator_adaptor : public boost::iterator_adaptor<DERIVED, IT, boost::use_default, boost::use_default, boost::use_default, typename S_FN::difference_type> { + public: + typedef boost::iterator_adaptor<DERIVED, IT, boost::use_default, boost::use_default, boost::use_default, typename S_FN::difference_type> parent_type; + typedef typename std::iterator_traits<IT>::difference_type base_difference_type; + typedef typename S_FN::difference_type difference_type; + typedef typename std::iterator_traits<IT>::reference reference; + + step_iterator_adaptor() {} + step_iterator_adaptor(const IT& it, S_FN step_fn=S_FN()) : parent_type(it), _step_fn(step_fn) {} + + difference_type step() const { return _step_fn.step(); } + + protected: + S_FN _step_fn; + private: + friend class boost::iterator_core_access; + + void increment() { _step_fn.advance(this->base_reference(),1); } + void decrement() { _step_fn.advance(this->base_reference(),-1); } + void advance(base_difference_type d) { _step_fn.advance(this->base_reference(),d); } + difference_type distance_to(const step_iterator_adaptor& it) const { return _step_fn.difference(this->base_reference(),it.base_reference()); } + }; + + // although boost::iterator_adaptor defines these, the default implementation computes distance and compares for zero. + // it is often faster to just apply the relation operator to the base + template <typename D,typename IT,typename S_FN> inline + bool operator>(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) + { + return p1.step()>0 ? p1.base()> p2.base() : p1.base()< p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator<(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) + { + return p1.step()>0 ? p1.base()< p2.base() : p1.base()> p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator>=(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) + { + return p1.step()>0 ? p1.base()>=p2.base() : p1.base()<=p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator<=(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) + { + return p1.step()>0 ? p1.base()<=p2.base() : p1.base()>=p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator==(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) + { + return p1.base()==p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator!=(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) + { + return p1.base()!=p2.base(); + } + /*************************************************************************************************/ Index: algorithm.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/algorithm.hpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** algorithm.hpp 3 Feb 2006 18:33:35 -0000 1.12 --- algorithm.hpp 23 Feb 2006 23:28:54 -0000 1.13 *************** *** 36,39 **** --- 36,40 ---- #include <adobe/algorithm/assign.hpp> #include <adobe/algorithm/reverse.hpp> + #include <adobe/algorithm/copy.hpp> #include <adobe/source/swap.hpp> Index: functional.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/functional.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functional.hpp 3 Feb 2006 18:33:35 -0000 1.7 --- functional.hpp 23 Feb 2006 23:28:54 -0000 1.8 *************** *** 349,352 **** --- 349,379 ---- /*************************************************************************************************/ + /// \brief plus function object whose arguments may be of different type. + template <typename T1, typename T2> + struct plus_asymmetric : public std::binary_function<T1,T2,T1> + { + T1 operator()(T1 f1, T2 f2) const { + return f1+f2; + } + }; + + /*************************************************************************************************/ + + /// \brief operator++ wrapped in a function object + template <typename T> + struct inc : public std::unary_function<T,T> + { + T operator()(T x) const { return ++x; } + }; + + /*************************************************************************************************/ + + /// \brief operator-- wrapped in a function object + template <typename T> + struct dec : public std::unary_function<T,T> + { + T operator()(T x) const { return --x; } + }; + } // namespace adobe |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:33
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/documentation/sources Modified Files: documentation.doxygen 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: documentation.doxygen =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/documentation.doxygen,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** documentation.doxygen 3 Feb 2006 18:33:35 -0000 1.21 --- documentation.doxygen 23 Feb 2006 23:28:54 -0000 1.22 *************** *** 1,3 **** ! # Doxyfile 1.4.3 # This file describes the settings to be used by the documentation system --- 1,3 ---- ! # Doxyfile 1.4.6 # This file describes the settings to be used by the documentation system *************** *** 162,172 **** INHERIT_DOCS = YES - # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC - # tag is set to YES, then doxygen will reuse the documentation of the first - # member in the group (if any) for the other members of the group. By default - # all members of a group must be documented explicitly. - - DISTRIBUTE_GROUP_DOC = NO - # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will --- 162,165 ---- *************** *** 224,229 **** OPTIMIZE_OUTPUT_FOR_C = NO ! # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources ! # only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. --- 217,222 ---- OPTIMIZE_OUTPUT_FOR_C = NO ! # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java ! # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. *************** *** 231,234 **** --- 224,243 ---- OPTIMIZE_OUTPUT_JAVA = NO + # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to + # include (a tag file for) the STL sources as input, then you should + # set this tag to YES in order to let doxygen match functions declarations and + # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. + # func(std::string) {}). This also make the inheritance and collaboration + # diagrams that involve STL classes more complete and accurate. + + BUILTIN_STL_SUPPORT = NO + + # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC + # tag is set to YES, then doxygen will reuse the documentation of the first + # member in the group (if any) for the other members of the group. By default + # all members of a group must be documented explicitly. + + DISTRIBUTE_GROUP_DOC = NO + # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a *************** *** 405,409 **** # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy ! # in the documentation. SHOW_DIRECTORIES = NO --- 414,418 ---- # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy ! # in the documentation. The default is NO. SHOW_DIRECTORIES = NO *************** *** 414,418 **** # popen()) the command <command> <input-file>, where <command> is the value of # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file ! # provided by doxygen. Whatever the progam writes to standard output # is used as the file version. See the manual for examples. --- 423,427 ---- # popen()) the command <command> <input-file>, where <command> is the value of # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file ! # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. *************** *** 517,521 **** ./widget_lib/widget_reference.dox \ ../../algorithm.hpp \ ! ../../algorithm/reverse.hpp \ ../../array.hpp \ ../../array_fwd.hpp \ --- 526,530 ---- ./widget_lib/widget_reference.dox \ ../../algorithm.hpp \ ! ../../algorithm/reverse.hpp \ ../../array.hpp \ ../../array_fwd.hpp \ *************** *** 593,597 **** # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx ! # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm FILE_PATTERNS = *.c \ --- 602,606 ---- # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx ! # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = *.c \ *************** *** 622,626 **** # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude ! # certain files from those directories. EXCLUDE_PATTERNS = --- 631,637 ---- # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude ! # certain files from those directories. Note that the wildcards are matched ! # against the file with absolute path, so to exclude all test directories ! # for example use the pattern */test/* EXCLUDE_PATTERNS = *************** *** 1120,1124 **** # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the ! # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO --- 1131,1135 ---- # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the ! # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO *************** *** 1191,1195 **** # a tag file that is based on the input files it reads. ! GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed --- 1202,1206 ---- # a tag file that is based on the input files it reads. ! GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:33
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/future/widgets/headers/win32 Modified Files: metrics.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: metrics.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/win32/metrics.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** metrics.hpp 3 Feb 2006 18:33:36 -0000 1.2 --- metrics.hpp 23 Feb 2006 23:28:55 -0000 1.3 *************** *** 77,80 **** --- 77,82 ---- // virtual bool get_font_metrics(int widget_type, TEXTMETRIC& out_metrics) const = 0; + + static const RECT kBigExtents; // /// Get the extents for the given text string, to be contained in the *************** *** 88,92 **** /// if the metrics could not be returned. // ! virtual bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents) const = 0; // /// Get the specified measurement for the given widget when in the --- 90,94 ---- /// if the metrics could not be returned. // ! virtual bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents, const RECT* in_extents=NULL) const = 0; // /// Get the specified measurement for the given widget when in the *************** *** 158,162 **** /// Before any of the other functions can be called, the theme data must be /// loaded from the window. This function should also be called any time the ! /// window recieves a WM_THEMECHANGED message. /// /// \param window the window to get the theme from. Note that it is not --- 160,165 ---- /// Before any of the other functions can be called, the theme data must be /// loaded from the window. This function should also be called any time the ! /// window recieves a WM_THEMECHANGED message. Alternatively, set_theme_name ! /// can be used. /// /// \param window the window to get the theme from. Note that it is not *************** *** 168,171 **** --- 171,181 ---- // virtual bool set_window(HWND window) = 0; + // + /// Before any of the other functions can be called, the theme name must be set. + /// Alternatively, set_window can be used. + /// + /// \param the name of the theme to use. + // + virtual void set_theme_name(const WCHAR* theme_name) = 0; virtual ~metrics_t() { } Index: ui_core_implementation.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/win32/ui_core_implementation.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ui_core_implementation.hpp 3 Feb 2006 18:33:36 -0000 1.3 --- ui_core_implementation.hpp 23 Feb 2006 23:28:55 -0000 1.4 *************** *** 19,22 **** --- 19,24 ---- #include "ui_core.hpp" #include "event_dispatcher.hpp" + #include "label_t.hpp" + #include "label_t_impl.hpp" #include <adobe/future/memory.hpp> *************** *** 44,47 **** --- 46,61 ---- /****************************************************************************************************/ + // + /// \return the invisible window used as the initial parent for all controls. + HWND invisible_parent(); + void set_font(HWND window, int uxtheme_type, const WCHAR* theme_name=NULL); + #if !defined(ADOBE_NO_DOCUMENTATION) + namespace implementation { + std::string get_window_title(HWND window); + void get_control_bounds(HWND control, RECT& bounds); + void set_control_bounds(HWND control, const RECT& bounds); + } + #endif + struct control_t : boost::equality_comparable<control_t> { *************** *** 56,60 **** void set_bounds(const point_2d_t& position, const extents_t& geometry); void set_name(const std::string& name); ! virtual void set_theme(theme_t theme); void adorn_theme(theme_t theme); void unadorn_theme(theme_t theme); --- 70,74 ---- void set_bounds(const point_2d_t& position, const extents_t& geometry); void set_name(const std::string& name); ! virtual void set_theme(theme_t theme); void adorn_theme(theme_t theme); void unadorn_theme(theme_t theme); *************** *** 93,99 **** extents_t geometry_m; // saving set_bounds param for essentials point_2d_t position_m; // saving set_bounds param for widget framing ! int uxtheme_type_m; ! static HWND invisible_parent_m; // an invisible window used as the initial parent for all controls. ! event_dispatcher::reference event_dispatcher_m; // ref. to singleton event dispatcher. HMENU child_id_m; // this control_m's child id. }; --- 107,112 ---- extents_t geometry_m; // saving set_bounds param for essentials point_2d_t position_m; // saving set_bounds param for widget framing ! int uxtheme_type_m; ! event_dispatcher::reference event_dispatcher_m; // ref. to singleton event dispatcher. HMENU child_id_m; // this control_m's child id. }; *************** *** 332,335 **** --- 345,349 ---- void initialize(const RECT& bounds); void set_bounds(const point_2d_t& position, const extents_t& geometry); + void set_theme(theme_t); void set_value(bool value); void set_visible(bool make_visible); *************** *** 389,412 **** }; - /****************************************************************************************************/ - - struct static_text_t::implementation_t : control_t - { - typedef control_t _super; - - implementation_t(); - implementation_t(const implementation_t& rhs); - - void initialize(const RECT& bounds, const std::string& name); - long best_height_given_width(long width); - void set_name(const std::string& name); - void signal_hit(const implementation::static_text_hit_proc_t& proc); - - ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::static_text_t::implementation_t); - - virtual dictionary_t essentials() const; - - implementation::static_text_hit_proc_t hit_proc_m; - }; /****************************************************************************************************/ --- 403,406 ---- *************** *** 427,442 **** long cols, long rows); ! static_text_t& get_label(); ! virtual extents_t best_bounds(); ! void set_bounds(const point_2d_t& position, const extents_t& geometry); ! void set_active(bool active); ! virtual void set_theme(theme_t theme); ! void set_name(const std::string& text); ! void set_field_text(const std::string& text); ! void set_static_disabled(bool is_static_disabled); ! void set_selection(long start_char, long end_char); ! void signal_pre_edit(const implementation::edit_text_pre_edit_proc_t& proc); ! void signal_post_edit(const implementation::edit_text_post_edit_proc_t& proc); ! void signal_label_hit(const implementation::edit_text_label_hit_proc_t& proc); // /// Recalculate the style which should be given as the Window style --- 421,436 ---- long cols, long rows); ! label_t& get_label(); ! virtual extents_t best_bounds(); ! void set_bounds(const point_2d_t& position, const extents_t& geometry); ! void set_active(bool active); ! virtual void set_theme(theme_t theme); ! void set_name(const std::string& text); ! void set_field_text(const std::string& text); ! void set_static_disabled(bool is_static_disabled); ! void set_selection(long start_char, long end_char); ! void signal_pre_edit(const implementation::edit_text_pre_edit_proc_t& proc); ! void signal_post_edit(const implementation::edit_text_post_edit_proc_t& proc); ! void signal_label_hit(const implementation::edit_text_label_hit_proc_t& proc); // /// Recalculate the style which should be given as the Window style *************** *** 445,450 **** /// \return the window style which should be applied to control_m. // ! long get_window_style() const; ! virtual LRESULT event(UINT msg, WPARAM wParam, LPARAM lParam); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::edit_text_t::implementation_t); --- 439,444 ---- /// \return the window style which should be applied to control_m. // ! long get_window_style() const; ! virtual LRESULT event(UINT msg, WPARAM wParam, LPARAM lParam); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::edit_text_t::implementation_t); *************** *** 452,458 **** virtual dictionary_t essentials() const; ! static_text_t name_m; ! std::wstring field_text_m; ! static_text_t static_disabled_text_m; //HWND scroll_control_m; bool static_disabled_m; --- 446,452 ---- virtual dictionary_t essentials() const; ! label_t name_m; ! std::wstring field_text_m; ! label_t static_disabled_text_m; //HWND scroll_control_m; bool static_disabled_m; *************** *** 483,487 **** void initialize(const RECT& bounds, const std::string& name); ! static_text_t& get_label(); virtual extents_t best_bounds(); void set_bounds(const point_2d_t& position, const extents_t& geometry); --- 477,481 ---- void initialize(const RECT& bounds, const std::string& name); ! label_t& get_label(); virtual extents_t best_bounds(); void set_bounds(const point_2d_t& position, const extents_t& geometry); *************** *** 501,506 **** virtual dictionary_t essentials() const; ! static_text_t name_m; ! static_text_t static_disabled_text_m; bool static_disabled_m; long static_baseline_m; --- 495,500 ---- virtual dictionary_t essentials() const; ! label_t name_m; ! label_t static_disabled_text_m; bool static_disabled_m; long static_baseline_m; *************** *** 544,547 **** --- 538,542 ---- popup_t popup_m; bool using_popup_m; + long popup_width_m; long popup_height_m; long popup_baseline_m; *************** *** 592,596 **** 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); --- 587,590 ---- --- 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_LABEL_T_IMPL_HPP #define ADOBE_LABEL_T_IMPL_HPP /****************************************************************************************************/ #include <windows.h> #include "ui_core.hpp" #include "label_t.hpp" #include <adobe/future/memory.hpp> #include <boost/operators.hpp> #include <string> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ template <> struct delete_ptr<HWND> { void operator()(HWND x) const { ::DestroyWindow(x); }; }; typedef adobe::auto_resource<HWND> auto_hwnd_t; /****************************************************************************************************/ struct label_t::implementation_t : boost::equality_comparable<label_t::implementation_t> { implementation_t(const std::string& name, std::size_t characters, theme_t theme); #if !defined(ADOBE_NO_DOCUMENTATION) implementation_t(const implementation_t& rhs); implementation_t& operator=(const implementation_t& rhs); ~implementation_t(); #endif void initialize(const RECT& bounds, const std::string& name); 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); void enable(bool make_enabled); friend bool operator== (const adobe::label_t& x, const adobe::label_t& y); #if !defined(ADOBE_NO_DOCUMENTATION) struct implementation_t; private: implementation_t* object_m; public: implementation_t& implementation(); const implementation_t& implementation() const; #endif inline friend bool operator==(const adobe::label_t::implementation_t& x, const adobe::label_t::implementation_t& y) { return &x == &y; } auto_hwnd_t window_m; theme_t theme_m; WNDPROC default_window_proc_m; RECT bounds_m; std::string name_m; std::size_t characters_m; }; /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:33
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/test/begin Modified Files: Jamfile.v2 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: Jamfile.v2 =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/Jamfile.v2,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Jamfile.v2 3 Feb 2006 18:33:38 -0000 1.6 --- Jamfile.v2 23 Feb 2006 23:28:56 -0000 1.7 *************** *** 7,11 **** HEADER_DIRECTORY = headers ; - switch [ os.name ] { --- 7,10 ---- *************** *** 95,99 **** # PLATFORM_EXTRAS = ! ; } } --- 94,98 ---- # PLATFORM_EXTRAS = ! ; } } *************** *** 106,112 **** ; EXE_SOURCES = ! $(SOURCE_DIRECTORY)/express_viewer.cpp ! $(SOURCE_DIRECTORY)/report_exception.cpp $(SOURCE_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME)/main.cpp ; --- 105,116 ---- ; + COMMON_SOURCES = + express_viewer + report_exception + file + ; + EXE_SOURCES = ! $(SOURCE_DIRECTORY)/$(COMMON_SOURCES).cpp $(SOURCE_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME)/main.cpp ; |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:32
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/gil/core Modified Files: algorithm.hpp cmyk.hpp gil_concept.hpp gil_config.hpp image.hpp lab.hpp pixel_iterator.hpp rgb.hpp rgba.hpp typedefs.hpp utilities.hpp variant.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: image.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/image.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** image.hpp 3 Feb 2006 18:33:37 -0000 1.3 --- image.hpp 23 Feb 2006 23:28:56 -0000 1.4 *************** *** 275,279 **** void create_with_own_data_(const point_type& dimensions, unsigned int alignment, is_planar<false>) { ! std::size_t rowsize_in_bytes=get_aligned(dimensions.x*sizeof(typename V::value_type),alignment); unsigned char* tmp=_alloc.allocate(rowsize_in_bytes*dimensions.y); try { --- 275,279 ---- void create_with_own_data_(const point_type& dimensions, unsigned int alignment, is_planar<false>) { ! std::size_t rowsize_in_bytes=align(dimensions.x*sizeof(typename V::value_type),alignment); unsigned char* tmp=_alloc.allocate(rowsize_in_bytes*dimensions.y); try { *************** *** 285,289 **** } void create_with_own_data_(const point_type& dimensions, unsigned int alignment, is_planar<true>) { ! std::size_t planesize_in_bytes=get_aligned(dimensions.x*dimensions.y*sizeof(typename V::channel_type),alignment); std::size_t image_size_in_bytes=planesize_in_bytes*V::color_space_type::num_channels; unsigned char* tmp=_alloc.allocate(image_size_in_bytes); --- 285,289 ---- } void create_with_own_data_(const point_type& dimensions, unsigned int alignment, is_planar<true>) { ! std::size_t planesize_in_bytes=align(dimensions.x*dimensions.y*sizeof(typename V::channel_type),alignment); std::size_t image_size_in_bytes=planesize_in_bytes*V::color_space_type::num_channels; unsigned char* tmp=_alloc.allocate(image_size_in_bytes); *************** *** 300,304 **** template <typename V1,typename V2> bool operator==(const image<V1>& im1,const image<V2>& im2) { ! if (&im1==&im2) return true; if (const_view(im1).dimensions()!=const_view(im2).dimensions()) return false; return std::equal(const_view(im1).begin(),const_view(im1).end(),const_view(im2).begin()); // TODO: change this to equal_pixels (for performance) --- 300,304 ---- template <typename V1,typename V2> bool operator==(const image<V1>& im1,const image<V2>& im2) { ! if ((void*)(&im1)==(void*)(&im2)) return true; if (const_view(im1).dimensions()!=const_view(im2).dimensions()) return false; return std::equal(const_view(im1).begin(),const_view(im1).end(),const_view(im2).begin()); // TODO: change this to equal_pixels (for performance) Index: cmyk.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/cmyk.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cmyk.hpp 3 Feb 2006 18:33:37 -0000 1.2 --- cmyk.hpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 96,101 **** planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step), (T*)(data+step*3)) {} ! planar_ptr(const planar_ptr& ptr) : parent_type(ptr) {} ! planar_ptr& operator=(const planar_ptr& ptr) { this->p=ptr.p; return *this; } /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. --- 96,101 ---- planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step), (T*)(data+step*3)) {} ! template <typename T1,typename C1> planar_ptr(const planar_ptr<T1,C1>& ptr) : parent_type(ptr) {} ! template <typename T1,typename C1> planar_ptr& operator=(const planar_ptr<T1,C1>& ptr) { this->p=ptr.p; return *this; } /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. Index: algorithm.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/algorithm.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** algorithm.hpp 3 Feb 2006 18:33:37 -0000 1.3 --- algorithm.hpp 23 Feb 2006 23:28:56 -0000 1.4 *************** *** 12,15 **** --- 12,16 ---- #include "gil_config.hpp" #include "gil_concept.hpp" + #include <boost/bind.hpp> #include <cassert> #include <algorithm> *************** *** 82,86 **** while (n>0) { ptrdiff_t numToCopy=std::min<const ptrdiff_t>(n, src.width()-src.x()); ! copy_n(src.x_it(), numToCopy, dst); dst+=numToCopy; src+=numToCopy; --- 83,87 ---- while (n>0) { ptrdiff_t numToCopy=std::min<const ptrdiff_t>(n, src.width()-src.x()); ! adobe::copy_n(src.x_it(), numToCopy, dst); dst+=numToCopy; src+=numToCopy; *************** *** 99,103 **** while (n>0) { ptrdiff_t numToCopy=std::min<const ptrdiff_t>(n,dst.width()-dst.x()); ! copy_n(src, numToCopy, dst.x_it()); dst+=numToCopy; src+=numToCopy; --- 100,104 ---- while (n>0) { ptrdiff_t numToCopy=std::min<const ptrdiff_t>(n,dst.width()-dst.x()); ! adobe::copy_n(src, numToCopy, dst.x_it()); dst+=numToCopy; src+=numToCopy; *************** *** 121,125 **** while (n>0) { ptrdiff_t numToCopy=std::min<const ptrdiff_t>(n,dst.width()-dst.x()); ! copy_n(src.x_it(), numToCopy, dst.x_it()); dst+=numToCopy; src+=numToCopy; --- 122,126 ---- while (n>0) { ptrdiff_t numToCopy=std::min<const ptrdiff_t>(n,dst.width()-dst.x()); ! adobe::copy_n(src.x_it(), numToCopy, dst.x_it()); dst+=numToCopy; src+=numToCopy; *************** *** 221,225 **** typename V2> // Model image view void copy_pixels(const variant<C1>& src, const V2& dst) { ! src.apply_visitor(GIL::bind2nd(GIL::detail::copy_pixels_fn(), dst)); } --- 222,226 ---- typename V2> // Model image view void copy_pixels(const variant<C1>& src, const V2& dst) { ! src.apply_visitor(boost::bind(GIL::detail::copy_pixels_fn(), _1, dst)); } *************** *** 227,231 **** typename C2> // Model non-const image view concept space void copy_pixels(const V1& src, const variant<C2>& dst) { ! dst.apply_visitor(GIL::bind1st(GIL::detail::copy_pixels_fn(), src)); } --- 228,232 ---- typename C2> // Model non-const image view concept space void copy_pixels(const V1& src, const variant<C2>& dst) { ! dst.apply_visitor(boost::bind(GIL::detail::copy_pixels_fn(), src, _2)); } *************** *** 272,276 **** typename V2> // Model image view void copy_and_convert_pixels(const variant<C1>& src, const V2& dst) { ! src.apply_visitor(GIL::bind2nd(detail::copy_and_convert_pixels_fn(), dst)); } --- 273,277 ---- typename V2> // Model image view void copy_and_convert_pixels(const variant<C1>& src, const V2& dst) { ! src.apply_visitor(boost::bind(detail::copy_and_convert_pixels_fn(), _1, dst)); } *************** *** 278,282 **** typename C2> // Model non-const image view concept space void copy_and_convert_pixels(const V1& src, const variant<C2>& dst) { ! dst.apply_visitor(GIL::bind1st(detail::copy_and_convert_pixels_fn(), src)); } --- 279,283 ---- typename C2> // Model non-const image view concept space void copy_and_convert_pixels(const V1& src, const variant<C2>& dst) { ! dst.apply_visitor(boost::bind(detail::copy_and_convert_pixels_fn(), src, _2)); } Index: gil_config.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/gil_config.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gil_config.hpp 3 Feb 2006 18:33:37 -0000 1.2 --- gil_config.hpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 10,23 **** #define GIL_CONFIG_H ! #ifdef NO_ASL ! #define GIL gil ! #define ADOBE_GIL_NAMESPACE_BEGIN namespace GIL { ! #define ADOBE_GIL_NAMESPACE_END } ! #else #include <adobe/config.hpp> #define GIL adobe::gil #define ADOBE_GIL_NAMESPACE_BEGIN namespace adobe { namespace gil { #define ADOBE_GIL_NAMESPACE_END } } #endif #endif --- 10,200 ---- #define GIL_CONFIG_H ! //////////////////////////////////////////////////////////////////////////////////////// ! /// \file ! /// \brief GIL configuration file ! /// \author Lubomir Bourdev and Hailin Jin \n ! /// Adobe Systems Incorporated ! /// ! /// This file provides the glue for using GIL independently of ASL. ! /// ! //////////////////////////////////////////////////////////////////////////////////////// ! ! #ifndef NO_ASL ! #include <adobe/config.hpp> #define GIL adobe::gil #define ADOBE_GIL_NAMESPACE_BEGIN namespace adobe { namespace gil { #define ADOBE_GIL_NAMESPACE_END } } + + #include <adobe/functional.hpp> + #include <adobe/algorithm/copy.hpp> + #include <adobe/iterator.hpp> + + #else + + #define GIL gil + #define ADOBE_GIL_NAMESPACE_BEGIN namespace GIL { + #define ADOBE_GIL_NAMESPACE_END } + + #include <functional> + #include <boost/iterator/iterator_adaptor.hpp> + + namespace adobe { + + #if !defined(ADOBE_NO_DOCUMENTATION) + namespace fn { } + using namespace fn; + namespace fn { #endif + //////////////////////////////////////////////////////////////////////////////////////// + /// + /// \brief copy_n taken from SGI STL. + /// + //////////////////////////////////////////////////////////////////////////////////////// + + namespace detail { + template <class InputIter, class Size, class OutputIter> + std::pair<InputIter, OutputIter> _copy_n(InputIter first, Size count, + OutputIter result, + std::input_iterator_tag) { + for ( ; count > 0; --count) { + *result = *first; + ++first; + ++result; + } + return std::pair<InputIter, OutputIter>(first, result); + } + + template <class RAIter, class Size, class OutputIter> + inline std::pair<RAIter, OutputIter> + _copy_n(RAIter first, Size count, OutputIter result, std::random_access_iterator_tag) { + RAIter last = first + count; + return std::pair<RAIter, OutputIter>(last, std::copy(first, last, result)); + } + + template <class InputIter, class Size, class OutputIter> + inline std::pair<InputIter, OutputIter> + _copy_n(InputIter first, Size count, OutputIter result) { + return _copy_n(first, count, result, typename std::iterator_traits<InputIter>::iterator_category()); + } + } + + template <class InputIter, class Size, class OutputIter> + inline std::pair<InputIter, OutputIter> + copy_n(InputIter first, Size count, OutputIter result) { + return detail::_copy_n(first, count, result); + } + + //////////////////////////////////////////////////////////////////////////////////////// + /// + // STEP ITERATOR ADAPTOR + /// \brief step iterator adaptor + /// + /// An adaptor over an existing iterator that changes the step unit + /// (i.e. distance(it,it+1)) by a given predicate. Instead of calling base's + /// operators ++, --, +=, -=, etc. the adaptor is using the passed policy object S_FN + /// for advancing and for computing the distance between iterators. + /// + //////////////////////////////////////////////////////////////////////////////////////// + + template <typename DERIVED, // type of the derived class + typename IT, // Models Iterator + typename S_FN> // A policy object that can compute the distance between two iterators of type IT + // and can advance an iterator of type IT a given number of IT's units + class step_iterator_adaptor : public boost::iterator_adaptor<DERIVED, IT, boost::use_default, boost::use_default, boost::use_default, typename S_FN::difference_type> { + public: + typedef boost::iterator_adaptor<DERIVED, IT, boost::use_default, boost::use_default, boost::use_default, typename S_FN::difference_type> parent_type; + typedef typename std::iterator_traits<IT>::difference_type base_difference_type; + typedef typename S_FN::difference_type difference_type; + typedef typename std::iterator_traits<IT>::reference reference; + + step_iterator_adaptor() {} + step_iterator_adaptor(const IT& it, S_FN step_fn=S_FN()) : parent_type(it), _step_fn(step_fn) {} + + difference_type step() const { return _step_fn.step(); } + + protected: + S_FN _step_fn; + private: + friend class boost::iterator_core_access; + + void increment() { _step_fn.advance(this->base_reference(),1); } + void decrement() { _step_fn.advance(this->base_reference(),-1); } + void advance(base_difference_type d) { _step_fn.advance(this->base_reference(),d); } + difference_type distance_to(const step_iterator_adaptor& it) const { return _step_fn.difference(this->base_reference(),it.base_reference()); } + }; + + // although boost::iterator_adaptor defines these, the default implementation computes distance and compares for zero. + // it is often faster to just apply the relation operator to the base + template <typename D,typename IT,typename S_FN> inline + bool operator>(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) { + return p1.step()>0 ? p1.base()> p2.base() : p1.base()< p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator<(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) { + return p1.step()>0 ? p1.base()< p2.base() : p1.base()> p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator>=(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) { + return p1.step()>0 ? p1.base()>=p2.base() : p1.base()<=p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator<=(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) { + return p1.step()>0 ? p1.base()<=p2.base() : p1.base()>=p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator==(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) { + return p1.base()==p2.base(); + } + + template <typename D,typename IT,typename S_FN> inline + bool operator!=(const step_iterator_adaptor<D,IT,S_FN>& p1, const step_iterator_adaptor<D,IT,S_FN>& p2) { + return p1.base()!=p2.base(); + } + + /*************************************************************************************************/ + + /// \brief plus function object whose arguments may be of different type. + template <typename T1, typename T2> + struct plus_asymmetric : public std::binary_function<T1,T2,T1> + { + T1 operator()(T1 f1, T2 f2) const { + return f1+f2; + } + }; + + /*************************************************************************************************/ + + /// \brief operator++ wrapped in a function object + template <typename T> + struct inc : public std::unary_function<T,T> + { + T operator()(T x) const { return ++x; } + }; + + /*************************************************************************************************/ + + /// \brief operator-- wrapped in a function object + template <typename T> + struct dec : public std::unary_function<T,T> + { + T operator()(T x) const { return --x; } + }; + + + #if !defined(ADOBE_NO_DOCUMENTATION) + } // namespace fn + #endif + + } // namespace adobe + + /*************************************************************************************************/ + + #endif // NO_ASL + #endif Index: variant.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/variant.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** variant.hpp 3 Feb 2006 18:33:37 -0000 1.2 --- variant.hpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- #include "color_convert.hpp" #include "typedefs.hpp" + #include <boost\bind.hpp> ADOBE_GIL_NAMESPACE_BEGIN *************** *** 144,152 **** template <typename T> result_type operator()(const T& t2) { ! return _v1.apply_visitor(gil::bind2nd(_op, t2)); } template <typename T> result_type operator()(T& t2) { ! return _v1.apply_visitor(gil::bind2nd(_op, t2)); } }; --- 145,153 ---- template <typename T> result_type operator()(const T& t2) { ! return _v1.apply_visitor(boost::bind(_op, _1, t2)); } template <typename T> result_type operator()(T& t2) { ! return _v1.apply_visitor(boost::bind(_op, _1, t2)); } }; *************** *** 168,174 **** //#endif template <typename C> inline bool operator==(const variant<C>& x, const variant<C>& y) { ! return x._id==y._id && apply_visitor(x,y,equal_to()); } template <typename C> --- 169,198 ---- //#endif + + namespace detail { + template <bool COMPATIBLE> struct equal_to_fn1 { + template <typename X, typename Y> static bool apply(const X& x, const Y& y) { return x==y; } + }; + + // == invoked on incompatible images or image views + template <> struct equal_to_fn1<false> { + template <typename X, typename Y> static bool apply(const X&, const Y&) { return false; } + }; + + // X and Y must have value_type member typedef that models PixelConcept and operator== that takes type with compatible pixel + // (X and Y are compatible images or image views) + struct equal_to_fn { + typedef bool result_type; + template <typename X, typename Y> result_type operator()(const X& x, const Y& y) const { + return equal_to_fn1<are_pixels_compatible<typename X::value_type, typename Y::value_type>::value>::apply(x,y); + } + }; + } + + // REVISIT: variant's operator== currently works only over images and image views (since it uses are_pixels_compatible on T::value_type). + // Consider extending it to arbitrary concept spaces. template <typename C> inline bool operator==(const variant<C>& x, const variant<C>& y) { ! return x._id==y._id && apply_visitor(x,y,detail::equal_to_fn()); } template <typename C> Index: rgba.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/rgba.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rgba.hpp 3 Feb 2006 18:33:37 -0000 1.2 --- rgba.hpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 93,99 **** /// from raw data planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step), (T*)(data+step*3)) {} ! ! planar_ptr(const planar_ptr& ptr) : parent_type(ptr) {} ! planar_ptr& operator=(const planar_ptr& ptr) { this->p=ptr.p; return *this; } /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. --- 93,99 ---- /// from raw data planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step), (T*)(data+step*3)) {} ! ! template <typename T1,typename C1> planar_ptr(const planar_ptr<T1,C1>& ptr) : parent_type(ptr) {} ! template <typename T1,typename C1> planar_ptr& operator=(const planar_ptr<T1,C1>& ptr) { this->p=ptr.p; return *this; } /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. Index: lab.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/lab.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lab.hpp 3 Feb 2006 18:33:37 -0000 1.2 --- lab.hpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 90,95 **** planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step)) {} ! planar_ptr(const planar_ptr& ptr) : parent_type(ptr) {} ! planar_ptr& operator=(const planar_ptr& ptr) { this->p=ptr.p; return *this; } /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. --- 90,95 ---- planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step)) {} ! template <typename T1,typename C1> planar_ptr(const planar_ptr<T1,C1>& ptr) : parent_type(ptr) {} ! template <typename T1,typename C1> planar_ptr& operator=(const planar_ptr<T1,C1>& ptr) { this->p=ptr.p; return *this; } /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. Index: rgb.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/rgb.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rgb.hpp 3 Feb 2006 18:33:37 -0000 1.2 --- rgb.hpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 123,128 **** planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step)) {} ! planar_ptr(const planar_ptr& ptr) : parent_type(ptr) {} ! planar_ptr& operator=(const planar_ptr& ptr) { this->p=ptr.p; return *this; } /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. --- 123,128 ---- planar_ptr(unsigned char* data, ptrdiff_t step=1) : parent_type((T*)data, (T*)(data+step), (T*)(data+step+step)) {} ! template <typename T1,typename C1> planar_ptr(const planar_ptr<T1,C1>& ptr) : parent_type(ptr) {} ! template <typename T1,typename C1> planar_ptr& operator=(const planar_ptr<T1,C1>& ptr) { this->p=ptr.p; return *this; } /// Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. Index: pixel_iterator.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/pixel_iterator.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pixel_iterator.hpp 3 Feb 2006 18:33:37 -0000 1.3 --- pixel_iterator.hpp 23 Feb 2006 23:28:56 -0000 1.4 *************** *** 28,31 **** --- 28,69 ---- //////////////////////////////////////////////////////////////////////////////////////// + /// \addtogroup Iterators + /// + /// Immutable interleaved pixel iterator + /// + /// MODELS: PixelIteratorAdaptorConcept + /// + /// Normally pixel iterator classes can model both mutable and immutable iterators, + /// depending on whether they are instantiated with mutable or immutable value types. + /// The only exception is interleaved pixel iterator, which is not a class but a raw C pointer. + /// The mutable interleaved pixel iterator is "pixel<T,CS>*" + /// The immutable equivalent would be "pixel<const T,CS>*". This _almost_ works. The only problem + /// is that there is no automatic conversion from pixel<T,CS>* to pixel<const T,CS>*. Providing such + /// conversion forces us to wrap the immutable pixel iterator into the adaptor class below + /// + //////////////////////////////////////////////////////////////////////////////////////// + + template <typename T, typename C> // Models Pixel Iterator + struct const_interleaved_pixel_iterator : public boost::iterator_adaptor<const_interleaved_pixel_iterator<T,C>, pixel<typename channel_traits<T>::const_value_type,C>*> { + typedef boost::iterator_adaptor<const_interleaved_pixel_iterator<T,C>, pixel<typename channel_traits<T>::const_value_type,C>*> parent_type; + typedef pixel<typename channel_traits<T>::const_value_type,C>* base_type; + typedef pixel<typename channel_traits<T>::value_type,C>* mutable_type; + typedef typename parent_type::difference_type difference_type; + typedef typename parent_type::reference reference; + + const_interleaved_pixel_iterator() {} + const_interleaved_pixel_iterator(const const_interleaved_pixel_iterator& it) : parent_type(it) {} + const_interleaved_pixel_iterator(base_type it) : parent_type(it) {} + const_interleaved_pixel_iterator(mutable_type it) : parent_type(reinterpret_cast<base_type>(it)) {} // constructing immutable from mutable + + /// For some reason operator[] provided by boost::iterator_facade returns a custom class that is convertible to reference + /// We require our own reference because it is registered in iterator_traits + reference operator[](difference_type d) const { return *(*this+d);} + + base_type& base() { return this->base_reference(); } + const base_type& base() const { return this->base_reference(); } + }; + + //////////////////////////////////////////////////////////////////////////////////////// /// \addtogroup PlanarPtr /// *************** *** 69,75 **** friend class boost::iterator_core_access; ! void increment() { per_channel_set_op(inc<T*>(),p,p); } ! void decrement() { per_channel_set_op(dec<T*>(),p,p); } ! void advance(ptrdiff_t d) { per_channel_set_op(std::bind2nd(plus<T*,ptrdiff_t>(),d),p,p); } ptrdiff_t distance_to(const planar_ptr_base& it) const { return it.p[0]-p[0]; } --- 107,113 ---- friend class boost::iterator_core_access; ! void increment() { per_channel_set_op(adobe::inc<T*>(),p,p); } ! void decrement() { per_channel_set_op(adobe::dec<T*>(),p,p); } ! void advance(ptrdiff_t d) { per_channel_set_op(std::bind2nd(adobe::plus_asymmetric<T*,ptrdiff_t>(),d),p,p); } ptrdiff_t distance_to(const planar_ptr_base& it) const { return it.p[0]-p[0]; } *************** *** 96,99 **** --- 134,141 ---- ///@ingroup byte_step template <typename T, typename C> + inline ptrdiff_t byte_step(const const_interleaved_pixel_iterator<T,C>& p) { return sizeof(pixel<T,C>); } + + ///@ingroup byte_step + template <typename T, typename C> inline ptrdiff_t byte_step(const planar_ptr<T,C>&) { return sizeof(T); } *************** *** 111,114 **** --- 153,162 ---- /// @ingroup byte_distance template <typename T, typename C> + inline ptrdiff_t byte_distance(const const_interleaved_pixel_iterator<T,C>& p1, const const_interleaved_pixel_iterator<T,C>& p2) { + return byte_distance(p1.base(), p2.base()); + } + + /// @ingroup byte_distance + template <typename T, typename C> inline ptrdiff_t byte_distance(const planar_ptr<T,C>& p1, const planar_ptr<T,C>& p2) { return byte_distance(p1.p[0],p2.p[0]); *************** *** 128,131 **** --- 176,185 ---- /// @ingroup byte_advance + template <typename T, typename C> + inline void byte_advance(const_interleaved_pixel_iterator<T,C> &p, ptrdiff_t byteDiff) { + byte_advance(p.base(), byteDiff); + } + + /// @ingroup byte_advance template <typename P> struct byte_advance_fn { *************** *** 154,157 **** --- 208,217 ---- /// @ingroup byte_advanced template <typename T, typename C> + inline const_interleaved_pixel_iterator<T,C> byte_advanced(const const_interleaved_pixel_iterator<T,C>& p, ptrdiff_t byteDiff) { + return const_interleaved_pixel_iterator<T,C>(byte_advanced(p.base(),byteDiff)); + } + + /// @ingroup byte_advanced + template <typename T, typename C> inline planar_ptr<T,C> byte_advanced(const planar_ptr<T,C>& p, ptrdiff_t byteDiff) { planar_ptr<T,C> ret=p; *************** *** 173,176 **** --- 233,242 ---- } + ///@ingroup byte_advanced_ref + template <typename T, typename C> + inline pixel<typename channel_traits<T>::const_value_type,C>& byte_advanced_ref(const const_interleaved_pixel_iterator<T,C>& p, ptrdiff_t byteDiff) { + return *byte_advanced(p.base(),byteDiff); + } + template <typename I> class pixel_step_iterator; *************** *** 216,224 **** template <typename IT> ! class pixel_step_iterator : public step_iterator_adaptor<pixel_step_iterator<IT>, IT, byte_step_fn<IT> > { GIL_CLASS_REQUIRE(IT, GIL, ByteAdvancableIteratorConcept); GIL_CLASS_REQUIRE(IT, GIL, PixelIteratorConcept); public: ! typedef step_iterator_adaptor<pixel_step_iterator<IT>, IT, byte_step_fn<IT> > parent_type; typedef typename parent_type::reference reference; typedef typename parent_type::difference_type difference_type; --- 282,290 ---- template <typename IT> ! class pixel_step_iterator : public adobe::step_iterator_adaptor<pixel_step_iterator<IT>, IT, byte_step_fn<IT> > { GIL_CLASS_REQUIRE(IT, GIL, ByteAdvancableIteratorConcept); GIL_CLASS_REQUIRE(IT, GIL, PixelIteratorConcept); public: ! typedef adobe::step_iterator_adaptor<pixel_step_iterator<IT>, IT, byte_step_fn<IT> > parent_type; typedef typename parent_type::reference reference; typedef typename parent_type::difference_type difference_type; *************** *** 472,477 **** --- 538,545 ---- pixel_image_iterator(const LOC2& p, int width, int x=0) : _x(x), _width(width), _p(p) {} pixel_image_iterator(const pixel_image_iterator& pit) : _x(pit._x), _width(pit._width), _p(pit._p) {} + template <typename LOC> pixel_image_iterator(const pixel_image_iterator<LOC>& pit) : _x(pit._x), _width(pit._width), _p(pit._p) {} private: + template <typename LOC> friend class pixel_image_iterator; friend class boost::iterator_core_access; reference dereference() const { return *_p; } *************** *** 547,551 **** dereference_iterator_adaptor() {} dereference_iterator_adaptor(IT it, D_FN deref_fn=D_FN()) : parent_type(it), _deref_fn(deref_fn) {} ! /// For some reason operator[] provided by boost::iterator_facade returns a custom class that is convertible to reference /// We require our own reference because it is registered in iterator_traits --- 615,619 ---- dereference_iterator_adaptor() {} dereference_iterator_adaptor(IT it, D_FN deref_fn=D_FN()) : parent_type(it), _deref_fn(deref_fn) {} ! template <typename IT1, typename DFN1> dereference_iterator_adaptor(const dereference_iterator_adaptor<IT1,DFN1>& it) : parent_type(it.base()), _deref_fn(it._deref_fn) {} /// For some reason operator[] provided by boost::iterator_facade returns a custom class that is convertible to reference /// We require our own reference because it is registered in iterator_traits *************** *** 564,567 **** --- 632,636 ---- const IT& base() const { return this->base_reference(); } private: + template <typename IT1, typename DFN1> friend class dereference_iterator_adaptor; friend class boost::iterator_core_access; *************** *** 646,653 **** typedef value_type* pointer; typedef GIL::pixel_step_iterator<GIL::pixel<T,C>*> dynamic_step_type; ! typedef GIL::pixel<typename GIL::channel_traits<T>::const_value_type,C>* const_type; BOOST_STATIC_CONSTANT(bool, is_planar=false); }; /// \brief Planar pixels use special proxy classes for pointers and references template <typename T, typename C> --- 715,738 ---- typedef value_type* pointer; typedef GIL::pixel_step_iterator<GIL::pixel<T,C>*> dynamic_step_type; ! typedef GIL::const_interleaved_pixel_iterator<T,C> const_type; BOOST_STATIC_CONSTANT(bool, is_planar=false); }; + /// \brief Pterator over immutable interleaved pixels + template <typename T, typename C> + struct iterator_traits<GIL::const_interleaved_pixel_iterator<T,C> > : public iterator_traits_base<typename GIL::channel_traits<T>::const_value_type,C> { + typedef typename GIL::channel_traits<T>::const_value_type channel_type; + typedef GIL::pixel<channel_type,C> value_type; + typedef value_type& reference; + typedef reference const_reference; + typedef GIL::const_interleaved_pixel_iterator<T,C> pointer; + typedef GIL::pixel_step_iterator<value_type*> dynamic_step_type; + typedef pointer const_type; + BOOST_STATIC_CONSTANT(bool, is_planar=false); + BOOST_STATIC_CONSTANT(bool, is_base=false); + typedef value_type* base_type; + typedef dynamic_step_type dynamic_step_base_type; + }; + /// \brief Planar pixels use special proxy classes for pointers and references template <typename T, typename C> *************** *** 665,681 **** struct iterator_traits<GIL::pixel<T&,C>*> : public iterator_traits<GIL::planar_ptr<T,C> >{}; ! template <typename DERIVED,typename BASE,typename S_FN> ! struct iterator_traits<GIL::step_iterator_adaptor<DERIVED,BASE,S_FN> > : public iterator_traits<BASE> { ! typedef typename S_FN::difference_type difference_type; ! BOOST_STATIC_CONSTANT(bool, is_base=false); ! typedef BASE base_type; ! }; ! ! template <typename IT> ! struct iterator_traits<GIL::pixel_step_iterator<IT> > : public iterator_traits<typename GIL::pixel_step_iterator<IT>::parent_type> { ! typedef GIL::pixel_step_iterator<typename std::iterator_traits<IT>::const_type> const_type; BOOST_STATIC_CONSTANT(bool, is_base=false); typedef IT base_type; - typedef GIL::pixel_step_iterator<typename std::iterator_traits<IT>::dynamic_step_type> dynamic_step_base_type; }; --- 750,760 ---- struct iterator_traits<GIL::pixel<T&,C>*> : public iterator_traits<GIL::planar_ptr<T,C> >{}; ! template <typename IT> ! struct iterator_traits<GIL::pixel_step_iterator<IT> > : public iterator_traits<IT> { ! typedef GIL::pixel_step_iterator<typename std::iterator_traits<IT>::const_type> const_type; ! typedef typename GIL::pixel_step_iterator<IT>::difference_type difference_type; ! typedef GIL::pixel_step_iterator<typename std::iterator_traits<IT>::dynamic_step_type> dynamic_step_base_type; BOOST_STATIC_CONSTANT(bool, is_base=false); typedef IT base_type; }; *************** *** 691,702 **** typedef typename D_FN::value_type value_type; typedef typename D_FN::const_reference const_reference; ! typedef typename D_FN::pointer pointer; ! typedef typename D_FN::const_pointer const_type; ! typedef typename std::iterator_traits<pointer>::channel_type channel_type; ! typedef typename std::iterator_traits<pointer>::color_space_type color_space_type; BOOST_STATIC_CONSTANT(bool, is_base=false); BOOST_STATIC_CONSTANT(bool, pixel_data_is_real=false); typedef I base_type; ! typedef GIL::dereference_iterator_adaptor<typename iterator_traits<I>::dynamic_step_type,D_FN> dynamic_step_base_type; typedef dynamic_step_base_type dynamic_step_type; }; --- 770,781 ---- typedef typename D_FN::value_type value_type; typedef typename D_FN::const_reference const_reference; ! typedef typename GIL::dereference_iterator_adaptor<I,D_FN> pointer; ! typedef typename GIL::dereference_iterator_adaptor<typename std::iterator_traits<I>::const_type,D_FN> const_type; ! typedef typename value_type::channel_type channel_type; ! typedef typename value_type::color_space_type color_space_type; BOOST_STATIC_CONSTANT(bool, is_base=false); BOOST_STATIC_CONSTANT(bool, pixel_data_is_real=false); typedef I base_type; ! typedef GIL::dereference_iterator_adaptor<typename std::iterator_traits<I>::dynamic_step_type,D_FN> dynamic_step_base_type; typedef dynamic_step_base_type dynamic_step_type; }; Index: gil_concept.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/gil_concept.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gil_concept.hpp 3 Feb 2006 18:33:37 -0000 1.3 --- gil_concept.hpp 23 Feb 2006 23:28:56 -0000 1.4 *************** *** 366,369 **** --- 366,371 ---- typedef typename std::iterator_traits<IT>::const_type const_type; + const_type const_it(it); // immutable iterator must be constructible from (possibly mutable) iterator + static const bool ib=std::iterator_traits<IT>::is_base; boost::ignore_unused_variable_warning(ib); static const bool ip=std::iterator_traits<IT>::is_planar; boost::ignore_unused_variable_warning(ip); Index: utilities.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/utilities.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** utilities.hpp 3 Feb 2006 18:33:37 -0000 1.2 --- utilities.hpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 14,18 **** #include <cmath> #include <cstddef> - #include <boost/iterator/iterator_adaptor.hpp> //////////////////////////////////////////////////////////////////////////////////////// --- 14,17 ---- *************** *** 49,68 **** const point2& operator=(const point2& p) { x=p.x; y=p.y; return *this; } - bool operator==(const point2& p) const { return (p.x==x && p.y==y); } - bool operator!=(const point2& p) const { return p.x!=x || p.y!=y; } ! point2 operator+(const point2& p) const { return point2(x+p.x,y+p.y);} ! point2 operator-(const point2& p) const { return point2(x-p.x,y-p.y);} ! T operator*(const point2& p) const { return x*p.x + y*p.y; } ! point2<double> operator*(double t) const { return point2<double>(x*t,y*t); } ! point2 operator*(int t) const { return point2(x*t,y*t); } ! point2<double> operator/(double t) const { return t==0 ? point2<double>(0,0):point2<double>(x/t,y/t); } ! template <typename T1> point2<double> operator/(const point2<T1>& p) const { return point2<double>(x/(double)p.x,y/(double)p.y); } ! point2 operator<<(int shift) const { return point2(x<<shift,y<<shift); } ! point2 operator>>(int shift) const { return point2(x>>shift,y>>shift); } const point2& operator+=(const point2& p) { x+=p.x; y+=p.y; return *this; } const point2& operator-=(const point2& p) { x-=p.x; y-=p.y; return *this; } const point2& operator/=(double t) { x/=t; y/=t; return *this; } ! const point2 operator-() const { return point2<T>(-x,-y); } const T& operator[](std::size_t i) const { return (reinterpret_cast<const T*>(&x))[i]; } --- 48,58 ---- const point2& operator=(const point2& p) { x=p.x; y=p.y; return *this; } ! point2 operator<<(int shift) const { return point2(x<<shift,y<<shift); } ! point2 operator>>(int shift) const { return point2(x>>shift,y>>shift); } const point2& operator+=(const point2& p) { x+=p.x; y+=p.y; return *this; } const point2& operator-=(const point2& p) { x-=p.x; y-=p.y; return *this; } const point2& operator/=(double t) { x/=t; y/=t; return *this; } ! point2 operator-() const { return point2<T>(-x,-y); } const T& operator[](std::size_t i) const { return (reinterpret_cast<const T*>(&x))[i]; } *************** *** 72,284 **** }; ! template <typename T> std::ostream& operator<<(const point2<T>& p, std::ostream& os) { os << p.x<<" "<<p.y<<" "; return os; } ! template <typename T> std::istream& operator>>( point2<T>& p, std::istream& is) { is >> p.x >> p.y; return is; } ! ! template <typename T> std::ostream& operator<<(std::ostream& os, const point2<T>& p) { return p<<os; } ! template <typename T> std::istream& operator>>(std::istream& is, point2<T>& p) { return p>>is; } ! ! template <typename T> inline T dist_sqrd(const point2<T>& p) { return p.x*p.x + p.y*p.y; } ! template <typename T> inline T dist(const point2<T>& p) { return sqrt(dist_sqrd(p)); } ! ! template <typename T> inline T dist_sqrd(const point2<T>& p1, const point2<T>& p2) { return (p1.x-p2.x)*(p1.x-p2.x) + (p1.y-p2.y)*(p1.y-p2.y); } ! template <typename T> inline T dist(const point2<T>& p1, const point2<T>& p2) { return sqrt(dist_sqrd(p1,p2)); } ! ! ! template <typename FLOAT> inline int round (FLOAT x) { return x>=0 ? int(x+0.5) : int(x-0.5); } ! template <typename FLOAT> inline int round_up (FLOAT x) { int intX=int(x); return (x<=intX) ? intX : intX+1; } ! template <typename FLOAT> inline int round_down(FLOAT x) { int intX=int(x); return (x>=intX) ? intX : intX-1; } ! template <typename FLOAT> inline point2<int> round (const point2<FLOAT>& p) { return point2<int>(round (p.x),round (p.y)); } ! template <typename FLOAT> inline point2<int> round_up (const point2<FLOAT>& p) { return point2<int>(round_up (p.x),round_up (p.y)); } ! template <typename FLOAT> inline point2<int> round_down(const point2<FLOAT>& p) { return point2<int>(round_down(p.x),round_down(p.y)); } ! ! //////////////////////////////////////////////////////////////////////////////////////// ! /// ! /// computing size with alignment ! /// ! //////////////////////////////////////////////////////////////////////////////////////// ! ! template <typename T> inline T get_aligned(T val, int align) { return val+(align - val%align)%align; } ! ! ! /// \brief plus function object whose arguments may be of different type. ! template <typename T1, typename T2> ! struct plus : public std::binary_function<T1,T2,T1> { ! T1 operator()(T1 f1, T2 f2) const { ! return f1+f2; ! } ! }; ! ! /// \brief operator++ wrapped in a function object ! template <typename T> ! struct inc : public std::unary_function<T,T> { ! T operator()(T x) const { return ++x; } ! }; ! ! /// \brief operator-- wrapped in a function object ! template <typename T> ! struct dec : public std::unary_function<T,T> { ! T operator()(T x) const { return --x; } ! }; ! ! // \brief similar to std::equal_to<T> but both arguments are allowed to have different types (as long as they are equality-comparable) ! // and the types are bound upon application, not upon definition. ! struct equal_to { ! typedef bool result_type; ! ! template <typename X, typename Y> ! result_type operator()(const X& x, const Y& y) const { return x==y; } ! }; ! ! //////////////////////////////////////////////////////////////////////////////////////// ! /// ! /// \brief copy_n taken from SGI STL. ! /// ! //////////////////////////////////////////////////////////////////////////////////////// ! ! template <class _InputIter, class _Size, class _OutputIter> ! std::pair<_InputIter, _OutputIter> __copy_n(_InputIter __first, _Size __count, ! _OutputIter __result, ! std::input_iterator_tag) { ! for ( ; __count > 0; --__count) { ! *__result = *__first; ! ++__first; ! ++__result; ! } ! return std::pair<_InputIter, _OutputIter>(__first, __result); ! } ! ! template <class _RAIter, class _Size, class _OutputIter> ! inline std::pair<_RAIter, _OutputIter> ! __copy_n(_RAIter __first, _Size __count, ! _OutputIter __result, ! std::random_access_iterator_tag) { ! _RAIter __last = __first + __count; ! return std::pair<_RAIter, _OutputIter>(__last, std::copy(__first, __last, __result)); ! } ! ! template <class _Iter> ! inline typename std::iterator_traits<_Iter>::iterator_category ! ___iterator_category(const _Iter&) ! { ! typedef typename std::iterator_traits<_Iter>::iterator_category _Category; ! return _Category(); ! } ! ! template <class _InputIter, class _Size, class _OutputIter> ! inline std::pair<_InputIter, _OutputIter> ! __copy_n(_InputIter __first, _Size __count, _OutputIter __result) { ! return __copy_n(__first, __count, __result, ! ___iterator_category(__first)); ! } ! ! template <class _InputIter, class _Size, class _OutputIter> ! inline std::pair<_InputIter, _OutputIter> ! copy_n(_InputIter __first, _Size __count, _OutputIter __result) { ! return __copy_n(__first, __count, __result); ! } //////////////////////////////////////////////////////////////////////////////////////// /// ! /// \brief unary_compose taken from SGI STL. /// //////////////////////////////////////////////////////////////////////////////////////// - template <class OP1, class OP2> - class unary_compose : public std::unary_function<typename OP2::argument_type, typename OP1::result_type> { - protected: - OP1 _M_fn1; - OP2 _M_fn2; - public: - unary_compose(){} // Added a default constructor (missing from SGI's STL) - unary_compose(const OP1& __x, const OP2& __y) : _M_fn1(__x), _M_fn2(__y) {} - typename OP1::result_type operator()(const typename OP2::argument_type& __x) const { return _M_fn1(_M_fn2(__x)); } - }; - - /// \brief similar to std::binder2nd but the parameter types are specified in the application operator (not in the class declaration) - template<typename BIN_FN, typename RIGHT> class binder2nd { - public: - typedef typename BIN_FN::result_type result_type; - - binder2nd(const BIN_FN& bin_op, const RIGHT& right) : _bin_op(bin_op), _right(right) {} - - template <typename LEFT> - result_type operator()(const LEFT& left) const { return _bin_op(left, _right); } - - protected: - BIN_FN _bin_op; // the functor to apply - RIGHT _right; // the right operand - }; - - // \brief helper function for binder2nd - template<typename BIN_FN, typename RIGHT> inline binder2nd<BIN_FN,RIGHT> bind2nd(const BIN_FN& bin_fn, const RIGHT& right) { - return binder2nd<BIN_FN,RIGHT>(bin_fn, right); - } - - /// \brief similar to std::binder1st but the parameter types are specified in the application operator (not in the class declaration) - template<typename BIN_FN, typename LEFT> class binder1st { - public: - typedef typename BIN_FN::result_type result_type; - - binder1st(const BIN_FN& bin_op, const LEFT& left) : _bin_op(bin_op), _left(left) {} - - template <typename RIGHT> - result_type operator()(const RIGHT& right) const { return _bin_op(_left, right); } - - protected: - BIN_FN _bin_op; // the functor to apply - LEFT _left; // the left operand - }; ! // \brief helper function for binder1st ! template<typename BIN_FN, typename LEFT> inline binder1st<BIN_FN,LEFT> bind1st(const BIN_FN& bin_fn, const LEFT& left) { ! return binder1st<BIN_FN,LEFT>(bin_fn, left); ! } //////////////////////////////////////////////////////////////////////////////////////// - /// - // STEP ITERATOR ADAPTOR - /// \brief step iterator adaptor /// ! /// An adaptor over an existing iterator that changes the step unit ! /// (i.e. distance(it,it+1)) by a given predicate. Instead of calling base's ! /// operators ++, --, +=, -=, etc. the adaptor is using the passed policy object S_FN ! /// for advancing and for computing the distance between iterators. /// //////////////////////////////////////////////////////////////////////////////////////// ! template <typename DERIVED, // type of the derived class ! typename IT, // Models Iterator ! typename S_FN> // A policy object that can compute the distance between two iterators of type IT ! // and can advance an iterator of type IT a given number of IT's units ! class step_iterator_adaptor : public boost::iterator_adaptor<DERIVED, IT, boost::use_default, boost::use_default, boost::use_default, typename S_FN::difference_type> { ! public: ! typedef boost::iterator_adaptor<DERIVED, IT, boost::use_default, boost::use_default, boost::use_default, typename S_FN::difference_type> parent_type; ! typedef typename std::iterator_traits<IT>::difference_type base_difference_type; ! typedef typename S_FN::difference_type difference_type; ! typedef typename std::iterator_traits<IT>::reference reference; ! ! step_iterator_adaptor() {} ! step_iterator_adaptor(const IT& it, S_FN step_fn=S_FN()) : parent_type(it), _step_fn(step_fn) {} ! ! difference_type step() const { return _step_fn.step(); } ! ! // although boost::iterator_adaptor defines these, the default implementation computes distance and compares for zero. ! // it is often faster to just apply the relation operator to the base ! bool operator> (const step_iterator_adaptor& p) const { return step()>0 ? this->base_reference()> p.base_reference() : this->base_reference()< p.base_reference(); } ! bool operator< (const step_iterator_adaptor& p) const { return step()>0 ? this->base_reference()< p.base_reference() : this->base_reference()> p.base_reference(); } ! bool operator>=(const step_iterator_adaptor& p) const { return step()>0 ? this->base_reference()>=p.base_reference() : this->base_reference()<=p.base_reference(); } ! bool operator<=(const step_iterator_adaptor& p) const { return step()>0 ? this->base_reference()<=p.base_reference() : this->base_reference()>=p.base_reference(); } ! bool operator==(const step_iterator_adaptor& p) const { return this->base_reference()==p.base_reference(); } ! bool operator!=(const step_iterator_adaptor& p) const { return this->base_reference()!=p.base_reference(); } ! protected: ! S_FN _step_fn; ! private: ! friend class boost::iterator_core_access; - void increment() { _step_fn.advance(this->base_reference(),1); } - void decrement() { _step_fn.advance(this->base_reference(),-1); } - void advance(base_difference_type d) { _step_fn.advance(this->base_reference(),d); } - difference_type distance_to(const step_iterator_adaptor& it) const { return _step_fn.difference(this->base_reference(),it.base_reference()); } - }; --- 62,108 ---- }; ! template <typename T> inline ! bool operator==(const point2<T>& p1, const point2<T>& p2) { return (p1.x==p2.x && p1.y==p2.y); } ! template <typename T> inline ! bool operator!=(const point2<T>& p1, const point2<T>& p2) { return p1.x!=p2.x || p1.y!=p2.y; } ! template <typename T> inline ! point2<T> operator+(const point2<T>& p1, const point2<T>& p2) { return point2<T>(p1.x+p2.x,p1.y+p2.y); } ! template <typename T> inline ! point2<T> operator-(const point2<T>& p1, const point2<T>& p2) { return point2<T>(p1.x-p2.x,p1.y-p2.y); } ! template <typename T> inline ! T operator*(const point2<T>& p1, const point2<T>& p2) { return p1.x*p2.x + p1.y*p2.y; } ! template <typename T> inline ! point2<double> operator/(const point2<T>& p, double t) { return t==0 ? point2<double>(0,0):point2<double>(p.x/t,p.y/t); } ! template <typename T> inline ! point2<double> operator*(const point2<T>& p, double t) { return point2<double>(p.x*t,p.y*t); } //////////////////////////////////////////////////////////////////////////////////////// /// ! /// Rounding of real numbers / points to integers / integer points /// //////////////////////////////////////////////////////////////////////////////////////// ! inline int iround(float x ) { return static_cast<int>(x + (x < 0.0f ? -0.5f : 0.5f)); } ! inline int iround(double x) { return static_cast<int>(x + (x < 0.0 ? -0.5 : 0.5)); } ! inline int ifloor(float x ) { return static_cast<int>(std::floor(x)); } ! inline int ifloor(double x) { return static_cast<int>(std::floor(x)); } ! inline int iceil(float x ) { return static_cast<int>(std::ceil(x)); } ! inline int iceil(double x) { return static_cast<int>(std::ceil(x)); } + inline point2<int> iround(const point2<float >& p) { return point2<int>(iround(p.x),iround(p.y)); } + inline point2<int> iround(const point2<double>& p) { return point2<int>(iround(p.x),iround(p.y)); } + inline point2<int> ifloor(const point2<float >& p) { return point2<int>(ifloor(p.x),ifloor(p.y)); } + inline point2<int> ifloor(const point2<double>& p) { return point2<int>(ifloor(p.x),ifloor(p.y)); } + inline point2<int> iceil (const point2<float >& p) { return point2<int>(iceil(p.x), iceil(p.y)); } + inline point2<int> iceil (const point2<double>& p) { return point2<int>(iceil(p.x), iceil(p.y)); } //////////////////////////////////////////////////////////////////////////////////////// /// ! /// computing size with alignment /// //////////////////////////////////////////////////////////////////////////////////////// ! template <typename T> inline T align(T val, int alignment) { return val+(alignment - val%alignment)%alignment; } Index: typedefs.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/gil/core/typedefs.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** typedefs.hpp 3 Feb 2006 18:33:37 -0000 1.3 --- typedefs.hpp 23 Feb 2006 23:28:56 -0000 1.4 *************** *** 35,38 **** --- 35,39 ---- struct cmyk_tag; template <typename T, typename C> struct pixel; + template <typename T, typename C> struct const_interleaved_pixel_iterator; template <typename T, typename C> struct planar_ref; template <typename T, typename C> struct planar_ptr; *************** *** 186,207 **** typedef cmyk32_pixel* cmyk32_ptr; ! typedef gray8c_pixel* gray8c_ptr; ! typedef gray16c_pixel* gray16c_ptr; ! typedef gray32c_pixel* gray32c_ptr; ! typedef rgb8c_pixel* rgb8c_ptr; ! typedef rgb16c_pixel* rgb16c_ptr; ! typedef rgb32c_pixel* rgb32c_ptr; ! typedef bgr8c_pixel* bgr8c_ptr; ! typedef bgr16c_pixel* bgr16c_ptr; ! typedef bgr32c_pixel* bgr32c_ptr; ! typedef rgba8c_pixel * rgba8c_ptr; ! typedef rgba16c_pixel* rgba16c_ptr; ! typedef rgba32c_pixel* rgba32c_ptr; ! typedef lab8c_pixel* lab8c_ptr; ! typedef lab16c_pixel* lab16c_ptr; ! typedef lab32c_pixel* lab32c_ptr; ! typedef cmyk8c_pixel* cmyk8c_ptr; ! typedef cmyk16c_pixel* cmyk16c_ptr; ! typedef cmyk32c_pixel* cmyk32c_ptr; // planar pixel pointers --- 187,208 ---- typedef cmyk32_pixel* cmyk32_ptr; ! typedef const_interleaved_pixel_iterator<bits8 , gray_tag> gray8c_ptr; ! typedef const_interleaved_pixel_iterator<bits16, gray_tag> gray16c_ptr; ! typedef const_interleaved_pixel_iterator<bits32, gray_tag> gray32c_ptr; ! typedef const_interleaved_pixel_iterator<bits8 , rgb_tag> rgb8c_ptr; ! typedef const_interleaved_pixel_iterator<bits16, rgb_tag> rgb16c_ptr; ! typedef const_interleaved_pixel_iterator<bits32, rgb_tag> rgb32c_ptr; ! typedef const_interleaved_pixel_iterator<bits8 , bgr_tag> bgr8c_ptr; ! typedef const_interleaved_pixel_iterator<bits16, bgr_tag> bgr16c_ptr; ! typedef const_interleaved_pixel_iterator<bits32, bgr_tag> bgr32c_ptr; ! typedef const_interleaved_pixel_iterator<bits8 , rgba_tag> rgba8c_ptr; ! typedef const_interleaved_pixel_iterator<bits16, rgba_tag> rgba16c_ptr; ! typedef const_interleaved_pixel_iterator<bits32, rgba_tag> rgba32c_ptr; ! typedef const_interleaved_pixel_iterator<bits8 , lab_tag> lab8c_ptr; ! typedef const_interleaved_pixel_iterator<bits16, lab_tag> lab16c_ptr; ! typedef const_interleaved_pixel_iterator<bits32, lab_tag> lab32c_ptr; ! typedef const_interleaved_pixel_iterator<bits8 , cmyk_tag> cmyk8c_ptr; ! typedef const_interleaved_pixel_iterator<bits16, cmyk_tag> cmyk16c_ptr; ! typedef const_interleaved_pixel_iterator<bits32, cmyk_tag> cmyk32c_ptr; // planar pixel pointers |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:32
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/future/widgets/headers Modified Files: client_assembler.hpp ui_core.hpp Added Files: label_t.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. --- NEW FILE: label_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_LABEL_T_HPP #define ADOBE_WIDGET_LABEL_T_HPP /****************************************************************************************************/ #include <adobe/config.hpp> #include <adobe/source/swap.hpp> // for theme_t #include <adobe/future/widgets/headers/ui_core.hpp> #include <boost/operators.hpp> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ class label_t : boost::equality_comparable<label_t> { public: label_t(const std::string& name, std::size_t characters, theme_t theme); #if !defined(ADOBE_NO_DOCUMENTATION) label_t(const label_t& rhs); ~label_t(); label_t& operator= (const label_t& rhs); #endif 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); void enable(bool make_enabled); friend bool operator== (const adobe::label_t& x, const adobe::label_t& y); friend inline void swap(adobe::label_t& x, adobe::label_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 /****************************************************************************************************/ Index: client_assembler.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/client_assembler.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** client_assembler.hpp 3 Feb 2006 18:33:36 -0000 1.9 --- client_assembler.hpp 23 Feb 2006 23:28:55 -0000 1.10 *************** *** 27,30 **** --- 27,31 ---- #include <boost/function.hpp> + #include <boost/filesystem/path.hpp> #include <list> *************** *** 98,103 **** /// sheet to bind against. /// ! /// \param directory_path the directory to look for Eve ! /// files referenced by @dialog in. /// \param sheet the sheet to bind against. This /// sheet should contain all of the --- 99,106 ---- /// sheet to bind against. /// ! /// \param directory_path the base directory for any ! /// external resources that the layout may need ! /// to fetch (like external images or other Eve ! /// layouts to be used during a @dialog action) /// \param sheet the sheet to bind against. This /// sheet should contain all of the *************** *** 106,110 **** /// push_back or @dialog). // ! window_server_t(const char* directory_path, adobe::sheet_t& sheet); // /// Hide and release all Eve dialogs created by this window server. --- 109,113 ---- /// push_back or @dialog). // ! window_server_t(const boost::filesystem::path& working_directory, adobe::sheet_t& sheet); // /// Hide and release all Eve dialogs created by this window server. *************** *** 204,212 **** void erase(iterator window); ! adobe::sheet_t& sheet_m; ! std::string directory_path_m; ! window_list_t window_list_m; ! action_fallback_proc_t fallback_m; ! adobe::widget_factory_proc_t widget_factory_m; }; --- 207,215 ---- void erase(iterator window); ! adobe::sheet_t& sheet_m; ! boost::filesystem::path directory_path_m; ! window_list_t window_list_m; ! action_fallback_proc_t fallback_m; ! adobe::widget_factory_proc_t widget_factory_m; }; Index: ui_core.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/ui_core.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ui_core.hpp 3 Feb 2006 18:33:36 -0000 1.8 --- ui_core.hpp 23 Feb 2006 23:28:55 -0000 1.9 *************** *** 66,70 **** ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DECLARATION(progress_bar_t) ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DECLARATION(separator_t) - ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DECLARATION(static_text_t) ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DECLARATION(edit_text_t) ADOBE_UI_CORE_IMPLEMENTATION_SWAP_DECLARATION(popup_t) --- 66,69 ---- *************** *** 1009,1052 **** /****************************************************************************************************/ - struct static_text_t : boost::equality_comparable<static_text_t> - { - struct implementation_t; - - static_text_t(); - static_text_t(const static_text_t& rhs); - - ~static_text_t(); - - void initialize(const std::string& name); - - extents_t best_bounds(); - void set_bounds(const point_2d_t& position, const extents_t& geometry); - - void set_name(const std::string& name); - - void set_theme(theme_t theme); - void adorn_theme(theme_t theme); - void unadorn_theme(theme_t theme); - - void set_active(bool make_active); - void set_visible(bool make_visible); - - long best_height_given_width(long width); - - void signal_hit(implementation::static_text_hit_proc_t proc); - - private: - ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_FRIEND_DECLARATION(adobe::static_text_t); - ADOBE_UI_CORE_IMPLEMENTATION_SWAP_FRIEND_DECLARATION(static_text_t); - - implementation_t* object_m; - - public: - implementation_t& implementation(); - const implementation_t& implementation() const; - }; - - /****************************************************************************************************/ - struct edit_text_t : boost::equality_comparable<edit_text_t> { --- 1008,1011 ---- *************** *** 1259,1263 **** ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::progress_bar_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::separator_t); - ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::static_text_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::edit_text_t); ADOBE_SERIALIZABLE_EQUALITY_COMPARABLE_BOILERPLATE_DECLARATION(adobe::popup_t); --- 1218,1221 ---- |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:31
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/tutorials In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/documentation/sources/tutorials Modified Files: defgroup_tutorials.dox 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: defgroup_tutorials.dox =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/tutorials/defgroup_tutorials.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** defgroup_tutorials.dox 19 Mar 2005 00:16:42 -0000 1.1 --- defgroup_tutorials.dox 23 Feb 2006 23:28:55 -0000 1.2 *************** *** 2,4 **** --- 2,6 ---- \defgroup asl_tutorials Tutorials \ingroup asl_home + + The Generic Image Library (GIL) also has a \ref GILTutorial "Tutorial" */ |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:31
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl/concepts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/documentation/sources/asl/concepts Modified Files: concept_lessthancomparable.dox 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: concept_lessthancomparable.dox =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl/concepts/concept_lessthancomparable.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** concept_lessthancomparable.dox 3 Feb 2006 18:33:35 -0000 1.2 --- concept_lessthancomparable.dox 23 Feb 2006 23:28:55 -0000 1.3 *************** *** 26,31 **** \description A type is LessThanComparable if it is ordered: it must ! be possible to compare two objects of that type using <code>operator<</code>, and ! <code>operator<</code> must be a partial ordering. \refinement_of --- 26,31 ---- \description A type is LessThanComparable if it is ordered: it must ! be possible to compare two objects of that type using <code>operator< </code>, and ! <code>operator< </code> must be a partial ordering. \refinement_of *************** *** 49,60 **** transitive (that is, if <code>!(x < y) && !(y < x) && !(y < z) && !(z < y)</code> implies <code>!(x < z) && !(z < x)</code>), then it satisfies the mathematical ! definition of an equivalence relation. In this case, <code>operator<</code> is a <i>strict weak ordering</i>. \par ! If <code>operator<</code> is a strict weak ordering, and if each equivalence class ! has only a single element, then <code>operator<</code> is a <i>total ordering</i>. \valid_expressions ! <table border> <tr> <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> --- 49,60 ---- transitive (that is, if <code>!(x < y) && !(y < x) && !(y < z) && !(z < y)</code> implies <code>!(x < z) && !(z < x)</code>), then it satisfies the mathematical ! definition of an equivalence relation. In this case, <code>operator< </code> is a <i>strict weak ordering</i>. \par ! If <code>operator< </code> is a strict weak ordering, and if each equivalence class ! has only a single element, then <code>operator< </code> is a <i>total ordering</i>. \valid_expressions ! <table> <tr> <th>Name</th><th>Expression</th><th>Type requirements</th><th>Return type</th> *************** *** 87,91 **** \expression_semantics ! <table border> <tr> <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> --- 87,91 ---- \expression_semantics ! <table> <tr> <th>Name</th><th>Expression</th><th>Precondition</th><th>Semantics</th><th>Postcondition</th> *************** *** 124,128 **** \invariants ! <table border> <tr> <td valign="top">Irreflexivity</td> --- 124,128 ---- \invariants ! <table> <tr> <td valign="top">Irreflexivity</td> *************** *** 145,149 **** \notes <A name="1">[1]</A> ! Only <code>operator<</code> is fundamental; the other inequality operators are essentially syntactic sugar. \par <A name="2">[2]</A> --- 145,149 ---- \notes <A name="1">[1]</A> ! Only <code>operator< </code> is fundamental; the other inequality operators are essentially syntactic sugar. \par <A name="2">[2]</A> *************** *** 151,155 **** \par <A name="3">[3]</A> ! Because of irreflexivity and transitivity, <code>operator<</code> always satisfies the definition of a <i>partial ordering</i>. The definition of a <i>strict weak ordering</i> is stricter, and the definition of a <i>total ordering</i> is stricter still. \see_also --- 151,155 ---- \par <A name="3">[3]</A> ! Because of irreflexivity and transitivity, <code>operator< </code> always satisfies the definition of a <i>partial ordering</i>. The definition of a <i>strict weak ordering</i> is stricter, and the definition of a <i>total ordering</i> is stricter still. \see_also |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:31
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/future/widgets/sources/win32 Modified Files: metrics.cpp ui_core_implementation.cpp Added Files: label_t_impl.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. Index: metrics.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/win32/metrics.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** metrics.cpp 3 Feb 2006 18:33:37 -0000 1.2 --- metrics.cpp 23 Feb 2006 23:28:56 -0000 1.3 *************** *** 20,24 **** #include <stdexcept> #include <tchar.h> ! #include <cstring> #include <boost/static_assert.hpp> --- 20,24 ---- #include <stdexcept> #include <tchar.h> ! #include <cassert> #include <cstring> #include <boost/static_assert.hpp> *************** *** 34,37 **** --- 34,39 ---- namespace adobe { + + const RECT metrics_t::kBigExtents = {0, 0, 10000, 10000}; /****************************************************************************************************/ // *************** *** 64,67 **** --- 66,73 ---- class_name_m = class_name_buf; return true; + } + void set_theme_name(const WCHAR* theme_name) + { + class_name_m = theme_name; } bool get_font(int widget_type, LOGFONTW& out_font) const *************** *** 104,108 **** return hackery::cast<bool>(have_metrics); } ! bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents) const { // --- 110,114 ---- return hackery::cast<bool>(have_metrics); } ! bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents, const RECT*) const { // *************** *** 418,427 **** return false; } ! // ! // Previously we had implementations of get_font_metrics and get_text_extents ! // which used the UXTheme API. We were not getting the values back that we ! // expected, so we now use the Win32 API for getting those measurements (although ! // note that we still get the actual widget font with UxTheme). ! // bool get_integer(int widget_type, int measurement, int& out_val) const { --- 424,467 ---- return false; } ! bool get_font_metrics(int widget_type, TEXTMETRIC& out_metrics) const ! { ! HDC tmp_dc = GetDC(0); ! ! bool have_metrics = S_OK == (*GetThemeTextMetricsPtr)(theme_m, tmp_dc, widget_type, kState, &out_metrics); ! ! ReleaseDC(0, tmp_dc); ! return hackery::cast<bool>(have_metrics); ! } ! ! bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents, const RECT* in_extents) const ! { ! if(!in_extents) in_extents=&kBigExtents; ! // ! // Create the font and select it into a temporary device context. ! // ! HDC tmp_dc = GetDC(0); ! LOGFONTW logical_font = {0}; ! HGDIOBJ font = 0; ! // ! // Try to use get_font, in case there is another font we're meant ! // to use. Then fallback on DEFAULT_GUI_FONT. ! // ! if (get_font(widget_type, logical_font)) ! { ! font = (HGDIOBJ)CreateFontIndirectW(&logical_font); ! } ! assert(font); ! // ! // Extract the extents. ! // ! HGDIOBJ original_font = SelectObject(tmp_dc, font); ! BOOL have_extents = S_OK == (*GetThemeTextExtentPtr)(theme_m, tmp_dc, widget_type, kState, text.c_str(), static_cast<int>(text.size()), DT_CALCRECT + DT_WORDBREAK, in_extents, &out_extents); ! // ! // Clean up, and convert the size to a rect. ! // ! DeleteObject(SelectObject(tmp_dc, original_font)); ! ReleaseDC(0, tmp_dc); ! return hackery::cast<bool>(have_extents); ! } bool get_integer(int widget_type, int measurement, int& out_val) const { --- NEW FILE: label_t_impl.cpp --- #include <windows.h> #include <uxtheme.h> #include <tmschema.h> #define SCHEME_STRINGS 1 #include <tmschema.h> //Yes, we include this twice -- read the top of the file #include "event_dispatcher.hpp" #include "ui_core.hpp" #include "ui_core_common.hpp" #include "ui_core_implementation.hpp" #include "adobe/unicode.hpp" #include "wincast.hpp" #include "metrics.hpp" #include "label_t_impl.hpp" #include "display.hpp" #include <string> #include <cassert> /****************************************************************************************************/ #define ADOBE_THROW_LAST_ERROR adobe::implementation::throw_last_error_exception(__FILE__, __LINE__) /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ namespace implementation { /****************************************************************************************************/ extern void throw_last_error_exception(const char* file, long line); /****************************************************************************************************/ } // namespace implementation /****************************************************************************************************/ label_t::implementation_t::implementation_t(const std::string& name, std::size_t characters, theme_t theme) : characters_m(characters), theme_m(theme) { RECT bounds = { 0, 0, 100, 100 }; initialize(bounds, name); } /****************************************************************************************************/ label_t::implementation_t::implementation_t(const implementation_t& rhs) : characters_m(rhs.characters_m), theme_m(rhs.theme_m) { RECT bounds; implementation::get_control_bounds(rhs.window_m.get(), bounds); initialize(bounds, implementation::get_window_title(rhs.window_m.get())); } /****************************************************************************************************/ label_t::implementation_t& label_t::implementation_t::operator=(const implementation_t& rhs) { characters_m = rhs.characters_m; theme_m = rhs.theme_m; RECT bounds; implementation::get_control_bounds(rhs.window_m.get(), bounds); initialize(bounds, implementation::get_window_title(rhs.window_m.get())); return *this; } /****************************************************************************************************/ label_t::implementation_t::~implementation_t() { } /****************************************************************************************************/ void label_t::implementation_t::place(const point_2d_t& position, const extents_t& extents) { RECT new_bounds = { position.x_m, position.y_m, position.x_m + extents.width(), position.y_m + extents.height() }; implementation::set_control_bounds(window_m.get(), new_bounds); } /****************************************************************************************************/ void label_t::implementation_t::enable(bool make_enabled) { ::EnableWindow(window_m.get(), make_enabled); } /****************************************************************************************************/ void label_t::implementation_t::initialize( const RECT& bounds, const std::string& name) { bounds_m = bounds; name_m = name; long width(bounds.right - bounds.left); long height(bounds.bottom - bounds.top); std::string lname(adobe::localize(name)); window_m.reset( ::CreateWindowExA( WS_EX_COMPOSITED, "STATIC", lname.c_str(), WS_CHILD | WS_VISIBLE, bounds.left, bounds.top, width, height, invisible_parent(), NULL, ::GetModuleHandle(NULL), NULL)); if (window_m.get() == NULL) ADOBE_THROW_LAST_ERROR; set_font(window_m.get(), EP_EDITTEXT, L"Edit"); // set_user_reference(window_m, this); // default_window_proc_m = trap_window_proc(window_m, label_window_proc); } /****************************************************************************************************/ extents_t::slice_t label_t::implementation_t::measure_horizontal() { assert(window_m.get()); metrics_t::get_instance().set_theme_name(L"Edit"); // // If we don't have the type of this widget, then we should return a // zero sized rectangle. This is usually correct, and a good assumption // anyway. // int uxtheme_type_m = EP_EDITTEXT; // // Discover the size of the widget. // SIZE widget_size; bool have_size = metrics_t::get_instance().get_size(uxtheme_type_m, TS_DRAW, widget_size); // // Discover any margins of this widget. // MARGINS widget_margins; bool have_margins = metrics_t::get_instance().get_margins(uxtheme_type_m, widget_margins); // // Get the text metrics (and calculate the baseline of this widget) // TEXTMETRIC widget_tm; bool have_tm = metrics_t::get_instance().get_font_metrics(uxtheme_type_m, widget_tm); // // We need the text dimensions to figure out what the width of the widget should // be. // RECT text_extents; RECT in_extents = {0,0,10000,10000}; if(characters_m){ std::wstring wrap(characters_m * 2, L'0'); bool have_extents = metrics_t::get_instance().get_text_extents(uxtheme_type_m, wrap.c_str(), text_extents, &in_extents); assert(have_extents); in_extents = text_extents; in_extents.bottom = 10000; } std::wstring wname; to_utf16(name_m.begin(), name_m.end(), back_inserter(wname)); bool have_extents = metrics_t::get_instance().get_text_extents(uxtheme_type_m, wname.c_str(), text_extents, &in_extents); // // Get any border the widget may have. // int border; bool have_border = metrics_t::get_instance().get_integer(uxtheme_type_m, TMT_BORDERSIZE, border); // // Now we can calculate the size we want to return. // extents_t::slice_t result; result.length_m = text_extents.right - text_extents.left; assert(result.length_m); // have_size ? &widget_size : 0; /*, have_margins ? &widget_margins : 0, have_tm ? &widget_tm : 0, have_extents ? &text_extents : 0, have_border ? &border : 0);*/ return result; } extents_t::slice_t label_t::implementation_t::measure_vertical(const extents_t::slice_t& horizontal) { assert(window_m.get()); RECT static_bounds = { 0, 0, horizontal.length_m, 10000 /* bottomless */}; implementation::set_control_bounds(window_m.get(), static_bounds); HDC hdc(::GetWindowDC(window_m.get())); std::string title(implementation::get_window_title(window_m.get())); std::wstring wtitle; adobe::to_utf16(title.begin(), title.end(), std::back_inserter(wtitle)); RECT out_extent; metrics_t::get_instance().set_theme_name(L"Edit"); // // If we don't have the type of this widget, then we should return a // zero sized rectangle. This is usually correct, and a good assumption // anyway. // int uxtheme_type_m = EP_EDITTEXT; // // Get the text metrics (and calculate the baseline of this widget) // TEXTMETRIC widget_tm; bool have_tm = metrics_t::get_instance().get_font_metrics(uxtheme_type_m, widget_tm); assert(have_tm); bool have_extents = metrics_t::get_instance().get_text_extents(uxtheme_type_m, wtitle.c_str(), out_extent, &static_bounds); assert(have_extents); extents_t::slice_t vert; vert.length_m = out_extent.bottom - out_extent.top; // set the baseline for the text if (have_tm) // distance from top to baseline vert.poi_m.push_back(widget_tm.tmHeight - widget_tm.tmDescent); return vert; // // Now we can calculate the size we want to return. // //return calculate_best_bounds(have_size ? &widget_size : 0, have_margins ? &widget_margins : 0, // have_tm ? &widget_tm : 0, have_extents ? &text_extents : 0, have_border ? &border : 0); } /****************************************************************************************************/ template <> HWND view_for_element< HWND, adobe::label_t >(adobe::label_t& widget) { return widget.implementation().window_m.get(); } /****************************************************************************************************/ template <> display_t::position_t insert<adobe::label_t>(display_t& display, display_t::position_t& parent, adobe::label_t& element) { HWND ref(adobe::view_for_element< HWND >(element)); return display.insert<HWND>(parent, ref); } /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/sources/win32/ui_core_implementation.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ui_core_implementation.cpp 3 Feb 2006 18:33:37 -0000 1.3 --- ui_core_implementation.cpp 23 Feb 2006 23:28:56 -0000 1.4 *************** *** 22,25 **** --- 22,26 ---- #include <adobe/algorithm.hpp> #include <adobe/dictionary.hpp> + #include <adobe/unicode.hpp> #include <boost/cstdint.hpp> *************** *** 53,60 **** --- 54,108 ---- /****************************************************************************************************/ [...1590 lines suppressed...] + void adobe::implementation::get_control_bounds(HWND control, RECT& bounds) + { + assert(control); + + ::GetWindowRect(control, &bounds); + } + + /****************************************************************************************************/ + + void adobe::implementation::set_control_bounds(HWND control, const RECT& bounds) + { + assert(control); + + long width = bounds.right - bounds.left; + long height = bounds.bottom - bounds.top; + + ::MoveWindow(control, bounds.left, bounds.top, width, height, TRUE); + } + + /****************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:31
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/future Modified Files: timer.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: timer.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/timer.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** timer.hpp 3 Feb 2006 18:33:36 -0000 1.8 --- timer.hpp 23 Feb 2006 23:28:55 -0000 1.9 *************** *** 345,354 **** #ifndef ADOBE_NO_DOCUMENTATION ! bool operator == (const adobe::timer_t& x, const adobe::timer_t& y) { return x.last_split() == y.last_split(); } /****************************************************************************************************/ ! bool operator < (const adobe::timer_t& x, const adobe::timer_t& y) { return x.last_split() < y.last_split(); } --- 345,354 ---- #ifndef ADOBE_NO_DOCUMENTATION ! inline bool operator == (const adobe::timer_t& x, const adobe::timer_t& y) { return x.last_split() == y.last_split(); } /****************************************************************************************************/ ! inline bool operator < (const adobe::timer_t& x, const adobe::timer_t& y) { return x.last_split() < y.last_split(); } |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:31
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/structure In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/documentation/sources/structure Modified Files: toc.dox 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: toc.dox =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/structure/toc.dox,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** toc.dox 3 Feb 2006 18:33:36 -0000 1.10 --- toc.dox 23 Feb 2006 23:28:55 -0000 1.11 *************** *** 91,94 **** --- 91,95 ---- - \ref asl_tutorials_eve - \ref asl_tutorials_forest + - \ref GILTutorial - \ref asl_tutorials_value_t - Indices |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:31
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/documentation/sources/asl Modified Files: value_t.dox 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: value_t.dox =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl/value_t.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** value_t.dox 3 Feb 2006 18:33:35 -0000 1.2 --- value_t.dox 23 Feb 2006 23:28:54 -0000 1.3 *************** *** 3,7 **** \ingroup asl_libraries ! \brief A descriminated type for single values. \model_of --- 3,7 ---- \ingroup asl_libraries ! \brief A discriminated type for single values. \model_of |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/vc8 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/ide_projects/vc8 Modified Files: begin.vcproj widgets.vcproj 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: widgets.vcproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/vc8/widgets.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** widgets.vcproj 24 Jan 2006 19:38:51 -0000 1.3 --- widgets.vcproj 23 Feb 2006 23:28:58 -0000 1.4 *************** *** 179,182 **** --- 179,190 ---- </File> <File + RelativePath="..\..\adobe\future\widgets\sources\label_t.cpp" + > + </File> + <File + RelativePath="..\..\adobe\future\widgets\sources\win32\label_t_impl.cpp" + > + </File> + <File RelativePath="..\..\adobe\future\widgets\sources\win32\metrics.cpp" > *************** *** 275,278 **** --- 283,294 ---- </File> <File + RelativePath="..\..\adobe\future\widgets\headers\label_t.hpp" + > + </File> + <File + RelativePath="..\..\adobe\future\widgets\headers\win32\label_t_impl.hpp" + > + </File> + <File RelativePath="..\..\adobe\future\widgets\headers\win\metrics.hpp" > *************** *** 295,299 **** </File> <File ! RelativePath="..\..\adobe\future\widgets\headers\win\ui_core_implementation.hpp" > </File> --- 311,315 ---- </File> <File ! RelativePath="..\..\adobe\future\widgets\headers\win32\ui_core_implementation.hpp" > </File> Index: begin.vcproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/vc8/begin.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** begin.vcproj 24 Jan 2006 19:38:51 -0000 1.3 --- begin.vcproj 23 Feb 2006 23:28:58 -0000 1.4 *************** *** 62,66 **** <Tool Name="VCLinkerTool" ! AdditionalDependencies="comctl32.lib" LinkIncremental="2" GenerateManifest="false" --- 62,66 ---- <Tool Name="VCLinkerTool" ! AdditionalDependencies="comctl32.lib uxtheme.lib" LinkIncremental="2" GenerateManifest="false" *************** *** 206,209 **** --- 206,213 ---- </File> <File + RelativePath="..\..\adobe\test\begin\sources\file.cpp" + > + </File> + <File RelativePath="..\..\adobe\test\begin\sources\win32\main.cpp" > |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/begin.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/ide_projects/darwin/begin.xcodeproj Modified Files: project.pbxproj 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: project.pbxproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/begin.xcodeproj/project.pbxproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** project.pbxproj 6 Jan 2006 18:03:05 -0000 1.1 --- project.pbxproj 23 Feb 2006 23:28:57 -0000 1.2 *************** *** 21,24 **** --- 21,25 ---- CE5C21DB0947A75300EB4BB6 /* metrics_glossary.xstr in Resources */ = {isa = PBXBuildFile; fileRef = CE5C21D30947A75300EB4BB6 /* metrics_glossary.xstr */; }; CE5C22A20947AD9C00EB4BB6 /* libasl_widgets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE5C21BF0947A71F00EB4BB6 /* libasl_widgets.a */; }; + CE6FC4C109A1371500FF0B4D /* file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE6FC4C009A1371500FF0B4D /* file.cpp */; }; /* End PBXBuildFile section */ *************** *** 74,77 **** --- 75,79 ---- CE5C21D20947A75300EB4BB6 /* link_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = link_icon.png; path = ../../adobe/test/begin/resources/link_icon.png; sourceTree = SOURCE_ROOT; }; CE5C21D30947A75300EB4BB6 /* metrics_glossary.xstr */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = metrics_glossary.xstr; path = ../../adobe/test/begin/resources/metrics_glossary.xstr; sourceTree = SOURCE_ROOT; }; + CE6FC4C009A1371500FF0B4D /* file.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = file.cpp; path = ../../adobe/test/begin/sources/file.cpp; sourceTree = SOURCE_ROOT; }; CEC06A260948A5FA00AFC610 /* adobe_widgets.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; path = adobe_widgets.xcconfig; sourceTree = "<group>"; }; /* End PBXFileReference section */ *************** *** 117,120 **** --- 119,123 ---- CE5C21A00947A6FA00EB4BB6 /* express_viewer.cpp */, CE5C21A10947A6FA00EB4BB6 /* report_exception.cpp */, + CE6FC4C009A1371500FF0B4D /* file.cpp */, ); name = Sources; *************** *** 259,262 **** --- 262,266 ---- CE5C21A30947A6FA00EB4BB6 /* report_exception.cpp in Sources */, CE5C21A50947A70800EB4BB6 /* main.cpp in Sources */, + CE6FC4C109A1371500FF0B4D /* file.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:12
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/stationery/asl_client_stationery/english.lproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/stationery/asl_client_stationery/english.lproj Removed Files: infoplist.strings 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. --- infoplist.strings DELETED --- |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:11
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/ide_projects/darwin Modified Files: adobe_all.xcconfig adobe_debug.xcconfig adobe_release.xcconfig 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: adobe_release.xcconfig =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/adobe_release.xcconfig,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** adobe_release.xcconfig 6 Jan 2006 18:03:05 -0000 1.1 --- adobe_release.xcconfig 23 Feb 2006 23:28:57 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + ARCHS = ppc i386 ADOBE_RELEASE_PREPROCESSOR_DEFINITIONS = NDEBUG DEAD_CODE_STRIPPING = YES Index: adobe_debug.xcconfig =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/adobe_debug.xcconfig,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** adobe_debug.xcconfig 6 Jan 2006 18:03:05 -0000 1.1 --- adobe_debug.xcconfig 23 Feb 2006 23:28:57 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + ARCHS = $(NATIVE_ARCH) GCC_GENERATE_DEBUGGING_SYMBOLS = YES GCC_OPTIMIZATION_LEVEL = 0 Index: adobe_all.xcconfig =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/adobe_all.xcconfig,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adobe_all.xcconfig 3 Feb 2006 18:33:40 -0000 1.2 --- adobe_all.xcconfig 23 Feb 2006 23:28:57 -0000 1.3 *************** *** 1,3 **** - ARCHS = ppc GCC_DYNAMIC_NO_PIC = NO GCC_ENABLE_FIX_AND_CONTINUE = NO --- 1,2 ---- |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:11
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/stationery/asl_client_stationery/english.lproj/main.nib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/stationery/asl_client_stationery/english.lproj/main.nib Removed Files: classes.nib info.nib objects.xib 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. --- objects.xib DELETED --- --- info.nib DELETED --- --- classes.nib DELETED --- |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:10
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/asl_widgets.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/ide_projects/darwin/asl_widgets.xcodeproj Modified Files: project.pbxproj 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: project.pbxproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/ide_projects/darwin/asl_widgets.xcodeproj/project.pbxproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** project.pbxproj 3 Feb 2006 18:33:40 -0000 1.3 --- project.pbxproj 23 Feb 2006 23:28:57 -0000 1.4 *************** *** 8,11 **** --- 8,13 ---- /* Begin PBXBuildFile section */ + 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 */; }; 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 */; }; *************** *** 53,56 **** --- 55,60 ---- /* Begin PBXFileReference section */ + 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; }; 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>"; }; *************** *** 98,101 **** --- 102,107 ---- CE5C22AB0947ADD700EB4BB6 /* assemblage.cpp */, CE5C209F094799FA00EB4BB6 /* display.cpp */, + CE4EF96A09AA773B006AB513 /* label_t.cpp */, + CE4EF96C09AA7741006AB513 /* label_t_impl.cpp */, CE5C20A0094799FA00EB4BB6 /* metrics.cpp */, CE5C20A1094799FA00EB4BB6 /* ui_core_implementation.cpp */, *************** *** 234,237 **** --- 240,245 ---- CE5C22AF0947ADD700EB4BB6 /* assemblage.cpp in Sources */, CE65D142098AC94E00AA59D0 /* os_utilities.cpp in Sources */, + CE4EF96B09AA773B006AB513 /* label_t.cpp in Sources */, + CE4EF96D09AA7741006AB513 /* label_t_impl.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:10
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/stationery/asl_client_stationery/asl_client_stationery.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/stationery/asl_client_stationery/asl_client_stationery.xcodeproj Removed Files: project.pbxproj 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. --- project.pbxproj DELETED --- |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:10
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/test/begin/sources Modified Files: express_viewer.cpp Added Files: file.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: file.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 "file.hpp" /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ file_buffer_t::file_buffer_t() : le_m(line_ending_unknown_k) { } /****************************************************************************************************/ void file_buffer_t::set_path(const boost::filesystem::path& path) { path_m = path; adobe::file_slurp<char> slurp(path_m); contents_m.assign(slurp.begin(), slurp.end()); set_line_endings_impl(le_m, true); set_dirty(false); } /****************************************************************************************************/ void file_buffer_t::set_line_endings(line_ending_t le, bool force) { set_line_endings_impl(le, force); set_dirty(true); } /****************************************************************************************************/ void file_buffer_t::save() { if (!dirty_m) return; bfs::ofstream output( path_m, std::ios_base::out | std::ios_base::binary ); // // Verify that we were able to open the file for writing. // if ( output.fail() ) throw std::runtime_error( "Error opening file for writing: \"" + path_m.string() + "\"" ); if (le_m == line_ending_unknown_k) set_line_endings(le_m); output << contents_m; set_dirty(false); } /****************************************************************************************************/ void file_buffer_t::set_dirty(bool to) { if (dirty_m == to) return; dirty_m = to; if (dirty_proc_m) dirty_proc_m(dirty_m); } /****************************************************************************************************/ void file_buffer_t::replace_all(const char* src, const char* dst) { // replaces all instances of src with dst std::string::size_type result(0); std::size_t src_n(std::strlen(src)); std::size_t dst_n(std::strlen(dst)); while (true) { result = contents_m.find(src, result); if (result == std::string::npos) break; contents_m.replace(result, src_n, dst, dst_n); result += dst_n; } } /****************************************************************************************************/ void file_buffer_t::set_line_endings_impl(line_ending_t le, bool force) { if (le_m == le && !force && le_m != line_ending_unknown_k) return; if (le == line_ending_platform_k || le == line_ending_unknown_k) { #if ADOBE_PLATFORM_WIN le_m = line_ending_windows_k; #else le_m = line_ending_unix_k; #endif } else { le_m = le; } // REVISIT (fbrereto) : Not as optimal as it could be. if (le_m == line_ending_unix_k) { replace_all("\r\n", "\n"); replace_all("\r", "\n"); } else if (le_m == line_ending_windows_k) { replace_all("\r\n", "\n"); replace_all("\r", "\n"); replace_all("\n", "\r\n"); } else if (le_m == line_ending_mac_os_classic_k) { replace_all("\r\n", "\r"); replace_all("\n", "\r"); } else throw std::runtime_error("unknown line ending type"); // set line endings back to 'unknown' if // that's what they were originally if (le == line_ending_unknown_k) le_m = line_ending_unknown_k; } /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ Index: express_viewer.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/sources/express_viewer.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** express_viewer.cpp 3 Feb 2006 18:33:38 -0000 1.10 --- express_viewer.cpp 23 Feb 2006 23:28:57 -0000 1.11 *************** *** 58,82 **** /****************************************************************************************************/ ! const adobe::static_name_t value_key_g( "value" ); ! const adobe::static_name_t inspector_name_g( "inspector" ); ! const adobe::static_name_t inspector_dump_name_g( "inspector_dump" ); ! const adobe::static_name_t version_info_name_g( "version_info" ); ! const adobe::static_name_t update_adam_name_g( "update_adam" ); ! const adobe::static_name_t update_eve_name_g( "update_eve" ); ! const adobe::static_name_t save_adam_name_g( "save_adam" ); ! const adobe::static_name_t save_eve_name_g( "save_eve" ); ! const adobe::static_name_t clear_window_action_g( "clear_frames" ); ! const adobe::static_name_t frame_widgets_action_g( "frame_widgets" ); ! const adobe::static_name_t editor_adam_cell_g("adam_expression"); ! const adobe::static_name_t editor_eve_cell_g("eve_expression"); ! const adobe::static_name_t editor_adam_dirty_cell_g("adam_dirty"); ! const adobe::static_name_t editor_eve_dirty_cell_g("eve_dirty"); ! const adobe::static_name_t editor_error_cell_g("errors_expression"); ! const adobe::static_name_t editor_results_cell_g("results_expression"); ! const adobe::static_name_t editor_visible_tab_cell_g("tab_group_visible"); ! const adobe::static_name_t editor_inspector_cell_g("inspector_expression"); ! const adobe::static_name_t editor_inspector_result_cell_g("inspector_results"); ! const adobe::static_name_t editor_key_errors_tab_g("errors_stuff"); ! const adobe::static_name_t editor_key_results_tab_g("results_stuff"); /****************************************************************************************************/ --- 58,103 ---- /****************************************************************************************************/ ! const adobe::static_name_t value_key_g ( "value" ); ! const adobe::static_name_t inspector_name_g ( "inspector" ); ! const adobe::static_name_t inspector_dump_name_g ( "inspector_dump" ); ! const adobe::static_name_t version_info_name_g ( "version_info" ); ! const adobe::static_name_t update_adam_name_g ( "update_adam" ); ! const adobe::static_name_t update_eve_name_g ( "update_eve" ); ! const adobe::static_name_t save_adam_name_g ( "save_adam" ); ! const adobe::static_name_t save_eve_name_g ( "save_eve" ); ! const adobe::static_name_t clear_window_action_g ( "clear_frames" ); ! const adobe::static_name_t frame_widgets_action_g ( "frame_widgets" ); ! const adobe::static_name_t editor_adam_cell_g ( "adam_expression" ); ! const adobe::static_name_t editor_eve_cell_g ( "eve_expression" ); ! const adobe::static_name_t editor_adam_dirty_cell_g ( "adam_dirty" ); ! const adobe::static_name_t editor_eve_dirty_cell_g ( "eve_dirty" ); ! const adobe::static_name_t editor_error_cell_g ( "errors_expression" ); ! const adobe::static_name_t editor_results_cell_g ( "results_expression" ); ! const adobe::static_name_t editor_visible_tab_cell_g ( "tab_group_visible" ); ! const adobe::static_name_t editor_inspector_cell_g ( "inspector_expression" ); ! const adobe::static_name_t editor_inspector_result_cell_g ( "inspector_results" ); ! const adobe::static_name_t editor_key_errors_tab_g ( "errors_stuff" ); ! const adobe::static_name_t editor_key_results_tab_g ( "results_stuff" ); ! ! /****************************************************************************************************/ ! ! const char* empty_layout_g = ! "layout my_dialog\n" ! "{\n" ! " 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" ! "}"; ! ! /****************************************************************************************************/ ! ! const char* empty_sheet_g = ! "sheet my_sheet\n" ! "{\n" ! "interface:\n" ! " my_value: 42;\n" ! "}"; /****************************************************************************************************/ *************** *** 386,389 **** --- 407,418 ---- // + // fill the contents of the adam and eve file buffers with the "null dialog" + // + _eve_file_m.set_contents(empty_layout_g, empty_layout_g + std::strlen(empty_layout_g)); + _adam_file_m.set_contents(empty_sheet_g, empty_sheet_g + std::strlen(empty_sheet_g)); + + load_sheet(); + + // // Run the main event loop for the app // *************** *** 396,403 **** { // ! // We can't display the window without a loaded sheet, or without ! // an Eve file to load. // ! if ( !_eve_file_m.valid() || !_sheet_m ) return; if ( _editor_sheet_m ) --- 425,431 ---- { // ! // We can't display the window without a loaded sheet // ! if ( !_sheet_m ) return; if ( _editor_sheet_m ) *************** *** 424,428 **** //const std::string& dir = path.string(); _holder_m = new eve_client::window_server_t( ! _eve_file_m.directory_path().string().c_str(), *_sheet_m ); _holder_m->set_action_fallback( boost::bind( &application_t::_button_notifier, this, _1, _2 ) ); --- 452,456 ---- //const std::string& dir = path.string(); _holder_m = new eve_client::window_server_t( ! _eve_file_m.directory_path(), *_sheet_m ); _holder_m->set_action_fallback( boost::bind( &application_t::_button_notifier, this, _1, _2 ) ); |
From: Foster B. <fos...@us...> - 2006-02-23 23:29:08
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/stationery/asl_client_stationery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/stationery/asl_client_stationery Removed Files: asl_client_stationery.vcproj info.plist main.cpp version.plist 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. --- info.plist DELETED --- --- main.cpp DELETED --- --- asl_client_stationery.vcproj DELETED --- --- version.plist DELETED --- |