|
From: Ralph T. <ra...@us...> - 2005-04-20 22:17:54
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22754/visual_refactor/adobe/test/visual/headers Modified Files: client_assembler.hpp factory.hpp 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: factory.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/factory.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** factory.hpp 20 Apr 2005 20:34:07 -0000 1.2 --- factory.hpp 20 Apr 2005 22:17:46 -0000 1.3 *************** *** 47,51 **** struct factory_token_t { ! factory_token_t(display_t& display, assemblage_t& assemblage, eve_t& layout, sheet_t& sheet, eve_client::button_notifier_t notifier, eve_client::serialize_signal_t& serialize_signal, size_enum_t dialog_size) : display_m(display), assemblage_m(assemblage), --- 47,51 ---- struct factory_token_t { ! factory_token_t(display_t& display, assemblage_t& assemblage, eve_t& layout, sheet_t& sheet, eve_client::button_notifier_t notifier, eve_client::serialize_signal_t& serialize_signal, eve_client::show_window_signal_t& show_signal, size_enum_t dialog_size) : display_m(display), assemblage_m(assemblage), *************** *** 54,58 **** notifier_m(notifier), widget_stream_m(serialize_signal), ! root_m(0) {} // --- 54,58 ---- notifier_m(notifier), widget_stream_m(serialize_signal), ! show_window_signal_m(show_signal) {} // *************** *** 94,109 **** size_enum_t dialog_size_m; // ! /// When a top-level widget is created (like a window), it sets this member ! /// to point to itself. This is the only part of factory_token_t which actually ! /// gets set by one of the factory functions. ! /// ! /// REVISIT (ralpht): This means that windows have to conform to adobe::window_t, ! /// which doesn't seem right. We only need the window to say "show ! /// yourself" when all of the child widgets have been created. ! /// ! /// Really we should make a window bind some methods in it's factory ! /// function to do everything we want to do with this pointer. // ! mutable adobe::window_t* root_m; }; /****************************************************************************************************/ --- 94,103 ---- size_enum_t dialog_size_m; // ! /// Top-level widgets (windows, dialogs, etc) need to be told to show themselves ! /// when all of the child widgets have been created and inserted. This signal ! /// is issued when the top-level window needs to be shown -- so any factory function ! /// which creates a window needs to connect to this signal. // ! eve_client::show_window_signal_t& show_window_signal_m; }; /****************************************************************************************************/ Index: client_assembler.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/client_assembler.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** client_assembler.hpp 20 Apr 2005 20:34:07 -0000 1.3 --- client_assembler.hpp 20 Apr 2005 22:17:46 -0000 1.4 *************** *** 104,107 **** --- 104,111 ---- /*************************************************************************************************/ + typedef boost::signal<void ()> show_window_signal_t; + + /*************************************************************************************************/ + class eve_client_holder : public boost::noncopyable { *************** *** 118,121 **** --- 122,126 ---- adobe::assemblage_t assemblage_m; adobe::dictionary_t contributing_m; + show_window_signal_t show_window_m; #ifndef NDEBUG |