|
From: Ralph T. <ra...@us...> - 2005-04-20 22:17:54
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22754/visual_refactor/adobe/test/visual/sources Modified Files: client_assembler.cpp Log Message: factory_token_t no longer has any knowledge of adobe::window_t (which is good, because one of the things the factory mechanism allows is to not use any of ui_core). The pointer to a window_t in factory_token_t was used to make the window visible when all of it's child widgets had been created and inserted. A boost signal is now used to signal to the window to show (and the window proxies [dialog, palette] connect to the signal). Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** client_assembler.cpp 20 Apr 2005 20:34:08 -0000 1.3 --- client_assembler.cpp 20 Apr 2005 22:17:46 -0000 1.4 *************** *** 297,300 **** --- 297,301 ---- private: void resize_completed(long width, long height); + void show(); adobe::window_t window_m; *************** *** 317,321 **** private: ! adobe::window_t window_m; adobe::name_t target_m; --- 318,323 ---- private: ! void show(); ! adobe::window_t window_m; adobe::name_t target_m; *************** *** 2847,2852 **** if (grow_m) window_m.signal_resize_complete(boost::bind(&dialog_proxy_t::resize_completed, boost::ref(*this), _1, _2)); ! ! token.root_m = &window_m; } --- 2849,2860 ---- if (grow_m) window_m.signal_resize_complete(boost::bind(&dialog_proxy_t::resize_completed, boost::ref(*this), _1, _2)); ! // ! // This is a top-level container, so we hook it up to the show_window_signal ! // (so that it gets shown when all of the children have been made and inserted). ! // ! token.assemblage_m.hold_connection(token.show_window_signal_m.connect(boost::bind(&dialog_proxy_t::show, boost::ref(*this)))); ! #ifdef NDEBUG ! token.eve_m->set_debug_frame_proc(my_framer(window_m)); ! #endif } *************** *** 2879,2882 **** --- 2887,2898 ---- /****************************************************************************************************/ + void dialog_proxy_t::show() + { + window_m.set_visible(true); + window_m.draw_controls(); + } + + /****************************************************************************************************/ + #if 0 #pragma mark - *************** *** 2931,2936 **** display_token_m = adobe::get_main_display().root(); display_token_m = adobe::insert(adobe::get_main_display(), display_token_m, window_m); ! ! token.root_m = &window_m; } --- 2947,2958 ---- display_token_m = adobe::get_main_display().root(); display_token_m = adobe::insert(adobe::get_main_display(), display_token_m, window_m); ! // ! // This is a top-level container, so we hook it up to the show_window_signal. It ! // will get shown once all of the children have been created and inserted. ! // ! token.assemblage_m.hold_connection(token.show_window_signal_m.connect(boost::bind(&palette_proxy_t::show, boost::ref(*this)))); ! #ifdef NDEBUG ! token.eve_m->set_debug_frame_proc(my_framer(window_m)); ! #endif } *************** *** 2948,2951 **** --- 2970,2981 ---- /****************************************************************************************************/ + void palette_proxy_t::show() + { + window_m.set_visible(true); + window_m.draw_controls(); + } + + /****************************************************************************************************/ + #if 0 #pragma mark - *************** *** 3197,3202 **** sheet_m.update(); // Force values to their correct states. ! window_list_m.back()->window_m->set_visible(true); ! window_list_m.back()->window_m->draw_controls(); } --- 3227,3231 ---- sheet_m.update(); // Force values to their correct states. ! window_list_m.back()->show_window_m(); } *************** *** 3294,3298 **** adobe::eve_t* result_eve(new adobe::eve_t()); ! adobe::factory_token_t token(adobe::get_main_display(), result->assemblage_m, *result_eve, sheet, notifier, result->widget_stream_m, dialog_size); adobe::eve::parse(stream, adobe::line_position_t(file_name), adobe::eve::position_t(), --- 3323,3327 ---- adobe::eve_t* result_eve(new adobe::eve_t()); ! adobe::factory_token_t token(adobe::get_main_display(), result->assemblage_m, *result_eve, sheet, notifier, result->widget_stream_m, result->show_window_m, dialog_size); adobe::eve::parse(stream, adobe::line_position_t(file_name), adobe::eve::position_t(), *************** *** 3300,3327 **** boost::ref(*result_eve), boost::ref(token), _1, _3, boost::bind(adobe::eve::evaluate_arguments(), _4))); - #if 0 - adobe::eve_parser parser( boost::bind(&::client_assembler, - boost::ref(result->assemblage_m), - boost::ref(*result_eve), - boost::ref(token), - _1, _2, _3), - stream, file_name); - - parser.parse(); - #endif - result_eve->evaluate(adobe::eve_t::evaluate_flat); - #ifndef NDEBUG - result_eve->set_debug_frame_proc(my_framer(*token.root_m)); - #endif - result->eve_m = result_eve; - result->window_m = token.root_m; - result->assemblage_m.delete_on_destruction(result->eve_m); result->contributing_m = sheet.contributing(); - #if 0 - result->assemblage_m.delete_on_destruction(result->window_m); - #endif return result; --- 3329,3336 ---- |