You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(67) |
Apr
(455) |
May
(202) |
Jun
(136) |
Jul
(203) |
Aug
(60) |
Sep
(88) |
Oct
(64) |
Nov
(56) |
Dec
(78) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(271) |
Feb
(207) |
Mar
|
Apr
|
May
(167) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Foster B. <fos...@us...> - 2005-04-23 00:05:32
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1871/visual_refactor/adobe/test/visual Modified Files: visual.vcproj Log Message: Added xstr to asl_lib on Win32 Index: visual.vcproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/visual.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** visual.vcproj 18 Apr 2005 21:15:47 -0000 1.1 --- visual.vcproj 23 Apr 2005 00:05:22 -0000 1.2 *************** *** 39,42 **** --- 39,43 ---- LinkIncremental="2" AdditionalLibraryDirectories="..\..\build\boost_lib\bindebug;..\..\build\asl_lib_dev\bindebug" + IgnoreAllDefaultLibraries="FALSE" IgnoreDefaultLibraryNames="LIBCMTD" GenerateDebugInformation="TRUE" |
|
From: Ralph T. <ra...@us...> - 2005-04-22 23:47:46
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25463/visual_refactor/adobe/test/visual/headers Modified Files: client_assembler.hpp Log Message: Removed unused member variable from eve_client_holder (in client_assembler.cpp). Make xstr compile on MSVC2003 by including cctype. Index: client_assembler.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/client_assembler.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** client_assembler.hpp 22 Apr 2005 21:42:05 -0000 1.5 --- client_assembler.hpp 22 Apr 2005 23:47:35 -0000 1.6 *************** *** 137,141 **** */ adobe::eve_t* eve_m; - adobe::window_t* window_m; serialize_signal_t widget_stream_m; adobe::assemblage_t assemblage_m; --- 137,140 ---- *************** *** 144,148 **** #ifndef NDEBUG ! void clear_frames() { if (window_m) adobe::clear_extents_frames(*window_m); } #endif --- 143,147 ---- #ifndef NDEBUG ! void clear_frames() { /* REVISIT (ralpht): Do we need a clear_frames signal? */ } #endif |
|
From: Ralph T. <ra...@us...> - 2005-04-22 23:47:44
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25463/visual_refactor/adobe/source Modified Files: xstr.cpp Log Message: Removed unused member variable from eve_client_holder (in client_assembler.cpp). Make xstr compile on MSVC2003 by including cctype. Index: xstr.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/source/xstr.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** xstr.cpp 22 Apr 2005 23:02:31 -0000 1.4 --- xstr.cpp 22 Apr 2005 23:47:34 -0000 1.5 *************** *** 21,24 **** --- 21,25 ---- #include <sstream> #include <map> + #include <cctype> #if !defined(NDEBUG) && defined(ADOBE_SERIALIZATION) |
|
From: Foster B. <fos...@us...> - 2005-04-22 23:03:09
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1071/visual_refactor/adobe Modified Files: xstr.hpp Log Message: new xstring implementation; visual building again on Mac Index: xstr.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/xstr.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xstr.hpp 18 Apr 2005 21:15:35 -0000 1.1 --- xstr.hpp 22 Apr 2005 23:02:28 -0000 1.2 *************** *** 12,100 **** /*************************************************************************************************/ - #include <adobe/name_fwd.hpp> #include <adobe/dictionary_fwd.hpp> ! #include <adobe/algorithm.hpp> ! ! /*************************************************************************************************/ ! ! namespace adobe { ! /*************************************************************************************************/ ! class xstr_t; /*************************************************************************************************/ ! } // namespace adobe /*************************************************************************************************/ ! #if !defined(ADOBE_NO_DOCUMENTATION) ! ! void swap(adobe::xstr_t& x, adobe::xstr_t& y); ! #endif /*************************************************************************************************/ ! namespace adobe { ! /*************************************************************************************************/ ! class xstr_t ! { ! public: ! typedef std::pair<const char*, const char*> parse_range_t; ! explicit xstr_t(const char* xstr); ! xstr_t(const char* xstr, std::size_t n); ! xstr_t(const char* xstr, std::size_t n, const adobe::dictionary_t& context); ! #if !defined(ADOBE_NO_DOCUMENTATION) ! xstr_t(const xstr_t& rhs); ! ~xstr_t(); ! xstr_t& operator = (const xstr_t& rhs); ! #endif ! const char* get() const; ! static void assign_glossary(const parse_range_t& parse_range); ! static void append_glossary(const parse_range_t& parse_range); ! static void set_default_context(const adobe::dictionary_t& context); ! static adobe::dictionary_t get_default_context(); private: - - #if !defined(ADOBE_NO_DOCUMENTATION) - - friend void ::swap(adobe::xstr_t& x, adobe::xstr_t& y); - struct implementation_t; implementation_t* object_m; - - #endif - }; /*************************************************************************************************/ ! } // namespace adobe /*************************************************************************************************/ ! #if !defined(ADOBE_NO_DOCUMENTATION) ! ! inline void swap(adobe::xstr_t& x, adobe::xstr_t& y) ! { adobe::swap(x.object_m, y.object_m); } ! ! #endif /*************************************************************************************************/ --- 12,89 ---- /*************************************************************************************************/ #include <adobe/dictionary_fwd.hpp> ! #include <adobe/name.hpp> ! #include <boost/function.hpp> ! #include <string> ! #include <istream> ! #include <vector> /*************************************************************************************************/ ! namespace adobe { /*************************************************************************************************/ ! typedef std::pair<adobe::name_t, adobe::name_t> attribute_t; ! typedef std::vector<attribute_t> attribute_set_t; ! typedef boost::function<std::string ( const adobe::name_t&, ! const attribute_set_t&, ! const std::string& value)> xml_element_proc_t; /*************************************************************************************************/ ! // Add a file to the xstring glossary global singleton ! // (might have FILE and LINE parameters for debug info.) ! void xstring_glossary(std::istream& stream); ! void xstring_glossary(std::istream& stream, const adobe::dictionary_t& context); ! // Parses an XML fragment ! std::string parse_xml_fragment(const std::string& fragment, const xml_element_proc_t proc); ! // All of these functions return a valid XML fragment ! std::string xstring(const char* xstr); ! std::string xstring(const char* xstr, std::size_t n); ! std::string xstring(const std::string& xstr); ! std::string xstring(const char* xstr, const adobe::dictionary_t& context); ! std::string xstring(const char* xstr, std::size_t n, const adobe::dictionary_t& context); ! std::string xstring(const std::string& xstr, const adobe::dictionary_t& context); ! // Converts an xml fragment to utf-8, any unknown markup is stripped. ! std::string finalize_xml_fragment(const std::string& fragment); ! /*************************************************************************************************/ ! // sets the default context (default context is thread local storage) with a global base context that picks up platform and locale ! struct xstring_context_t ! { ! explicit xstring_context_t(const attribute_set_t&); ! ~xstring_context_t(); private: struct implementation_t; implementation_t* object_m; }; /*************************************************************************************************/ ! std::string xml_element_echo( const adobe::name_t& name, ! const adobe::attribute_set_t& attribute_set, ! const std::string& value); /*************************************************************************************************/ ! } // namespace adobe /*************************************************************************************************/ |
|
From: Foster B. <fos...@us...> - 2005-04-22 23:02:58
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1071/visual_refactor/adobe/test/visual/sources Modified Files: client_assembler.cpp express_viewer.cpp Log Message: new xstring implementation; visual building again on Mac Index: express_viewer.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/express_viewer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** express_viewer.cpp 18 Apr 2005 21:16:05 -0000 1.1 --- express_viewer.cpp 22 Apr 2005 23:02:32 -0000 1.2 *************** *** 16,19 **** --- 16,21 ---- #include <adobe/xstr.hpp> + #include "factory.hpp" + #ifndef NDEBUG #include <iostream> *************** *** 132,136 **** &simpleApplication::_editor_op, this, _1, _2 ), ! size_small_s ).release() ); // --- 134,139 ---- &simpleApplication::_editor_op, this, _1, _2 ), ! size_small_s, ! default_factory ).release() ); // *************** *** 144,149 **** // editor_sheet_s.update(); ! editor_view_s->window_m->set_visible( true ); ! editor_view_s->window_m->draw_controls(); #elif ADOBE_PLATFORM_WIN --- 147,151 ---- // editor_sheet_s.update(); ! editor_view_s->show_window_m(); #elif ADOBE_PLATFORM_WIN *************** *** 296,309 **** void simpleApplication::_load_metrics_glossary() { ! adobe::dictionary_t default_context(adobe::xstr_t::get_default_context()); ! default_context.write()[adobe::static_name_t("theme")] = adobe::value_t(adobe::static_name_t("normal")); ! adobe::xstr_t::set_default_context(default_context); ! std::ifstream metrics_glossary( ( _resource_dir_m / "metrics_glossary.xstr" ).native_file_string().c_str() ); ! std::string glossary(stream_sucker(metrics_glossary)); ! adobe::xstr_t::assign_glossary(std::make_pair(&glossary[0], &glossary[0] + glossary.size())); } #endif --- 298,310 ---- void simpleApplication::_load_metrics_glossary() { ! attribute_set_t widget_context; ! widget_context.push_back(std::make_pair(adobe::static_name_t("theme"), adobe::static_name_t("normal"))); ! adobe::xstring_context_t local_context(widget_context); ! std::ifstream metrics_glossary( ( _resource_dir_m / "metrics_glossary.xstr" ).native_file_string().c_str() ); ! adobe::xstring_glossary(metrics_glossary); } #endif Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** client_assembler.cpp 22 Apr 2005 21:42:06 -0000 1.8 --- client_assembler.cpp 22 Apr 2005 23:02:32 -0000 1.9 *************** *** 985,989 **** // typedef int widget_type_t; ! explicit column_proxy_t(const adobe::dictionary_t& parameters, const adobe::factory_token_t& token, const adobe::widget_node_t& parent) : client_proxy_t(parameters), control_m(0) { --- 985,989 ---- // typedef int widget_type_t; ! explicit column_proxy_t(const adobe::dictionary_t& parameters, const adobe::factory_token_t&, const adobe::widget_node_t& parent) : client_proxy_t(parameters), control_m(0) { *************** *** 1018,1022 **** // typedef int widget_type_t; ! explicit row_proxy_t(const adobe::dictionary_t& parameters, const adobe::factory_token_t& token, const adobe::widget_node_t& parent) : client_proxy_t(parameters), control_m(0) { --- 1018,1022 ---- // typedef int widget_type_t; ! explicit row_proxy_t(const adobe::dictionary_t& parameters, const adobe::factory_token_t&, const adobe::widget_node_t& parent) : client_proxy_t(parameters), control_m(0) { *************** *** 1049,1053 **** typedef int widget_type_t; ! explicit overlay_proxy_t(const adobe::dictionary_t& parameters, const adobe::factory_token_t& token, const adobe::widget_node_t& parent) : client_proxy_t(parameters), control_m(0) { --- 1049,1053 ---- typedef int widget_type_t; ! explicit overlay_proxy_t(const adobe::dictionary_t& parameters, const adobe::factory_token_t&, const adobe::widget_node_t& parent) : client_proxy_t(parameters), control_m(0) { *************** *** 3463,3476 **** /****************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( const char* file_name, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory) { ! std::ifstream stream(file_name); adobe::auto_ptr<eve_client_holder> result(new eve_client_holder()); ! 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); // // We set the initial parent to be the root of the main display, an --- 3463,3476 ---- /****************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( const char* file_name, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory) { ! std::ifstream stream(file_name); adobe::auto_ptr<eve_client_holder> result(new eve_client_holder()); ! 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); // // We set the initial parent to be the root of the main display, an |
|
From: Foster B. <fos...@us...> - 2005-04-22 23:02:58
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1071/visual_refactor/adobe/test/visual/sources/mac Modified Files: metrics.cpp Log Message: new xstring implementation; visual building again on Mac Index: metrics.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/mac/metrics.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** metrics.cpp 18 Apr 2005 21:16:05 -0000 1.1 --- metrics.cpp 22 Apr 2005 23:02:32 -0000 1.2 *************** *** 32,36 **** #if 0 ! #pragma mark - #endif --- 32,36 ---- #if 0 ! #pragma mark - #endif *************** *** 47,53 **** try { ! const char* cxstr(xstr.c_str()); ! std::size_t n(xstr.size()); ! std::stringstream expression_stream(std::string(xstr_t(cxstr, n, context).get())); expression_parser parser(expression_stream, line_position_t("widget_metrics")); array_t expression; --- 47,61 ---- try { ! attribute_set_t widget_context; ! ! widget_context.push_back(std::make_pair(adobe::static_name_t("theme"), adobe::static_name_t("normal"))); ! ! adobe::xstring_context_t local_context(widget_context); ! ! std::string resolved_xstr(adobe::xstring(xstr, context)); ! ! if (resolved_xstr.empty()) return result; ! ! std::stringstream expression_stream(resolved_xstr); expression_parser parser(expression_stream, line_position_t("widget_metrics")); array_t expression; |
|
From: Foster B. <fos...@us...> - 2005-04-22 23:02:42
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1071/visual_refactor/adobe/test/visual/resources Modified Files: editor.eve Log Message: new xstring implementation; visual building again on Mac Index: editor.eve =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/resources/editor.eve,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editor.eve 18 Apr 2005 21:16:04 -0000 1.1 --- editor.eve 22 Apr 2005 23:02:31 -0000 1.2 *************** *** 15,19 **** ]) { ! panel() { edit_text(bind: @adam_expression, characters: 80, lines: 10, scrollable: true, monospaced: true, horizontal: align_fill, vertical: align_fill); --- 15,19 ---- ]) { ! panel(bind: @tab_group_visible, value: @adam_stuff) { edit_text(bind: @adam_expression, characters: 80, lines: 10, scrollable: true, monospaced: true, horizontal: align_fill, vertical: align_fill); *************** *** 21,25 **** } ! panel() { edit_text(bind: @eve_expression, characters: 80, lines: 10, scrollable: true, monospaced: true, horizontal: align_fill, vertical: align_fill); --- 21,25 ---- } ! panel(bind: @tab_group_visible, value: @eve_stuff) { edit_text(bind: @eve_expression, characters: 80, lines: 10, scrollable: true, monospaced: true, horizontal: align_fill, vertical: align_fill); *************** *** 27,31 **** } ! panel() { row(vertical: align_top, horizontal: align_fill) --- 27,31 ---- } ! panel(bind: @tab_group_visible, value: @inspector_stuff) { row(vertical: align_top, horizontal: align_fill) *************** *** 44,53 **** } ! panel() { edit_text(bind: @results_expression, characters: 80, lines: 10, scrollable: true, monospaced: true, horizontal: align_fill, vertical: align_fill); } ! panel() { edit_text(bind: @errors_expression, characters: 80, lines: 10, scrollable: true, monospaced: true, horizontal: align_fill, vertical: align_fill); --- 44,53 ---- } ! panel(bind: @tab_group_visible, value: @results_stuff) { edit_text(bind: @results_expression, characters: 80, lines: 10, scrollable: true, monospaced: true, horizontal: align_fill, vertical: align_fill); } ! panel(bind: @tab_group_visible, value: @errors_stuff) { edit_text(bind: @errors_expression, characters: 80, lines: 10, scrollable: true, monospaced: true, horizontal: align_fill, vertical: align_fill); |
|
From: Foster B. <fos...@us...> - 2005-04-22 23:02:42
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/build/boost_lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1071/visual_refactor/adobe/build/boost_lib Modified Files: boost_lib.mcp Log Message: new xstring implementation; visual building again on Mac Index: boost_lib.mcp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/build/boost_lib/boost_lib.mcp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsU8DNtZ and /tmp/cvslsBbUl differ |
|
From: Foster B. <fos...@us...> - 2005-04-22 23:02:42
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1071/visual_refactor/adobe/source Modified Files: xstr.cpp Log Message: new xstring implementation; visual building again on Mac Index: xstr.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/source/xstr.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xstr.cpp 19 Apr 2005 23:05:04 -0000 1.3 --- xstr.cpp 22 Apr 2005 23:02:31 -0000 1.4 *************** *** 10,43 **** #include <adobe/config.hpp> - #include <adobe/name.hpp> #include <adobe/dictionary.hpp> #include <adobe/once.hpp> ! #include <adobe/algorithm.hpp> ! #include <adobe/functional.hpp> ! ! #include <vector> ! #include <map> [...2576 lines suppressed...] + ~implementation_t() + { + get_thread_attributes() = attribute_set_m; + } + + private: + attribute_set_t attribute_set_m; + }; + + /*************************************************************************************************/ + + xstring_context_t::xstring_context_t(const attribute_set_t& attribute_set) : + object_m(new implementation_t(attribute_set)) + { } + + xstring_context_t::~xstring_context_t() + { delete object_m; } + /*************************************************************************************************/ |
|
From: Ralph T. <ra...@us...> - 2005-04-22 21:42:15
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22678/visual_refactor/adobe/test/visual/sources Modified Files: client_assembler.cpp Log Message: window_server_t now takes a function to work as the widget factory. This completes the factory work on visual (aside from fixing any regressions I have introduced with this work). The next steps are to remove the proxies and factory functions into a file called factory.cpp, and add a "libvisual" target (and probably move the adobe begin stuff out into another directory). Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** client_assembler.cpp 22 Apr 2005 20:17:09 -0000 1.7 --- client_assembler.cpp 22 Apr 2005 21:42:06 -0000 1.8 *************** *** 3316,3327 **** /****************************************************************************************************/ ! boost::any client_assembler(adobe::factory_token_t& token, const boost::any& parent, adobe::name_t class_name, const adobe::dictionary_t& arguments) { // ! // REVISIT (ralpht): It looks almost like boost::bind could replace the ! // client assembler. The only change due here is to use the factory ! // function given to window_server_t rather than default_factory. // ! return default_factory(class_name, arguments, boost::any_cast<adobe::widget_node_t>(parent), token); } --- 3316,3325 ---- /****************************************************************************************************/ ! boost::any client_assembler(adobe::factory_token_t& token, const boost::any& parent, adobe::name_t class_name, const adobe::dictionary_t& arguments, adobe::widget_factory_proc_t my_factory) { // ! // Notice that we use the supplied factory to create widgets. // ! return my_factory(class_name, arguments, boost::any_cast<adobe::widget_node_t>(parent), token); } *************** *** 3338,3342 **** window_server_t::window_server_t(const char* directory_path, adobe::sheet_t& sheet) : directory_path_m(directory_path), ! sheet_m(sheet) { } --- 3336,3341 ---- window_server_t::window_server_t(const char* directory_path, adobe::sheet_t& sheet) : directory_path_m(directory_path), ! sheet_m(sheet), ! widget_factory_m(adobe::default_factory) { } *************** *** 3362,3369 **** window_list_m.back() = make_view( (directory_path_m + "/" + file_name).c_str(), ! sheet_m, ! boost::bind(&window_server_t::dispatch_window_action, ! boost::ref(*this), window, _1, _2), ! dialog_size).release(); sheet_m.update(); // Force values to their correct states. --- 3361,3369 ---- window_list_m.back() = make_view( (directory_path_m + "/" + file_name).c_str(), ! sheet_m, ! boost::bind(&window_server_t::dispatch_window_action, ! boost::ref(*this), window, _1, _2), ! dialog_size, ! widget_factory_m).release(); sheet_m.update(); // Force values to their correct states. *************** *** 3382,3385 **** --- 3382,3392 ---- /****************************************************************************************************/ + void window_server_t::set_widget_factory(adobe::widget_factory_proc_t proc) + { + widget_factory_m = proc; + } + + /****************************************************************************************************/ + void window_server_t::set_action_fallback(action_fallback_proc_t proc) { *************** *** 3456,3470 **** /****************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( const char* file_name, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size) { ! std::ifstream stream(file_name); adobe::auto_ptr<eve_client_holder> result(new eve_client_holder()); ! ! 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); ! // // We set the initial parent to be the root of the main display, an --- 3463,3476 ---- /****************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( const char* file_name, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory) { ! std::ifstream stream(file_name); adobe::auto_ptr<eve_client_holder> result(new eve_client_holder()); ! 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); // // We set the initial parent to be the root of the main display, an *************** *** 3473,3477 **** adobe::eve::parse(stream, adobe::line_position_t(file_name), adobe::widget_node_t(dialog_size, adobe::eve_t::iterator(), adobe::get_main_display().root()), ! boost::bind(&::client_assembler, boost::ref(token), _1, _3, boost::bind(adobe::eve::evaluate_arguments(), _4))); result_eve->evaluate(adobe::eve_t::evaluate_flat); --- 3479,3484 ---- adobe::eve::parse(stream, adobe::line_position_t(file_name), adobe::widget_node_t(dialog_size, adobe::eve_t::iterator(), adobe::get_main_display().root()), ! boost::bind(&::client_assembler, boost::ref(token), _1, _3, boost::bind(adobe::eve::evaluate_arguments(), _4), ! factory)); result_eve->evaluate(adobe::eve_t::evaluate_flat); |
|
From: Ralph T. <ra...@us...> - 2005-04-22 21:42:14
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22678/visual_refactor/adobe/test/visual/headers Modified Files: client_assembler.hpp factory.hpp Log Message: window_server_t now takes a function to work as the widget factory. This completes the factory work on visual (aside from fixing any regressions I have introduced with this work). The next steps are to remove the proxies and factory functions into a file called factory.cpp, and add a "libvisual" target (and probably move the adobe begin stuff out into another directory). Index: factory.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/factory.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** factory.hpp 22 Apr 2005 20:17:08 -0000 1.5 --- factory.hpp 22 Apr 2005 21:42:05 -0000 1.6 *************** *** 140,147 **** // widget_node_t default_factory(adobe::name_t name, const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); - // - /// This is the type of function which must be implemented by widget factories. - // - typedef widget_node_t (*widget_factory_t)(adobe::name_t, const dictionary_t&, const widget_node_t&, const factory_token_t&); /****************************************************************************************************/ // --- 140,143 ---- Index: client_assembler.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/client_assembler.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** client_assembler.hpp 20 Apr 2005 22:17:46 -0000 1.4 --- client_assembler.hpp 22 Apr 2005 21:42:05 -0000 1.5 *************** *** 42,45 **** --- 42,62 ---- /*************************************************************************************************/ + namespace adobe { + + /*************************************************************************************************/ + /* + These are forward definitions for structures which the factory function + uses. They are defined in factory.hpp. + */ + struct factory_token_t; + struct widget_node_t; + typedef boost::function<widget_node_t (name_t, const dictionary_t&, const widget_node_t&, const factory_token_t&)> widget_factory_proc_t; + + /*************************************************************************************************/ + + } + + /*************************************************************************************************/ + namespace eve_client { *************** *** 73,76 **** --- 90,94 ---- #endif + void set_widget_factory(adobe::widget_factory_proc_t proc); void set_action_fallback(action_fallback_proc_t proc); void serialize_widgets(std::ostream& s); *************** *** 92,95 **** --- 110,114 ---- window_list_t window_list_m; action_fallback_proc_t fallback_m; + adobe::widget_factory_proc_t widget_factory_m; }; *************** *** 129,144 **** private: ! friend adobe::auto_ptr<eve_client_holder> make_view(const char* file_name, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size); }; /*************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( const char* file_name, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size); /*************************************************************************************************/ --- 148,165 ---- private: ! friend adobe::auto_ptr<eve_client_holder> make_view( const char* file_name, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory); }; /*************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( const char* file_name, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory); /*************************************************************************************************/ |
|
From: Ralph T. <ra...@us...> - 2005-04-22 20:17:20
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8191/visual_refactor/adobe/test/visual/sources Modified Files: client_assembler.cpp Log Message: The widget size now comes from the parent by default (rather than from the token). Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** client_assembler.cpp 22 Apr 2005 19:29:20 -0000 1.6 --- client_assembler.cpp 22 Apr 2005 20:17:09 -0000 1.7 *************** *** 829,833 **** void set_up_control(client_proxy_t& local, Widget& control, const adobe::widget_node_t& parent, const adobe::factory_token_t& token) { ! local.size_m = token.dialog_size_m; adobe::ui_core_interface::adorn_theme(control, size_to_theme(local.size_m)); --- 829,833 ---- void set_up_control(client_proxy_t& local, Widget& control, const adobe::widget_node_t& parent, const adobe::factory_token_t& token) { ! local.size_m = parent.size_m; adobe::ui_core_interface::adorn_theme(control, size_to_theme(local.size_m)); *************** *** 989,993 **** { display_token_m = parent.display_token_m; ! size_m = token.dialog_size_m; } --- 989,993 ---- { display_token_m = parent.display_token_m; ! size_m = parent.size_m; } *************** *** 1022,1026 **** { display_token_m = parent.display_token_m; ! size_m = token.dialog_size_m; } --- 1022,1026 ---- { display_token_m = parent.display_token_m; ! size_m = parent.size_m; } *************** *** 1053,1057 **** { display_token_m = parent.display_token_m; ! size_m = token.dialog_size_m; } --- 1053,1057 ---- { display_token_m = parent.display_token_m; ! size_m = parent.size_m; } *************** *** 2773,2777 **** const adobe::widget_node_t& parent) : client_proxy_t(parameters), ! control_m(name_m, adobe::value_t(true), adobe::value_t(false), size_to_theme(token.dialog_size_m)), last_m(0) { --- 2773,2777 ---- const adobe::widget_node_t& parent) : client_proxy_t(parameters), ! control_m(name_m, adobe::value_t(true), adobe::value_t(false), size_to_theme(parent.size_m)), last_m(0) { *************** *** 2872,2876 **** layout_m = &token.layout_m; ! size_m = token.dialog_size_m; adobe::window_attributes_t attributes(adobe::window_attributes_standard_handler_s); --- 2872,2876 ---- layout_m = &token.layout_m; ! size_m = parent.size_m; adobe::window_attributes_t attributes(adobe::window_attributes_standard_handler_s); *************** *** 2973,2977 **** parameters.get<bool>(key_metal, metal); ! size_m = token.dialog_size_m; adobe::window_attributes_t attributes(adobe::window_attributes_standard_handler_s); --- 2973,2977 ---- parameters.get<bool>(key_metal, metal); ! size_m = parent.size_m; adobe::window_attributes_t attributes(adobe::window_attributes_standard_handler_s); *************** *** 3145,3155 **** wire_to_eve(const adobe::factory_token_t& token, const adobe::widget_node_t& parent, const adobe::dictionary_t& parameters) { - // The view_proxy_t will be owned by Eve. We are only interested in deleting the proxy object. - // - // REVISIT (ralpht): I still don't understand why auto_new_proxy is here. - // adobe::eve_t::signal_suite_t signals; ! adobe::auto_ptr<T> auto_new_proxy(new T(parameters, token, parent)); ! T* new_proxy(auto_new_proxy.get()); signals.eve_container_defaults_proc_m = optional_container_defaults<T>(); --- 3145,3150 ---- wire_to_eve(const adobe::factory_token_t& token, const adobe::widget_node_t& parent, const adobe::dictionary_t& parameters) { adobe::eve_t::signal_suite_t signals; ! T* new_proxy(new T(parameters, token, parent)); signals.eve_container_defaults_proc_m = optional_container_defaults<T>(); *************** *** 3158,3173 **** signals.eve_place_proc_m = boost::bind(&adobe::eve_interface::place<T>, boost::ref(*new_proxy), _1, _2); ! new_proxy->eve_token_m = token.layout_m.add_view_element( parent.eve_token_m, ! adobe::eve_t::insert_element_t( ! optional_container_defaults<T>::is_container, ! parameters, ! signals) ! ); ! token.assemblage_m.delete_on_destruction(new_proxy); ! auto_new_proxy.release(); ! ! return adobe::widget_node_t(new_proxy->eve_token_m, new_proxy->display_token_m); } --- 3153,3166 ---- signals.eve_place_proc_m = boost::bind(&adobe::eve_interface::place<T>, boost::ref(*new_proxy), _1, _2); ! new_proxy->eve_token_m = ! token.layout_m.add_view_element(parent.eve_token_m, ! adobe::eve_t::insert_element_t( ! optional_container_defaults<T>::is_container, ! parameters, ! signals) ! ); token.assemblage_m.delete_on_destruction(new_proxy); ! return adobe::widget_node_t(new_proxy->size_m, new_proxy->eve_token_m, new_proxy->display_token_m); } *************** *** 3326,3337 **** { // ! // If we don't have any parent (which is the case the first time ! // this function is called), then we make one up. // ! return default_factory(class_name, arguments, ! parent.empty() ? ! adobe::widget_node_t(adobe::eve_t::iterator(), adobe::get_main_display().root()) : ! boost::any_cast<adobe::widget_node_t>(parent), ! token); } --- 3319,3327 ---- { // ! // REVISIT (ralpht): It looks almost like boost::bind could replace the ! // client assembler. The only change due here is to use the factory ! // function given to window_server_t rather than default_factory. // ! return default_factory(class_name, arguments, boost::any_cast<adobe::widget_node_t>(parent), token); } *************** *** 3475,3481 **** 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(), boost::bind(&::client_assembler, boost::ref(token), _1, _3, boost::bind(adobe::eve::evaluate_arguments(), _4))); --- 3465,3476 ---- 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); ! // ! // We set the initial parent to be the root of the main display, an ! // empty eve iterator and the given dialog size. ! // ! adobe::eve::parse(stream, adobe::line_position_t(file_name), ! adobe::widget_node_t(dialog_size, adobe::eve_t::iterator(), adobe::get_main_display().root()), boost::bind(&::client_assembler, boost::ref(token), _1, _3, boost::bind(adobe::eve::evaluate_arguments(), _4))); |
|
From: Ralph T. <ra...@us...> - 2005-04-22 20:17:18
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8191/visual_refactor/adobe/test/visual/headers Modified Files: factory.hpp Log Message: The widget size now comes from the parent by default (rather than from the token). Index: factory.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/factory.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** factory.hpp 22 Apr 2005 07:32:51 -0000 1.4 --- factory.hpp 22 Apr 2005 20:17:08 -0000 1.5 *************** *** 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), --- 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) : display_m(display), assemblage_m(assemblage), *************** *** 90,97 **** eve_client::serialize_signal_t& widget_stream_m; // - /// This specifies the size of the widgets to be used in the window. - // - 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 --- 90,93 ---- *************** *** 109,116 **** struct widget_node_t { ! widget_node_t(const eve_t::iterator& eve_token, const display_t::position_t& display_token) ! : eve_token_m(eve_token), display_token_m(display_token) { } // /// The parent as known by Eve. // --- 105,117 ---- struct widget_node_t { ! widget_node_t(size_enum_t size, const eve_t::iterator& eve_token, const display_t::position_t& display_token) ! : size_m(size), eve_token_m(eve_token), display_token_m(display_token) { } // + /// This specifies the size of this widget. Children will use this to find the + /// size they should use (unless they have an explicit size specified). + // + size_enum_t size_m; + // /// The parent as known by Eve. // |
|
From: Ralph T. <ra...@us...> - 2005-04-22 19:29:29
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14935/visual_refactor/adobe/test/visual/sources Modified Files: client_assembler.cpp Log Message: Small partial fix for tab control children's visibility. @bind and @value need to be set for children of tab controls now. Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** client_assembler.cpp 22 Apr 2005 07:32:52 -0000 1.5 --- client_assembler.cpp 22 Apr 2005 19:29:20 -0000 1.6 *************** *** 2341,2346 **** client_proxy_t(parameters) { - //tab_group_proxy_t* tab_parent(dynamic_cast<tab_group_proxy_t*>(parent)); // maybe our parent is a tab group? - parameters.get(key_value, show_value_m); --- 2341,2344 ---- *************** *** 2350,2375 **** set_up_control(*this, control_m, parent, token); - // ! // REVISIT (ralpht): Uh-oh. I need to think about this before I have any idea how to ! // fix it. Doing a dynamic_cast on anything is not a real solution. // - - /* - if (show_value_m.type() == typeid(adobe::empty_t)) - { - if (tab_parent && tab_parent->panel_index_m < tab_parent->items_m.size()) - show_value_m = tab_parent->items_m[tab_parent->panel_index_m++].get<adobe::dictionary_t>()[key_value]; - } - - if (!bind_m) - { - if (tab_parent) - bind_m = tab_parent->bind_m; - } - if (bind_m) token.assemblage_m.hold_connection(sheet_m->monitor_value(bind_m, boost::bind(&panel_proxy_t::monitor_value, boost::ref(*this), _1))); - */ } --- 2348,2363 ---- set_up_control(*this, control_m, parent, token); // ! // REVISIT (ralpht): It used to be the case that panels would automatically ! // figure out if they had a tab_control parent, and then bind ! // to the tab control's visibility cell in the Adam sheet. No ! // more! Now you have to tell the panel to bind against the ! // visibility cell and which value it should show for. We might ! // be able to do something clever with signals, or make the ! // client_assembler manipulate incoming parameters for children ! // of tab controls. // if (bind_m) token.assemblage_m.hold_connection(sheet_m->monitor_value(bind_m, boost::bind(&panel_proxy_t::monitor_value, boost::ref(*this), _1))); } |
|
From: Ralph T. <ra...@us...> - 2005-04-22 19:29:28
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14935/visual_refactor/adobe/test/visual/examples Modified Files: tabs_and_panels.eve Log Message: Small partial fix for tab control children's visibility. @bind and @value need to be set for children of tab controls now. Index: tabs_and_panels.eve =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/examples/tabs_and_panels.eve,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tabs_and_panels.eve 18 Apr 2005 21:15:48 -0000 1.1 --- tabs_and_panels.eve 22 Apr 2005 19:29:20 -0000 1.2 *************** *** 12,31 **** ]) { ! panel() { static_text(name: "I am the first panel", vertical: align_center, horizontal: align_center); } ! panel() { static_text(name: "I am the second panel", vertical: align_center, horizontal: align_center); } ! panel() { static_text(name: "I am the last panel. Save the best for last!", horizontal: align_center); radio_button(name: "Don't click me!", bind: @tab_group_visible, value: @na); } ! panel(value: @na) { radio_button(name: "Told you not to click that...", bind: @tab_group_visible, value: @second); --- 12,31 ---- ]) { ! panel(value: @first, bind: @tab_group_visible) { static_text(name: "I am the first panel", vertical: align_center, horizontal: align_center); } ! panel(value: @second, bind: @tab_group_visible) { static_text(name: "I am the second panel", vertical: align_center, horizontal: align_center); } ! panel(value: @third, bind: @tab_group_visible) { static_text(name: "I am the last panel. Save the best for last!", horizontal: align_center); radio_button(name: "Don't click me!", bind: @tab_group_visible, value: @na); } ! panel(value: @na, bind: @tab_group_visible) { radio_button(name: "Told you not to click that...", bind: @tab_group_visible, value: @second); |
|
From: Ralph T. <ra...@us...> - 2005-04-22 07:33:03
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6014/visual_refactor/adobe/test/visual/headers Modified Files: factory.hpp Log Message: Factory is mostly done. This change adds in the factory functions, and makes client_assembler directly call the main factory function (eventually it will call a developer-supplied function for creating widgets). Unfortunately I think that it may break panels inside tab widgets. Hopefully I will be able to finish this work off by the end of the week, and we'll be able to think about merging it back into the main sandbox. Index: factory.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/factory.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** factory.hpp 20 Apr 2005 22:17:46 -0000 1.3 --- factory.hpp 22 Apr 2005 07:32:51 -0000 1.4 *************** *** 103,106 **** --- 103,127 ---- /****************************************************************************************************/ // + /// This structure represents a widget registered into Eve and the display. If a widget is + /// a parent then this information is used for inserting child widgets and correctly calculating + /// sizes. + // + struct widget_node_t + { + widget_node_t(const eve_t::iterator& eve_token, const display_t::position_t& display_token) + : eve_token_m(eve_token), display_token_m(display_token) + { } + // + /// The parent as known by Eve. + // + eve_t::iterator eve_token_m; + // + /// The parent as known by the display. This should *not* be mutable -- for now it's more + /// convenient. + // + mutable display_t::position_t display_token_m; + }; + /****************************************************************************************************/ + // /// This is the main factory function. It will create the named widget (if possible) /// and insert it into the parent. If the widget named is unknown, or the parent is *************** *** 113,129 **** /// \param token a factory token, containing appropriate references. /// ! /// \return the newly created widget. This opaque position_t should not need to ! /// be poked at by client code -- everything it needs to do should have ! /// been set up by this factory function (e.g.: binding to cells in the ! /// token's sheet). // ! eve::position_t default_factory(std::string name, const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a window widget with the given parameters, and insert it into the /// given parent. /// /// \param parameters a dictionary of parameters for the new window. ! /// \param parent the parent widget for this button, may be zero. /// \param token a factory token, containing approprate references. /// --- 134,195 ---- /// \param token a factory token, containing appropriate references. /// ! /// \return the position of the newly created widget in the display. This parameter is used ! /// to insert children into -- leaf widgets (i.e.: those which can never have children) ! /// may return zero here. // ! widget_node_t default_factory(adobe::name_t name, const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); ! // ! /// This is the type of function which must be implemented by widget factories. ! // ! typedef widget_node_t (*widget_factory_t)(adobe::name_t, const dictionary_t&, const widget_node_t&, const factory_token_t&); /****************************************************************************************************/ // ! /// Create a row container with the given parameters, and insert it into the ! /// given parent. ! /// ! /// \param parameters a dictionary of parameters for the row. ! /// \param parent the parent of the row. ! /// \param token a factory token, containing approprate references. ! /// ! /// \return the node information for the created row. There is nothing to modify ! /// once the row has been created, so the general widget_info_t is not ! /// returned. ! // ! widget_node_t row_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); ! /****************************************************************************************************/ ! // ! /// Create a column container with the given parameters, and insert it into the ! /// given parent. ! /// ! /// \param parameters a dictionary of parameters for the column. ! /// \param parent the parent of the column. ! /// \param token a factory token, containing approprate references. ! /// ! /// \return the node information for the created column. There is nothing to modify ! /// once the column has been created, so the general widget_info_t is not ! /// returned. ! // ! widget_node_t column_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); ! /****************************************************************************************************/ ! // ! /// Create an overlay container with the given parameters, and insert it into the ! /// given parent. ! /// ! /// \param parameters a dictionary of parameters for the overlay. ! /// \param parent the parent of the overlay. ! /// \param token a factory token, containing approprate references. ! /// ! /// \return the node information for the created overlay. There is nothing to modify ! /// once the overlay has been created, so the general widget_info_t is not ! /// returned. ! // ! widget_node_t overlay_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); ! /****************************************************************************************************/ ! // ! /// Create a dialog widget with the given parameters, and insert it into the /// given parent. /// /// \param parameters a dictionary of parameters for the new window. ! /// \param parent the parent of the new window -- get_main_display().root() is good. /// \param token a factory token, containing approprate references. /// *************** *** 132,142 **** /// not be valid after the assemblage has been released. // ! window_t* window_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ ! /// Create a group widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new group. ! /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. /// --- 198,209 ---- /// not be valid after the assemblage has been released. // ! widget_node_t dialog_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ ! // ! /// Create a palette widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new window. ! /// \param parent the parent of the new window -- get_main_display().root() is good. /// \param token a factory token, containing approprate references. /// *************** *** 145,156 **** /// not be valid after the assemblage has been released. // ! button_t* group_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a tab group widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new tab group. ! /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. /// --- 212,223 ---- /// not be valid after the assemblage has been released. // ! widget_node_t palette_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a button widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new button. ! /// \param parent the parent position for this button, may not be zero. /// \param token a factory token, containing approprate references. /// *************** *** 159,169 **** /// not be valid after the assemblage has been released. // ! tab_group_t* tab_group_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a button widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new button. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 226,236 ---- /// not be valid after the assemblage has been released. // ! widget_node_t button_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a check box widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new check box. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 173,183 **** /// not be valid after the assemblage has been released. // ! button_t* button_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a panel widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new panel. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 240,250 ---- /// not be valid after the assemblage has been released. // ! widget_node_t checkbox_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a radio button widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new radio button. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 187,197 **** /// not be valid after the assemblage has been released. // ! panel_t* panel_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a radio button widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new radio button. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 254,264 ---- /// not be valid after the assemblage has been released. // ! widget_node_t radio_button_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a edit text widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new edit text. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 201,211 **** /// not be valid after the assemblage has been released. // ! radio_button_t* radio_button_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a check box widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new check box. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 268,278 ---- /// not be valid after the assemblage has been released. // ! widget_node_t edit_text_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a edit number widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new edit number. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 215,225 **** /// not be valid after the assemblage has been released. // ! checkbox_t* check_box_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a link widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new link. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 282,292 ---- /// not be valid after the assemblage has been released. // ! widget_node_t edit_number_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a static text widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new static text. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 229,239 **** /// not be valid after the assemblage has been released. // ! link_t* link_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a progress bar widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new progress bar. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 296,306 ---- /// not be valid after the assemblage has been released. // ! widget_node_t static_text_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a popup widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new popup. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 243,253 **** /// not be valid after the assemblage has been released. // ! progress_bar_t* progress_bar_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a separator widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new separator. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 310,333 ---- /// not be valid after the assemblage has been released. // ! widget_node_t popup_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ + /// Create a group widget with the given parameters, and insert it into the + /// given parent. + /// + /// \param parameters a dictionary of parameters for the new group. + /// \param parent the parent widget for this button, may not be zero. + /// \param token a factory token, containing approprate references. + /// + /// \return the newly created widget. This pointer will have been added to the + /// assemblage's (in the token) list of things to delete, so it will + /// not be valid after the assemblage has been released. // ! widget_node_t group_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); ! /****************************************************************************************************/ ! // ! /// Create a slider widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new slider. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 257,267 **** /// not be valid after the assemblage has been released. // ! separator_t* separator_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a static text widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new static text. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 337,347 ---- /// not be valid after the assemblage has been released. // ! widget_node_t slider_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a separator widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new separator. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 271,281 **** /// not be valid after the assemblage has been released. // ! static_text_t* static_text_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a edit text widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new edit text. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 351,361 ---- /// not be valid after the assemblage has been released. // ! widget_node_t separator_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a link widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new link. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 285,295 **** /// not be valid after the assemblage has been released. // ! edit_text_t* edit_text_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a popup widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new popup. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 365,375 ---- /// not be valid after the assemblage has been released. // ! widget_node_t link_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a progress bar widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new progress bar. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 299,309 **** /// not be valid after the assemblage has been released. // ! popup_t* popup_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a unit edit text widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new unit edit text. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 379,389 ---- /// not be valid after the assemblage has been released. // ! widget_node_t progress_bar_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a tab group widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new tab group. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 313,323 **** /// not be valid after the assemblage has been released. // ! unit_edit_text_t* unit_edit_text_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a slider widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new slider. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. --- 393,403 ---- /// not be valid after the assemblage has been released. // ! widget_node_t tab_group_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // ! /// Create a panel widget with the given parameters, and insert it into the /// given parent. /// ! /// \param parameters a dictionary of parameters for the new panel. /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. *************** *** 327,333 **** /// not be valid after the assemblage has been released. // ! slider_t* slider_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ // /// Create a bevel button widget with the given parameters, and insert it into the /// given parent. --- 407,423 ---- /// not be valid after the assemblage has been released. // ! widget_node_t panel_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); /****************************************************************************************************/ // + /// This enumeration is for the different types of bevel button. + // + enum bevel_button_enum_t + { + button_s, ///< The bevel button should be a button. + checkbox_s, ///< The bevel button should emulate a checkbox (bistate button). + radio_button_s, ///< The bevel button should emulate a radio button. + popup_s ///< The bevel button should have a popup. + }; + // /// Create a bevel button widget with the given parameters, and insert it into the /// given parent. *************** *** 336,339 **** --- 426,430 ---- /// \param parent the parent widget for this button, may not be zero. /// \param token a factory token, containing approprate references. + /// \param emulation the type of widget to emulate. /// /// \return the newly created widget. This pointer will have been added to the *************** *** 341,345 **** /// not be valid after the assemblage has been released. // ! bevel_button_t* bevel_button_factory(const dictionary_t& parameters, eve::position_t parent, const factory_token_t& token); /****************************************************************************************************/ --- 432,436 ---- /// not be valid after the assemblage has been released. // ! widget_node_t bevel_button_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token, bevel_button_enum_t emulation); /****************************************************************************************************/ |
|
From: Ralph T. <ra...@us...> - 2005-04-22 07:33:03
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6014/visual_refactor/adobe/test/visual/sources Modified Files: client_assembler.cpp Log Message: Factory is mostly done. This change adds in the factory functions, and makes client_assembler directly call the main factory function (eventually it will call a developer-supplied function for creating widgets). Unfortunately I think that it may break panels inside tab widgets. Hopefully I will be able to finish this work off by the end of the week, and we'll be able to think about merging it back into the main sandbox. Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** client_assembler.cpp 20 Apr 2005 22:17:46 -0000 1.4 --- client_assembler.cpp 22 Apr 2005 07:32:52 -0000 1.5 *************** *** 289,293 **** struct dialog_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit dialog_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data); --- 289,295 ---- struct dialog_proxy_t : client_proxy_t, adobe::extents_slices_t { ! typedef adobe::window_t widget_type_t; ! [...1390 lines suppressed...] ! parent.empty() ? ! adobe::widget_node_t(adobe::eve_t::iterator(), adobe::get_main_display().root()) : ! boost::any_cast<adobe::widget_node_t>(parent), ! token); } *************** *** 3326,3331 **** adobe::eve::parse(stream, adobe::line_position_t(file_name), adobe::eve::position_t(), ! boost::bind(&::client_assembler, boost::ref(result->assemblage_m), ! boost::ref(*result_eve), boost::ref(token), _1, _3, boost::bind(adobe::eve::evaluate_arguments(), _4))); result_eve->evaluate(adobe::eve_t::evaluate_flat); --- 3490,3494 ---- adobe::eve::parse(stream, adobe::line_position_t(file_name), adobe::eve::position_t(), ! boost::bind(&::client_assembler, boost::ref(token), _1, _3, boost::bind(adobe::eve::evaluate_arguments(), _4))); result_eve->evaluate(adobe::eve_t::evaluate_flat); |
|
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 ---- |
|
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 |
|
From: Ralph T. <ra...@us...> - 2005-04-20 20:34:18
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1374/visual_refactor/adobe/test/visual/sources Modified Files: client_assembler.cpp Log Message: mac_token_t has gone, and factory_token_t has replaced it. This is the beginning of adding the factory support to client_assembler, things left for me to do are: - Remove "window_t* root_m" from factory_token_t, and put signals to bind to (for show window, hide window, etc) in instead. - Write factory functions for each widget (as detailed in factory.hpp). - Write convenience factory function "default_factory" - Make client_assembler fn use the factory function instead of having knowledge of the widgetry (as it currently does with maker_t, etc). Then we should have a really flexible factory mechanism in place. This code compiles on Windows with MSVC 2003. Index: client_assembler.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/sources/client_assembler.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** client_assembler.cpp 19 Apr 2005 17:55:57 -0000 1.2 --- client_assembler.cpp 20 Apr 2005 20:34:08 -0000 1.3 *************** *** 8,11 **** --- 8,12 ---- #include "client_assembler.hpp" + #include "factory.hpp" #include <iostream> *************** *** 249,275 **** /****************************************************************************************************/ - struct mac_token_t - { - mac_token_t(adobe::sheet_t& sheet, adobe::eve_t& layout, adobe::assemblage_t& slave, eve_client::eve_client_holder& holder, const eve_client::button_notifier_t& notifier, size_enum_t dialog_size) : - assemblage_m(slave), - sheet_m(sheet), - layout_m(layout), - holder_m(holder), - notifier_m(notifier), - dialog_size_m(dialog_size), - root_m(0) - { } - - adobe::assemblage_t& assemblage_m; - adobe::window_t* root_m; - adobe::sheet_t& sheet_m; - eve_client::eve_client_holder& holder_m; - adobe::eve_t& layout_m; - eve_client::button_notifier_t notifier_m; - size_enum_t dialog_size_m; - }; - - /****************************************************************************************************/ - struct client_proxy_t { --- 250,253 ---- *************** *** 311,315 **** struct dialog_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit dialog_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data); --- 289,293 ---- struct dialog_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit dialog_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data); *************** *** 332,336 **** struct palette_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit palette_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data); --- 310,314 ---- struct palette_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit palette_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data); *************** *** 348,352 **** struct group_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit group_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 326,330 ---- struct group_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit group_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 368,372 **** struct tab_group_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit tab_group_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 346,350 ---- struct tab_group_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit tab_group_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 391,395 **** struct panel_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit panel_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 369,373 ---- struct panel_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit panel_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 410,414 **** struct separator_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit separator_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 388,392 ---- struct separator_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit separator_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 425,429 **** struct message_proxy_t : client_proxy_t { ! explicit message_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(); --- 403,407 ---- struct message_proxy_t : client_proxy_t { ! explicit message_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(); *************** *** 462,466 **** { } ! message_proxy_t::message_proxy_t(cosnt adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*) : view_proxy_t(view_t(), parameters), client_proxy_t(parameters), --- 440,444 ---- { } ! message_proxy_t::message_proxy_t(cosnt adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*) : view_proxy_t(view_t(), parameters), client_proxy_t(parameters), *************** *** 484,488 **** struct button_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit button_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data); --- 462,466 ---- struct button_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit button_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void place(const adobe::eve_t::calculate_data_t&, const adobe::eve_t::place_data_t& data); *************** *** 524,528 **** struct popup_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit popup_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 502,506 ---- struct popup_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit popup_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 543,547 **** struct link_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit link_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 521,525 ---- struct link_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit link_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 566,570 **** struct checkbox_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit checkbox_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 544,548 ---- struct checkbox_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit checkbox_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 584,588 **** struct radio_button_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit radio_button_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 562,566 ---- struct radio_button_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit radio_button_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 612,616 **** struct bevel_button_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit bevel_button_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 590,594 ---- struct bevel_button_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit bevel_button_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 649,653 **** struct progress_bar_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit progress_bar_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 627,631 ---- struct progress_bar_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit progress_bar_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 667,671 **** struct static_text_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit static_text_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 645,649 ---- struct static_text_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit static_text_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 682,686 **** struct edit_number_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit edit_number_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 660,664 ---- struct edit_number_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit edit_number_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 741,745 **** struct slider_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit slider_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 719,723 ---- struct slider_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit slider_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 763,767 **** struct edit_text_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit edit_text_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); --- 741,745 ---- struct edit_text_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit edit_text_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t*); void calculate(adobe::eve_t::calculate_data_t&); *************** *** 814,818 **** template <typename Widget> ! void set_up_control(client_proxy_t& local, Widget& control, client_proxy_t& parent, mac_token_t& token) { local.size_m = parent.size_m; --- 792,796 ---- template <typename Widget> ! void set_up_control(client_proxy_t& local, Widget& control, client_proxy_t& parent, adobe::factory_token_t& token) { local.size_m = parent.size_m; *************** *** 823,827 **** #if defined(ADOBE_SERIALIZATION) ! token.assemblage_m.hold_connection(token.holder_m.widget_stream_m.connect(boost::bind(&stream_out<Widget>, boost::ref(control), _1))); #else #pragma unused(token) --- 801,805 ---- #if defined(ADOBE_SERIALIZATION) ! token.assemblage_m.hold_connection(token.widget_stream_m.connect(boost::bind(&stream_out<Widget>, boost::ref(control), _1))); #else #pragma unused(token) *************** *** 968,972 **** struct column_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit column_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t* parent) : client_proxy_t(parameters) { --- 946,950 ---- struct column_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit column_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t* parent) : client_proxy_t(parameters) { *************** *** 996,1000 **** struct row_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit row_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t* parent) : client_proxy_t(parameters) { --- 974,978 ---- struct row_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit row_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t* parent) : client_proxy_t(parameters) { *************** *** 1024,1028 **** struct overlay_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit overlay_proxy_t(const adobe::dictionary_t& parameters, mac_token_t&, client_proxy_t* parent) : client_proxy_t(parameters) { --- 1002,1006 ---- struct overlay_proxy_t : client_proxy_t, adobe::extents_slices_t { ! explicit overlay_proxy_t(const adobe::dictionary_t& parameters, adobe::factory_token_t&, client_proxy_t* parent) : client_proxy_t(parameters) { *************** *** 1259,1263 **** template <bevel_emulation_t emulation> bevel_button_proxy_t<emulation>::bevel_button_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) --- 1237,1241 ---- template <bevel_emulation_t emulation> bevel_button_proxy_t<emulation>::bevel_button_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) *************** *** 1422,1426 **** progress_bar_proxy_t::progress_bar_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) --- 1400,1404 ---- progress_bar_proxy_t::progress_bar_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) *************** *** 1501,1505 **** static_text_proxy_t::static_text_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), --- 1479,1483 ---- static_text_proxy_t::static_text_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), *************** *** 1562,1566 **** edit_text_proxy_t::edit_text_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), --- 1540,1544 ---- edit_text_proxy_t::edit_text_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), *************** *** 1691,1695 **** slider_proxy_t::slider_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), --- 1669,1673 ---- slider_proxy_t::slider_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), *************** *** 1795,1799 **** edit_number_proxy_t::edit_number_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), --- 1773,1777 ---- edit_number_proxy_t::edit_number_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), *************** *** 2114,2118 **** group_proxy_t::group_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), --- 2092,2096 ---- group_proxy_t::group_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), *************** *** 2225,2229 **** tab_group_proxy_t::tab_group_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), --- 2203,2207 ---- tab_group_proxy_t::tab_group_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), *************** *** 2311,2315 **** panel_proxy_t::panel_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) --- 2289,2293 ---- panel_proxy_t::panel_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) *************** *** 2364,2368 **** separator_proxy_t::separator_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) --- 2342,2346 ---- separator_proxy_t::separator_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) *************** *** 2456,2460 **** template <typename Cont> ! void state_set_push_back(Cont& state_set, mac_token_t& token, adobe::button_t& control, const button_proxy_t::item_t& temp) { state_set.push_back(adobe::button_t::state_descriptor_t()); --- 2434,2438 ---- template <typename Cont> ! void state_set_push_back(Cont& state_set, adobe::factory_token_t& token, adobe::button_t& control, const button_proxy_t::item_t& temp) { state_set.push_back(adobe::button_t::state_descriptor_t()); *************** *** 2481,2485 **** button_proxy_t::button_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) --- 2459,2463 ---- button_proxy_t::button_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) *************** *** 2533,2537 **** popup_proxy_t::popup_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) --- 2511,2515 ---- popup_proxy_t::popup_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) *************** *** 2609,2613 **** link_proxy_t::link_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) --- 2587,2591 ---- link_proxy_t::link_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters) *************** *** 2681,2685 **** radio_button_proxy_t::radio_button_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), --- 2659,2663 ---- radio_button_proxy_t::radio_button_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), *************** *** 2749,2753 **** checkbox_proxy_t::checkbox_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), --- 2727,2731 ---- checkbox_proxy_t::checkbox_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t* parent) : client_proxy_t(parameters), *************** *** 2837,2841 **** dialog_proxy_t::dialog_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t*) : client_proxy_t(parameters), --- 2815,2819 ---- dialog_proxy_t::dialog_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t*) : client_proxy_t(parameters), *************** *** 2927,2931 **** palette_proxy_t::palette_proxy_t( const adobe::dictionary_t& parameters, ! mac_token_t& token, client_proxy_t*) : client_proxy_t(parameters) --- 2905,2909 ---- palette_proxy_t::palette_proxy_t( const adobe::dictionary_t& parameters, ! adobe::factory_token_t& token, client_proxy_t*) : client_proxy_t(parameters) *************** *** 3093,3097 **** template <typename T> ! boost::any wire_to_eve(adobe::assemblage_t& assemblage, adobe::eve_t& eve, mac_token_t& token, const boost::any& any_parent, const adobe::dictionary_t& parameters) { // The view_proxy_t will be owned by Eve. We are only interested in deleting the proxy object. --- 3071,3075 ---- template <typename T> ! boost::any wire_to_eve(adobe::assemblage_t& assemblage, adobe::eve_t& eve, adobe::factory_token_t& token, const boost::any& any_parent, const adobe::dictionary_t& parameters) { // The view_proxy_t will be owned by Eve. We are only interested in deleting the proxy object. *************** *** 3121,3127 **** /****************************************************************************************************/ ! boost::any client_assembler(adobe::assemblage_t& assemblage, adobe::eve_t& eve, mac_token_t& token, const boost::any& parent, adobe::name_t class_name, const adobe::dictionary_t& arguments) { ! typedef boost::any (*proxy_maker_t)(adobe::assemblage_t& assemblage, adobe::eve_t& eve, mac_token_t& token, const boost::any& parent, const adobe::dictionary_t& parameters); typedef std::pair<adobe::name_t, proxy_maker_t> maker_t; --- 3099,3105 ---- /****************************************************************************************************/ ! boost::any client_assembler(adobe::assemblage_t& assemblage, adobe::eve_t& eve, adobe::factory_token_t& token, const boost::any& parent, adobe::name_t class_name, const adobe::dictionary_t& arguments) { ! typedef boost::any (*proxy_maker_t)(adobe::assemblage_t& assemblage, adobe::eve_t& eve, adobe::factory_token_t& token, const boost::any& parent, const adobe::dictionary_t& parameters); typedef std::pair<adobe::name_t, proxy_maker_t> maker_t; *************** *** 3316,3320 **** adobe::eve_t* result_eve(new adobe::eve_t()); ! mac_token_t token(sheet, *result_eve, result->assemblage_m, *result.get(), notifier, dialog_size); adobe::eve::parse(stream, adobe::line_position_t(file_name), adobe::eve::position_t(), --- 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(), |
|
From: Ralph T. <ra...@us...> - 2005-04-20 20:34:17
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1374/visual_refactor/adobe/test/visual/headers Modified Files: client_assembler.hpp factory.hpp Log Message: mac_token_t has gone, and factory_token_t has replaced it. This is the beginning of adding the factory support to client_assembler, things left for me to do are: - Remove "window_t* root_m" from factory_token_t, and put signals to bind to (for show window, hide window, etc) in instead. - Write factory functions for each widget (as detailed in factory.hpp). - Write convenience factory function "default_factory" - Make client_assembler fn use the factory function instead of having knowledge of the widgetry (as it currently does with maker_t, etc). Then we should have a really flexible factory mechanism in place. This code compiles on Windows with MSVC 2003. Index: factory.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/factory.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** factory.hpp 19 Apr 2005 20:41:17 -0000 1.1 --- factory.hpp 20 Apr 2005 20:34:07 -0000 1.2 *************** *** 14,17 **** --- 14,18 ---- #include "display.hpp" #include "ui_core.hpp" + #include "client_assembler.hpp" #include <adobe/future/assemblage.hpp> *************** *** 41,59 **** // /// This structure is given to all factory functions, so that they can correctly create ! /// the widgets they need to create. // struct factory_token_t { ! factory_token_t() {} ! /* explicit factory_token_t(display_t& display, assemblage_t& assemblage, sheet_t& sheet) : display_m(display), assemblage_m(assemblage), ! sheet_m(sheet) ! {}*/ // /// Created widgets should be made with respect to this display, and inserted /// into the given parent by this display. // ! display_t* display_m; // /// This is the assemblage which widget factories register the created widget --- 42,64 ---- // /// This structure is given to all factory functions, so that they can correctly create ! /// the widgets they need to create. Things inside this structure should not change ! /// between creating two widgets. // 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), ! sheet_m(sheet), ! layout_m(layout), ! notifier_m(notifier), ! widget_stream_m(serialize_signal), ! root_m(0) ! {} // /// Created widgets should be made with respect to this display, and inserted /// into the given parent by this display. // ! display_t& display_m; // /// This is the assemblage which widget factories register the created widget *************** *** 61,70 **** /// assemblage does. // ! assemblage_t* assemblage_m; // /// The current Adam sheet -- this contains all of the cells which widgets might /// want to bind against. // ! sheet_t* sheet_m; }; /****************************************************************************************************/ --- 66,109 ---- /// assemblage does. // ! assemblage_t& assemblage_m; // /// The current Adam sheet -- this contains all of the cells which widgets might /// want to bind against. // ! sheet_t& sheet_m; ! // ! /// The Eve engine which all of these widgets are being inserted into. This must ! /// be known by top-level windows, and by widgets which manage trees of Eve ! /// widgets (such as splitter widgets). ! // ! eve_t& layout_m; ! // ! /// The function to call when a button is pressed. This should be called by ! /// buttons and button-like widgets when they are hit (and have an action, ! /// rather than a state change). ! // ! eve_client::button_notifier_t notifier_m; ! // ! /// This is the signal which should trigger widget serialization. All widgets ! /// should bind to this signal. ! // ! eve_client::serialize_signal_t& widget_stream_m; ! // ! /// This specifies the size of the widgets to be used in the window. ! // ! 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; }; /****************************************************************************************************/ Index: client_assembler.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/client_assembler.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** client_assembler.hpp 19 Apr 2005 17:55:55 -0000 1.2 --- client_assembler.hpp 20 Apr 2005 20:34:07 -0000 1.3 *************** *** 100,103 **** --- 100,107 ---- /*************************************************************************************************/ + typedef boost::signal<void (std::ostream& s)> serialize_signal_t; + + /*************************************************************************************************/ + class eve_client_holder : public boost::noncopyable { *************** *** 111,115 **** adobe::eve_t* eve_m; adobe::window_t* window_m; ! boost::signal<void (std::ostream& s)> widget_stream_m; adobe::assemblage_t assemblage_m; adobe::dictionary_t contributing_m; --- 115,119 ---- adobe::eve_t* eve_m; adobe::window_t* window_m; ! serialize_signal_t widget_stream_m; adobe::assemblage_t assemblage_m; adobe::dictionary_t contributing_m; |
|
From: Ralph T. <ra...@us...> - 2005-04-20 20:34:16
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1374/visual_refactor/adobe/build Modified Files: Jamfile Log Message: mac_token_t has gone, and factory_token_t has replaced it. This is the beginning of adding the factory support to client_assembler, things left for me to do are: - Remove "window_t* root_m" from factory_token_t, and put signals to bind to (for show window, hide window, etc) in instead. - Write factory functions for each widget (as detailed in factory.hpp). - Write convenience factory function "default_factory" - Make client_assembler fn use the factory function instead of having knowledge of the widgetry (as it currently does with maker_t, etc). Then we should have a really flexible factory mechanism in place. This code compiles on Windows with MSVC 2003. Index: Jamfile =================================================================== RCS file: /cvsroot/adobe-source/sandbox/visual_refactor/adobe/build/Jamfile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jamfile 18 Apr 2005 21:15:35 -0000 1.1 --- Jamfile 20 Apr 2005 20:34:07 -0000 1.2 *************** *** 68,72 **** [ obj name_dev_o : source/name.cpp : $(ASL_DEV_OBJ_FLAGS) ] [ obj parser_shared_dev_o : source/parser_shared.cpp : $(ASL_DEV_OBJ_FLAGS) ] ! [ obj rectangle_dev_o : source/rectangle.cpp : $(ASL_DEV_OBJ_FLAGS) ] [ obj string_pool_dev_o : source/string_pool.cpp : $(ASL_DEV_OBJ_FLAGS) ] [ obj test_configuration_dev_o : source/test_configuration.cpp : $(ASL_DEV_OBJ_FLAGS) ] --- 68,72 ---- [ obj name_dev_o : source/name.cpp : $(ASL_DEV_OBJ_FLAGS) ] [ obj parser_shared_dev_o : source/parser_shared.cpp : $(ASL_DEV_OBJ_FLAGS) ] ! [ obj extents_dev_o : source/extents.cpp : $(ASL_DEV_OBJ_FLAGS) ] [ obj string_pool_dev_o : source/string_pool.cpp : $(ASL_DEV_OBJ_FLAGS) ] [ obj test_configuration_dev_o : source/test_configuration.cpp : $(ASL_DEV_OBJ_FLAGS) ] *************** *** 101,105 **** [ obj name_o : source/name.cpp : $(ASL_OBJ_FLAGS) ] [ obj parser_shared_o : source/parser_shared.cpp : $(ASL_OBJ_FLAGS) ] ! [ obj rectangle_o : source/rectangle.cpp : $(ASL_OBJ_FLAGS) ] [ obj string_pool_o : source/string_pool.cpp : $(ASL_OBJ_FLAGS) ] [ obj test_configuration_o : source/test_configuration.cpp : $(ASL_OBJ_FLAGS) ] --- 101,105 ---- [ obj name_o : source/name.cpp : $(ASL_OBJ_FLAGS) ] [ obj parser_shared_o : source/parser_shared.cpp : $(ASL_OBJ_FLAGS) ] ! [ obj extents_o : source/extents.cpp : $(ASL_OBJ_FLAGS) ] [ obj string_pool_o : source/string_pool.cpp : $(ASL_OBJ_FLAGS) ] [ obj test_configuration_o : source/test_configuration.cpp : $(ASL_OBJ_FLAGS) ] |
|
From: Ralph T. <ra...@us...> - 2005-04-20 18:57:20
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17774/sources/mac Modified Files: metrics.cpp Log Message: Updating Jamfile and metrics.cpp to make visual compile on MacOS with gcc and bjam. Index: metrics.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac/metrics.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** metrics.cpp 14 Apr 2005 00:26:32 -0000 1.3 --- metrics.cpp 20 Apr 2005 18:57:11 -0000 1.4 *************** *** 49,53 **** const char* cxstr(xstr.c_str()); std::size_t n(xstr.size()); ! std::stringstream expression_stream(std::string(xstr_t(cxstr, n, context).get())); expression_parser parser(expression_stream, line_position_t("widget_metrics")); array_t expression; --- 49,54 ---- const char* cxstr(xstr.c_str()); std::size_t n(xstr.size()); ! xstr_t the_xstr(cxstr, n, context); ! std::stringstream expression_stream(std::string(the_xstr.get())); expression_parser parser(expression_stream, line_position_t("widget_metrics")); array_t expression; |
|
From: Ralph T. <ra...@us...> - 2005-04-20 18:57:20
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17774 Modified Files: Jamfile Log Message: Updating Jamfile and metrics.cpp to make visual compile on MacOS with gcc and bjam. Index: Jamfile =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/Jamfile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Jamfile 20 Apr 2005 08:14:51 -0000 1.12 --- Jamfile 20 Apr 2005 18:57:11 -0000 1.13 *************** *** 31,34 **** --- 31,35 ---- display ui_core_implementation + metrics ; *************** *** 42,46 **** # PLATFORM_SOURCES = - metrics event_dispatcher ; --- 43,46 ---- *************** *** 95,99 **** # Build settings for MacOS # ! PLATFORM_SETTINGS = <toolset>darwin:<framework>Carbon ; } } --- 95,99 ---- # Build settings for MacOS # ! PLATFORM_SETTINGS = <toolset>darwin:<linkflags>"-framework Carbon" ; } } |
|
From: Tobias S. <t_s...@us...> - 2005-04-20 08:15:01
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28424/adobe-source/adobe/test/visual Modified Files: Jamfile Log Message: Restructures this Jamfile from gound up (tested on Windows with MSVC 7.1 and GCC, so far) Index: Jamfile =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/Jamfile,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Jamfile 16 Apr 2005 00:02:44 -0000 1.11 --- Jamfile 20 Apr 2005 08:14:51 -0000 1.12 *************** *** 1,65 **** # Jamfile for building the VISUAL demo import testing ; import os ; # ! # We need to include different directories for Windows vs. Mac. # ! if [ os.name ] = NT { ! PLATFORM_HEADERS = headers/win resources ; ! PLATFORM_SOURCE_DIR = sources/win ; # ! # Note that the resource script is also included in an MSVC build ! # by the project requirements section. # ! PLATFORM_SOURCES = ! sources/win/metrics.cpp ! sources/win/event_dispatcher.cpp ! ; # ! # These two definitions say that we're targetting Windows XP. That ! # means that we get various preprocessor definitions which we need, ! # such as the WS_EX_COMPOSITED window style. # ! PLATFORM_DEFINITIONS = <define>WINVER=0x501 <define>_WIN32_WINNT=0x501 <define>_WIN32_IE=0x0501 ; ! } else { ! PLATFORM_HEADERS = headers/mac ; ! PLATFORM_SOURCE_DIR = sources/mac ; ! PLATFORM_SOURCES = ; ! PLATFORM_DEFINITIONS = ; ! } - project adobe/visual - : requirements <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib /subsystem:windows" # ! # REVISIT (t_schwinger): # ! # Masking darwin by requesting the GNU linker is odd. This has to be straightened out ! # as soon as there are more GCC platforms... # ! : requirements <toolset>gcc:<linker>gnu:<linkflags>"-lgdi32 -luser32 -lcomctl32" ! : requirements <toolset>darwin:<linkflags>"-framework Carbon" # ! # Currently MSVC is the only windows compiler which Boost knows how ! # to make generate resource files, hence the predicate for including ! # resources.rc in the build. The correct fix for this Jammery is to ! # tell Boost.Build about MinGW's resource compiler (obviously this ! # will have to be added to Boost, not ASL). # ! : requirements <toolset>msvc:<source>resources/resources.rc ! : requirements <include>headers <link>static ! ; - exe "visual" - : sources/express_viewer.cpp - sources/client_assembler.cpp - sources/ui_core.cpp - sources/ui_core_common.cpp - $(PLATFORM_SOURCES) - $(PLATFORM_SOURCE_DIR)/main.cpp - $(PLATFORM_SOURCE_DIR)/display.cpp - $(PLATFORM_SOURCE_DIR)/ui_core_implementation.cpp - /adobe//asl_lib_dev - /boost/filesystem//boost_filesystem - : <include>$(PLATFORM_HEADERS) $(PLATFORM_DEFINITIONS) <link>static ; --- 1,112 ---- # Jamfile for building the VISUAL demo + import testing ; import os ; + project adobe/visual + : requirements <user-interface>gui + : requirements <library>/adobe//asl_lib_dev + : requirements <library>/boost/filesystem//boost_filesystem + : requirements <link>static + ; + + SOURCE_DIRECTORY = sources ; + HEADER_DIRECTORY = headers ; + # ! # Sources (common to all platforms) # ! COMMON_SOURCES = ! express_viewer ! client_assembler ! ui_core ! ui_core_common ! ; ! ! # ! # Platform specific sources (which exist for every platform) ! # ! BRIDGE_SOURCES = ! main ! display ! ui_core_implementation ! ; ! ! ! switch [ os.name ] { ! case NT : # --- Windows --------------------------------------------------------------------------- ! { # ! # Additional sources that only exist for Windows # ! PLATFORM_SOURCES = ! metrics ! event_dispatcher ! ; ! # ! # Directory name for Windows specific sources and headers # ! PLATFORM_DIRECTORIES_NAME = win ; ! # ! # Build settings for Windows # ! PLATFORM_SETTINGS = ! # ! # Boost.Build only knows the MSVC resource compiler (that's why the ! # resource script is added conditionally to the sources, here) ! # ! <include>resources ! <toolset>msvc:<source>resources/resources.rc ! ! # ! # These definitions say that we're targetting Windows XP. ! # That means that we get various preprocessor definitions which we ! # need, such as the WS_EX_COMPOSITED window style. ! # ! <define>WINVER=0x501 <define>_WIN32_WINNT=0x501 <define>_WIN32_IE=0x501 ! ! <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib" ! ! # ! # If compiling with GCC we add -mno-cygwin to tell the cygwin compiler ! # and linker that we want a native Windows application. ! # ! <toolset>gcc:<cxxflags>"-mno-cygwin" ! <toolset>gcc:<linkflags>"-lgdi32 -luser32 -lcomctl32 -mno-cygwin" ! ; ! } ! case * : # --- Mac OS (assumed) ------------------------------------------------------------------ ! { # ! # Additional sources that only exist for MacOS # ! PLATFORM_SOURCES = ; ! # ! # Directory name for MacOS specific sources ! # ! PLATFORM_DIRECTORIES_NAME = mac ; ! ! # ! # Build settings for MacOS ! # ! PLATFORM_SETTINGS = <toolset>darwin:<framework>Carbon ; ! } ! } ! ! # ------------------------------------------------------------------------------------------------- ! ! PLATFORM_SOURCES += $(BRIDGE_SOURCES) ; ! ! INCLUDE = <include>$(HEADER_DIRECTORY) <include>$(HEADER_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME) ; ! SOURCES = ! $(SOURCE_DIRECTORY)/$(COMMON_SOURCES).cpp ! $(SOURCE_DIRECTORY)/$(PLATFORM_DIRECTORIES_NAME)/$(PLATFORM_SOURCES).cpp ! ; ! ! exe "visual" : $(SOURCES) : $(INCLUDE) $(PLATFORM_SETTINGS) ; |