Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6755/adobe/future/widgets/headers Modified Files: client_assembler.hpp display.hpp factory.hpp optional_connect.hpp ui_core.hpp ui_core_common.hpp ui_overlay.hpp Log Message: asl 1.0.13 Index: ui_core_common.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/ui_core_common.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_core_common.hpp 24 Jan 2006 19:38:46 -0000 1.5 --- ui_core_common.hpp 3 Feb 2006 18:33:36 -0000 1.6 *************** *** 1,11 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! #ifndef ADOBE_UI_CORE_COMMON_HPP #define ADOBE_UI_CORE_COMMON_HPP --- 1,11 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! #ifndef ADOBE_UI_CORE_COMMON_HPP #define ADOBE_UI_CORE_COMMON_HPP *************** *** 35,40 **** /// be invalid once the function has returned. /// ! /// \param slice_one the first slice to align, and the one which is modified. ! /// \param slice_two the slice to align with the first slice. // --- 35,40 ---- /// be invalid once the function has returned. /// ! /// \param slice_one the first slice to align, and the one which is modified. ! /// \param slice_two the slice to align with the first slice. // Index: display.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/display.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** display.hpp 24 Jan 2006 19:38:46 -0000 1.4 --- display.hpp 3 Feb 2006 18:33:36 -0000 1.5 *************** *** 1,11 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! #ifndef ADOBE_DISPLAY_HPP #define ADOBE_DISPLAY_HPP --- 1,11 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! #ifndef ADOBE_DISPLAY_HPP #define ADOBE_DISPLAY_HPP *************** *** 24,49 **** struct display_t { ! struct implementation_t; ! typedef boost::any position_t; ! display_t(); ! ~display_t(); ! template <typename DisplayElement> ! void set_root(DisplayElement& element); ! position_t root(); ! void erase(position_t& position); ! template <typename DisplayElement> ! position_t insert(position_t& parent, DisplayElement& element); private: ! implementation_t* object_m; public: ! implementation_t& implementation(); ! const implementation_t& implementation() const; }; --- 24,49 ---- struct display_t { ! struct implementation_t; ! typedef boost::any position_t; ! display_t(); ! ~display_t(); ! template <typename DisplayElement> ! void set_root(DisplayElement& element); ! position_t root(); ! void erase(position_t& position); ! template <typename DisplayElement> ! position_t insert(position_t& parent, DisplayElement& element); private: ! implementation_t* object_m; public: ! implementation_t& implementation(); ! const implementation_t& implementation() const; }; Index: client_assembler.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/client_assembler.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** client_assembler.hpp 24 Jan 2006 19:38:46 -0000 1.8 --- client_assembler.hpp 3 Feb 2006 18:33:36 -0000 1.9 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 34,50 **** /* ! REVISIT (sparent) : Size is inherited from the parent during initialization - the size ! specified to the client is relative to the parent's size. Does this ever need to ! be specified in absolutes? */ enum size_enum_t { ! size_mini_s = -2, ! size_small_s = -1, ! size_normal_s = 0, ! ! size_minimum_s = size_mini_s, ! size_maximum_s = size_normal_s }; --- 34,50 ---- /* ! REVISIT (sparent) : Size is inherited from the parent during initialization - the size ! specified to the client is relative to the parent's size. Does this ever need to ! be specified in absolutes? */ enum size_enum_t { ! size_mini_s = -2, ! size_small_s = -1, ! size_normal_s = 0, ! ! size_minimum_s = size_mini_s, ! size_maximum_s = size_normal_s }; *************** *** 54,64 **** /*************************************************************************************************/ ! /* ! 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; /*************************************************************************************************/ --- 54,64 ---- /*************************************************************************************************/ ! /* ! 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; /*************************************************************************************************/ *************** *** 72,83 **** /*************************************************************************************************/ /* ! This is a basic "Window Server" - it can be called to construct a window by name. The window ! is attached to a sheet as a slave (meaning the Window must be destructed before the sheet). ! REVISIT (sparent) : Here are some thoughts on the direction this design should be going... ! ! We have an assemblage (or package of items with the same lifespace) for the window which ! includes the eve structure and the slave connection (the wire bundle to attach the ! assamblage to a sheet). */ --- 72,83 ---- /*************************************************************************************************/ /* ! This is a basic "Window Server" - it can be called to construct a window by name. The window ! is attached to a sheet as a slave (meaning the Window must be destructed before the sheet). ! REVISIT (sparent) : Here are some thoughts on the direction this design should be going... ! ! We have an assemblage (or package of items with the same lifespace) for the window which ! includes the eve structure and the slave connection (the wire bundle to attach the ! assamblage to a sheet). */ *************** *** 92,212 **** { public: ! typedef boost::function<void (const adobe::name_t&, const adobe::value_t&)> action_fallback_proc_t; ! // ! /// This constructor tells the window_server_t where to find ! /// Eve definitions referenced in @dialog commands, and which ! /// sheet to bind against. ! /// ! /// \param directory_path the directory to look for Eve ! /// files referenced by @dialog in. ! /// \param sheet the sheet to bind against. This ! /// sheet should contain all of the ! /// cells referenced in the Eve file ! /// which is loaded (either via ! /// push_back or @dialog). ! // ! window_server_t(const char* directory_path, adobe::sheet_t& sheet); ! // ! /// Hide and release all Eve dialogs created by this window server. ! // ! ~window_server_t(); ! // ! /// Load the given file out of the directory_path and display the ! /// dialog it contains. If the file cannot be found, or the file ! /// contains errors (e.g.: syntax errors, references non-existant ! /// widgets) then an exception is thrown. ! /// ! /// \param name the name of the Eve file inside ! /// the directory given to the constructor. ! /// \param dialog_size the size of the dialog to create, ! /// note that individual widgets may ! /// override this value in the Eve file. ! // ! void push_back(const char* name, size_enum_t dialog_size); ! // ! /// Load an Eve definition from the given std::istream and display ! /// the dialog it contains. If any errors are found in the data ! /// then an exception is thrown. ! /// ! /// \param data an std::istream open on the Eve ! /// definition to be loaded. ! /// \param ident_pair identification name and callback proc (two parameters) ! /// that represents the data stream ! /// \param dialog_size the size of the dialog to create, ! /// note that individual widgets may ! /// override this value in the Eve ! /// definition. ! // ! void push_back(std::istream& data, adobe::name_t file_path, const adobe::line_position_t::getline_proc_t& getline_proc, size_enum_t dialog_size); ! ! #if 0 ! void set_back(const char* name, size_enum_t dialog_size); ! void pop_back(bool cancel); ! #endif ! // ! /// The window server can use different widget factories if ! /// custom widgets need to be made. By default the window ! /// server will use the "adobe::default_factory" function, ! /// but an alternative function can be specified here. Note ! /// that push_back just uses the current factory, so if a ! /// custom factory is desired then it must be set before ! /// using push_back. ! /// ! /// \param proc the new widget factory function to ! /// use. ! // ! void set_widget_factory(adobe::widget_factory_proc_t proc); ! // ! /// Some widgets, such as buttons and bevel_buttons in UI ! /// core, have an action property. When an action is invoked ! /// (e.g.: a button with an action value) the procedure given ! /// to this function is invoked. This provides an easy way ! /// to get feedback from a GUI. ! /// ! /// Note that some actions are automatically handled, these ! /// are: @cancel, @ok and @reset. ! /// ! /// \param proc the function to call when a widget ! /// with an action is "activated". ! // ! void set_action_fallback(action_fallback_proc_t proc); ! // ! /// This function will serialize all of the visible widgets to ! /// the given std::ostream. ! /// ! /// \param s the std::ostream to serialize widgets ! /// to. ! // ! void serialize_widgets(std::ostream& s); ! ! // REVISIT (sparent) : Hack. These need to go to the correct window. ! // ! /// This function can be used to send an action to the open windows, ! /// however it is only useful in debug mode (where it can be used to ! /// frame and unframe visible widgets). It will probably be changed ! /// soon. ! /// ! /// \param action the action to perform. ! /// \param parameter the parameter associated with the action. ! // ! void dispatch_action(adobe::name_t action, const adobe::value_t& parameter); ! // ! /// Return the number of windows which this window_server has open. ! /// ! /// \return the number of windows which this window_server has open. ! // ! std::size_t size() const { return window_list_m.size(); } private: ! typedef std::list<eve_client_holder*> window_list_t; ! typedef window_list_t::iterator iterator; ! ! void dispatch_window_action(iterator window, adobe::name_t action, const adobe::value_t& parameter); ! void erase(iterator window); ! ! adobe::sheet_t& sheet_m; ! std::string directory_path_m; ! window_list_t window_list_m; ! action_fallback_proc_t fallback_m; ! adobe::widget_factory_proc_t widget_factory_m; }; --- 92,212 ---- { public: ! typedef boost::function<void (const adobe::name_t&, const adobe::value_t&)> action_fallback_proc_t; ! // ! /// This constructor tells the window_server_t where to find ! /// Eve definitions referenced in @dialog commands, and which ! /// sheet to bind against. ! /// ! /// \param directory_path the directory to look for Eve ! /// files referenced by @dialog in. ! /// \param sheet the sheet to bind against. This ! /// sheet should contain all of the ! /// cells referenced in the Eve file ! /// which is loaded (either via ! /// push_back or @dialog). ! // ! window_server_t(const char* directory_path, adobe::sheet_t& sheet); ! // ! /// Hide and release all Eve dialogs created by this window server. ! // ! ~window_server_t(); ! // ! /// Load the given file out of the directory_path and display the ! /// dialog it contains. If the file cannot be found, or the file ! /// contains errors (e.g.: syntax errors, references non-existant ! /// widgets) then an exception is thrown. ! /// ! /// \param name the name of the Eve file inside ! /// the directory given to the constructor. ! /// \param dialog_size the size of the dialog to create, ! /// note that individual widgets may ! /// override this value in the Eve file. ! // ! void push_back(const char* name, size_enum_t dialog_size); ! // ! /// Load an Eve definition from the given std::istream and display ! /// the dialog it contains. If any errors are found in the data ! /// then an exception is thrown. ! /// ! /// \param data an std::istream open on the Eve ! /// definition to be loaded. ! /// \param ident_pair identification name and callback proc (two parameters) ! /// that represents the data stream ! /// \param dialog_size the size of the dialog to create, ! /// note that individual widgets may ! /// override this value in the Eve ! /// definition. ! // ! void push_back(std::istream& data, adobe::name_t file_path, const adobe::line_position_t::getline_proc_t& getline_proc, size_enum_t dialog_size); ! ! #if 0 ! void set_back(const char* name, size_enum_t dialog_size); ! void pop_back(bool cancel); ! #endif ! // ! /// The window server can use different widget factories if ! /// custom widgets need to be made. By default the window ! /// server will use the "adobe::default_factory" function, ! /// but an alternative function can be specified here. Note ! /// that push_back just uses the current factory, so if a ! /// custom factory is desired then it must be set before ! /// using push_back. ! /// ! /// \param proc the new widget factory function to ! /// use. ! // ! void set_widget_factory(adobe::widget_factory_proc_t proc); ! // ! /// Some widgets, such as buttons in UI ! /// core, have an action property. When an action is invoked ! /// (e.g.: a button with an action value) the procedure given ! /// to this function is invoked. This provides an easy way ! /// to get feedback from a GUI. ! /// ! /// Note that some actions are automatically handled, these ! /// are: @cancel, @ok and @reset. ! /// ! /// \param proc the function to call when a widget ! /// with an action is "activated". ! // ! void set_action_fallback(action_fallback_proc_t proc); ! // ! /// This function will serialize all of the visible widgets to ! /// the given std::ostream. ! /// ! /// \param s the std::ostream to serialize widgets ! /// to. ! // ! void serialize_widgets(std::ostream& s); ! ! // REVISIT (sparent) : Hack. These need to go to the correct window. ! // ! /// This function can be used to send an action to the open windows, ! /// however it is only useful in debug mode (where it can be used to ! /// frame and unframe visible widgets). It will probably be changed ! /// soon. ! /// ! /// \param action the action to perform. ! /// \param parameter the parameter associated with the action. ! // ! void dispatch_action(adobe::name_t action, const adobe::value_t& parameter); ! // ! /// Return the number of windows which this window_server has open. ! /// ! /// \return the number of windows which this window_server has open. ! // ! std::size_t size() const { return window_list_m.size(); } private: ! typedef std::list<eve_client_holder*> window_list_t; ! typedef window_list_t::iterator iterator; ! ! void dispatch_window_action(iterator window, adobe::name_t action, const adobe::value_t& parameter); ! void erase(iterator window); ! ! adobe::sheet_t& sheet_m; ! std::string directory_path_m; ! window_list_t window_list_m; ! action_fallback_proc_t fallback_m; ! adobe::widget_factory_proc_t widget_factory_m; }; *************** *** 226,232 **** /* ! REVISIT (sparent) : As a current "hack" for handling the drawing order of widgets when optional ! panels come and go we are going to define a vector of items which need to be shown or hidden ! and the window will handle the logic. Still need to figure out the right place to put this. */ --- 226,232 ---- /* ! REVISIT (sparent) : As a current "hack" for handling the drawing order of widgets when optional ! panels come and go we are going to define a vector of items which need to be shown or hidden ! and the window will handle the logic. Still need to figure out the right place to put this. */ *************** *** 238,304 **** struct eve_client_holder : public boost::noncopyable { ! /* ! NOTE (sparent) : Order is important here - we want to destruct window_m prior to destructing ! eve_m so that any notifications sent by the system are sent to valid object. Slots and ! signals on the window widgets would be a better way to handle this connection but I'm not ! there yet. ! */ ! // ! /// 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). ! // ! adobe::eve_t eve_m; ! // ! /// The layout sheet is a "mini" sheet used to hold the layout state. ! // ! adobe::basic_sheet_t layout_sheet_m; ! ! // ! /// This is the assemblage which widget factories register the created widget ! /// (or wrapping structure) with, such that the widget gets deleted when the ! /// assemblage does. ! // ! adobe::assemblage_t assemblage_m; ! // ! /// A set for the contributing factors to the sheet (not the layout sheet) ! // ! std::pair<adobe::dictionary_t, adobe::array_t> contributing_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. ! // ! show_window_signal_t show_window_m; ! // ! /// REVISIT (sparent) : We really need a generalized mechanism for defereing an action - ! /// a command queue of sorts - which collapses so things don't get done twince. We hack it here. ! // ! visible_change_queue_t visible_change_queue_m; ! // ! /// Display token for the root item in the view ! // ! adobe::display_t::position_t root_display_m; #ifndef NDEBUG ! // ! /// This is the signal which should trigger widget serialization. All widgets ! /// should bind to this signal. ! // ! serialize_signal_t widget_stream_m; ! // ! /// Top-level widgets (windows, dialogs, etc) can provide debugging functionality ! /// which involves drawing tick marks around the Eve-specified extents of a widget. ! /// This is handled through an overlay class, which is passed here for binding ! // ! adobe::ui_overlay_t overlay_m; #endif }; --- 238,304 ---- struct eve_client_holder : public boost::noncopyable { ! /* ! NOTE (sparent) : Order is important here - we want to destruct window_m prior to destructing ! eve_m so that any notifications sent by the system are sent to valid object. Slots and ! signals on the window widgets would be a better way to handle this connection but I'm not ! there yet. ! */ ! // ! /// 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). ! // ! adobe::eve_t eve_m; ! // ! /// The layout sheet is a "mini" sheet used to hold the layout state. ! // ! adobe::basic_sheet_t layout_sheet_m; ! ! // ! /// This is the assemblage which widget factories register the created widget ! /// (or wrapping structure) with, such that the widget gets deleted when the ! /// assemblage does. ! // ! adobe::assemblage_t assemblage_m; ! // ! /// A set for the contributing factors to the sheet (not the layout sheet) ! // ! std::pair<adobe::dictionary_t, adobe::array_t> contributing_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. ! // ! show_window_signal_t show_window_m; ! // ! /// REVISIT (sparent) : We really need a generalized mechanism for defereing an action - ! /// a command queue of sorts - which collapses so things don't get done twince. We hack it here. ! // ! visible_change_queue_t visible_change_queue_m; ! // ! /// Display token for the root item in the view ! // ! adobe::display_t::position_t root_display_m; #ifndef NDEBUG ! // ! /// This is the signal which should trigger widget serialization. All widgets ! /// should bind to this signal. ! // ! serialize_signal_t widget_stream_m; ! // ! /// Top-level widgets (windows, dialogs, etc) can provide debugging functionality ! /// which involves drawing tick marks around the Eve-specified extents of a widget. ! /// This is handled through an overlay class, which is passed here for binding ! // ! adobe::ui_overlay_t overlay_m; #endif }; *************** *** 306,316 **** /*************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( adobe::name_t file_name, ! const adobe::line_position_t::getline_proc_t& getline_proc, ! std::istream& stream, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory); /*************************************************************************************************/ --- 306,316 ---- /*************************************************************************************************/ ! adobe::auto_ptr<eve_client_holder> make_view( adobe::name_t file_name, ! const adobe::line_position_t::getline_proc_t& getline_proc, ! std::istream& stream, ! adobe::sheet_t& sheet, ! const button_notifier_t& notifier, ! size_enum_t dialog_size, ! adobe::widget_factory_proc_t factory); /*************************************************************************************************/ *************** *** 320,324 **** // typedef boost::function<void (const adobe::point_2d_t&, const adobe::extents_t&)> ! place_func_t; // /// utility_widget_place is an implementation of the function required for --- 320,324 ---- // typedef boost::function<void (const adobe::point_2d_t&, const adobe::extents_t&)> ! place_func_t; // /// utility_widget_place is an implementation of the function required for *************** *** 330,444 **** /// factory as follows: /// \code ! /// class MyWidget { ! /// public: ! /// ... ! /// void place( const adobe::point_2d_t& position, ! /// const adobe::extents_t& geometry ) { ! /// // ! /// // Place this widget at the given position with the ! /// // give geometry. ! /// // ! /// } ! /// ... ! /// HWND/Widget*/ControlRef getWidget() const { ! /// // ! /// // Return whatever the native basic widget type is. ! /// // On Windows this is an HWND, on Mac a ControlRef ! /// // and on FLTK it's a fltk::Widget*. ! /// // ! /// } ! /// ... ! /// adobe::extents_t best_bounds() { ! /// // ! /// // Fill out what the ideal size (along with any ! /// // extra information like baseline). ! /// // ! /// adobe::extents_t result; ! /// result.width() = result.height() = 100; ! /// return result; ! /// } ! /// }; /// ! /// adobe::widget_node_t MyWidget_factory( ! /// const adobe::dictionary_t& parameters, ! /// const adobe::widget_node_t& parent, ! /// const adobe::factory_token_t& token ) { ! /// // ! /// // Create our widget instance. It should pull out any parameters which ! /// // it needs from the parameters dictionary, and will probably use ! /// // token.sheet_m to bind to anything in the sheet. ! /// // ! /// MyWidget* pMyWidget = new MyWidget( parameters, parent, token ); ! /// if( !pMyWidget ) throw std::runtime_error( "no memory.." ); ! /// // ! /// // We want this widget instance to be deleted when the view containing ! /// // it goes away. ! /// // ! /// token.assemblage_m.delete_on_destruction( pMyWidget ); ! /// // ! /// // Insert this widget into it's parent on the main display. ! /// // ! /// adobe::display_t::position_t display_token( adobe::insert( ! /// adobe::get_main_display(), parent.display_token_m, ! /// pMyWidget->getWidget() ) ); ! /// adobe::display_t::position_t overlay_token( ! /// token.overlay_m.insert( parent.overlay_token_m ) ); ! /// // ! /// // Fill out the signals that Eve needs to place and move our widget ! /// // around. ! /// // ! /// adobe::eve_t::signal_suite_t signals; ! /// // ! /// // First make our placer function. We use boost::bind because we need ! /// // to call a member function (and thus need to bind the instance to the ! /// // member). ! /// // ! /// eve_client::place_func_t placer( boost::bind( &MyWidget::place, pMyWidget, _1, _2 ) ); ! /// // ! /// // The utility_widget_calculate is just a conversion function really, so ! /// // it saves us from writing a new one. ! /// // ! /// signals.eve_calculate_proc_m = boost::bind( &eve_client::utility_widget_calculate, ! /// pMyWidget->best_bounds(), _1 ); ! /// // ! /// // Use utility_widget_place as our placing function for Eve. ! /// // ! /// signals.eve_place_proc_m = boost::bind( &eve_client::utility_widget_place, ! /// placer, _1, _2, boost::ref( token.overlay_m ), overlay_token ); ! /// // ! /// // Register the widget with Eve. ! /// // ! /// adobe::eve_t::iterator eve_token( ! /// token.layout_m.add_view_element( parent.eve_token_m, ! /// adobe::eve_t::insert_element_t( ! /// adobe::eve_t::calculate_data_t(), ! /// false, ! /// parameters, ! /// signals ) ! /// ) ! /// ); ! /// // ! /// // Return our new widget. This should be what the factory function ! /// // returns. ! /// // ! /// return adobe::widget_node_t( parent.size_m, eve_token, display_token, overlay_token ); ///} /// \endcode /// ! /// \param placer a function which sets the position and dimensions of the widget. ! /// \param calc the calculation data from Eve. ! /// \param data the placer data from Eve. ! /// \param overlay the overlay root. ! /// \param node the overlay node for this widget. // void ! utility_widget_place( place_func_t placer, ! const adobe::eve_t::calculate_data_t& calc, ! const adobe::eve_t::place_data_t& data #ifndef NDEBUG ! , adobe::ui_overlay_t& overlay, ! adobe::ui_overlay_t::position_t node #endif ! ); /*************************************************************************************************/ --- 330,444 ---- /// factory as follows: /// \code ! /// class MyWidget { ! /// public: ! /// ... ! /// void place( const adobe::point_2d_t& position, ! /// const adobe::extents_t& geometry ) { ! /// // ! /// // Place this widget at the given position with the ! /// // give geometry. ! /// // ! /// } ! /// ... ! /// HWND/Widget*/ControlRef getWidget() const { ! /// // ! /// // Return whatever the native basic widget type is. ! /// // On Windows this is an HWND, on Mac a ControlRef ! /// // and on FLTK it's a fltk::Widget*. ! /// // ! /// } ! /// ... ! /// adobe::extents_t best_bounds() { ! /// // ! /// // Fill out what the ideal size (along with any ! /// // extra information like baseline). ! /// // ! /// adobe::extents_t result; ! /// result.width() = result.height() = 100; ! /// return result; ! /// } ! /// }; /// ! /// adobe::widget_node_t MyWidget_factory( ! /// const adobe::dictionary_t& parameters, ! /// const adobe::widget_node_t& parent, ! /// const adobe::factory_token_t& token ) { ! /// // ! /// // Create our widget instance. It should pull out any parameters which ! /// // it needs from the parameters dictionary, and will probably use ! /// // token.sheet_m to bind to anything in the sheet. ! /// // ! /// MyWidget* pMyWidget = new MyWidget( parameters, parent, token ); ! /// if( !pMyWidget ) throw std::runtime_error( "no memory.." ); ! /// // ! /// // We want this widget instance to be deleted when the view containing ! /// // it goes away. ! /// // ! /// token.assemblage_m.delete_on_destruction( pMyWidget ); ! /// // ! /// // Insert this widget into it's parent on the main display. ! /// // ! /// adobe::display_t::position_t display_token( adobe::insert( ! /// adobe::get_main_display(), parent.display_token_m, ! /// pMyWidget->getWidget() ) ); ! /// adobe::display_t::position_t overlay_token( ! /// token.overlay_m.insert( parent.overlay_token_m ) ); ! /// // ! /// // Fill out the signals that Eve needs to place and move our widget ! /// // around. ! /// // ! /// adobe::eve_t::signal_suite_t signals; ! /// // ! /// // First make our placer function. We use boost::bind because we need ! /// // to call a member function (and thus need to bind the instance to the ! /// // member). ! /// // ! /// eve_client::place_func_t placer( boost::bind( &MyWidget::place, pMyWidget, _1, _2 ) ); ! /// // ! /// // The utility_widget_calculate is just a conversion function really, so ! /// // it saves us from writing a new one. ! /// // ! /// signals.eve_calculate_proc_m = boost::bind( &eve_client::utility_widget_calculate, ! /// pMyWidget->best_bounds(), _1 ); ! /// // ! /// // Use utility_widget_place as our placing function for Eve. ! /// // ! /// signals.eve_place_proc_m = boost::bind( &eve_client::utility_widget_place, ! /// placer, _1, _2, boost::ref( token.overlay_m ), overlay_token ); ! /// // ! /// // Register the widget with Eve. ! /// // ! /// adobe::eve_t::iterator eve_token( ! /// token.layout_m.add_view_element( parent.eve_token_m, ! /// adobe::eve_t::insert_element_t( ! /// adobe::eve_t::calculate_data_t(), ! /// false, ! /// parameters, ! /// signals ) ! /// ) ! /// ); ! /// // ! /// // Return our new widget. This should be what the factory function ! /// // returns. ! /// // ! /// return adobe::widget_node_t( parent.size_m, eve_token, display_token, overlay_token ); ///} /// \endcode /// ! /// \param placer a function which sets the position and dimensions of the widget. ! /// \param calc the calculation data from Eve. ! /// \param data the placer data from Eve. ! /// \param overlay the overlay root. ! /// \param node the overlay node for this widget. // void ! utility_widget_place( place_func_t placer, ! const adobe::eve_t::calculate_data_t& calc, ! const adobe::eve_t::place_data_t& data #ifndef NDEBUG ! , adobe::ui_overlay_t& overlay, ! adobe::ui_overlay_t::position_t node #endif ! ); /*************************************************************************************************/ *************** *** 446,455 **** /// Convert from extents_t to eve_t::calculate_data_t. /// ! /// \param best_bounds the bounds to convert from. ! /// \param geometry the calculate_data_t to convert to. // void ! utility_widget_calculate( adobe::extents_t& best_bounds, ! adobe::eve_t::calculate_data_t& geometry ); /*************************************************************************************************/ } // namespace eve_client --- 446,455 ---- /// Convert from extents_t to eve_t::calculate_data_t. /// ! /// \param best_bounds the bounds to convert from. ! /// \param geometry the calculate_data_t to convert to. // void ! utility_widget_calculate( adobe::extents_t& best_bounds, ! adobe::eve_t::calculate_data_t& geometry ); /*************************************************************************************************/ } // namespace eve_client Index: factory.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/future/widgets/headers/factory.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** factory.hpp 24 Jan 2006 19:38:46 -0000 1.5 --- factory.hpp 3 Feb 2006 18:33:36 -0000 1.6 *************** *** 1,11 **** /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ ! #ifndef ADOBE_UI_CORE_FACTORY_HPP #define ADOBE_UI_CORE_FACTORY_HPP --- 1,11 ---- /* ! Copyright 2005 Ralph Thomas ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ ! #ifndef ADOBE_UI_CORE_FACTORY_HPP #define ADOBE_UI_CORE_FACTORY_HPP *************** *** 45,75 **** inline void update_display_queue(eve_client::visible_change_queue_t* queue, eve_t* layout) { ! if (!queue->empty()) ! { ! eve_client::visible_change_queue_t::iterator mid(adobe::partition(*queue, &eve_client::visible_change_request_t::first)); ! adobe::for_each(mid, queue->end(), boost::bind(&adobe::panel_t::set_visible, boost::bind(&eve_client::visible_change_request_t::second, _1), false)); ! layout->evaluate(adobe::eve_t::evaluate_nested); ! adobe::for_each(queue->begin(), mid, boost::bind(&adobe::panel_t::set_visible, boost::bind(&eve_client::visible_change_request_t::second, _1), true)); ! queue->clear(); ! } } inline void sheet_set_update(sheet_t* sheet, eve_client::visible_change_queue_t* queue, ! eve_t* layout, name_t name, const value_t value) { ! sheet->set(name, value); ! sheet->update(); ! ! update_display_queue(queue, layout); } inline void layout_sheet_set_update(basic_sheet_t* sheet, eve_client::visible_change_queue_t* queue, ! eve_t* layout, name_t name, const value_t value) { ! sheet->set(name, value); ! ! update_display_queue(queue, layout); } ! } // namespace implementation --- 45,75 ---- inline void update_display_queue(eve_client::visible_change_queue_t* queue, eve_t* layout) { ! if (!queue->empty()) ! { ! eve_client::visible_change_queue_t::iterator mid(adobe::partition(*queue, &eve_client::visible_change_request_t::first)); ! adobe::for_each(mid, queue->end(), boost::bind(&adobe::panel_t::set_visible, boost::bind(&eve_client::visible_change_request_t::second, _1), false)); ! layout->evaluate(adobe::eve_t::evaluate_nested); ! adobe::for_each(queue->begin(), mid, boost::bind(&adobe::panel_t::set_visible, boost::bind(&eve_client::visible_change_request_t::second, _1), true)); ! queue->clear(); ! } } inline void sheet_set_update(sheet_t* sheet, eve_client::visible_change_queue_t* queue, ! eve_t* layout, name_t name, const value_t value) { ! sheet->set(name, value); ! sheet->update(); ! ! update_display_queue(queue, layout); } inline void layout_sheet_set_update(basic_sheet_t* sheet, eve_client::visible_change_queue_t* queue, ! eve_t* layout, name_t name, const value_t value) { ! sheet->set(name, value); ! ! update_display_queue(queue, layout); } ! } // namespace implementation *************** *** 83,168 **** struct factory_token_t { ! factory_token_t(display_t& display, ! sheet_t& sheet, ! eve_client::eve_client_holder& client_holder, ! eve_client::button_notifier_t notifier ! ) : ! display_m(display), ! sheet_m(sheet), ! client_holder_m(client_holder), ! notifier_m(notifier) ! {} ! ! typedef sheet_t::monitor_active_t monitor_active_t; ! typedef sheet_t::monitor_value_t monitor_value_t; ! ! /* ! REVISIT (sparent) : Token is starting to look like a "binding" abstraction of some sort. ! ! We're going to add a bind function to the factory token to take care of the complexity ! of binding to a layout_sheet or sheet. ! ! REVISIT (sparent) : This code also indicates problems with the current sheet interfaces: ! ! 1. There should be some way to build a single index for both sheets to cover the entire ! scope. ! 2. The set() functions may become functions which return setter objects and don't need to ! do the lookup. ! */ ! monitor_value_t bind(name_t name, const monitor_active_t& monitor_active, const monitor_value_t& monitor_value) const ! { ! if (client_holder_m.layout_sheet_m.count_interface(name)) ! { ! client_holder_m.assemblage_m.hold_connection(client_holder_m.layout_sheet_m.monitor_interface(name, monitor_value)); ! return boost::bind( &implementation::layout_sheet_set_update, ! &client_holder_m.layout_sheet_m, ! &client_holder_m.visible_change_queue_m, ! &client_holder_m.eve_m, name, _1); ! } ! client_holder_m.assemblage_m.hold_connection(sheet_m.monitor_value(name, monitor_value)); ! client_holder_m.assemblage_m.hold_connection(sheet_m.monitor_active(name, monitor_active)); ! ! return boost::bind( &implementation::sheet_set_update, ! &sheet_m, ! &client_holder_m.visible_change_queue_m, ! &client_holder_m.eve_m, name, _1); ! } ! void bind_in(name_t name, const monitor_value_t& monitor_value) const ! { ! if (client_holder_m.layout_sheet_m.count_interface(name)) ! client_holder_m.assemblage_m.hold_connection(client_holder_m.layout_sheet_m.monitor_interface(name, monitor_value)); ! else ! client_holder_m.assemblage_m.hold_connection(sheet_m.monitor_value(name, monitor_value)); ! } ! // ! /// Created widgets should be made with respect to this display, and inserted ! /// into the given parent by this display. ! // ! display_t& display_m; ! // ! /// The current Adam sheet -- this contains all of the cells which widgets might ! /// want to bind against. ! // ! sheet_t& sheet_m; ! // ! /// The current eve_client_holder -- keeps all the relevant parts of a view in ! /// one location. Originally the factory token was duplication nearly every ! /// member of the client_holder as a member itself, so this cleans up factory_token ! /// quite a bit. ! // ! eve_client::eve_client_holder& client_holder_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; }; --- 83,168 ---- struct factory_token_t { ! factory_token_t(display_t& display, ! sheet_t& sheet, ! eve_client::eve_client_holder& client_holder, ! eve_client::button_notifier_t notifier ! ) : ! display_m(display), ! sheet_m(sheet), ! client_holder_m(client_holder), ! notifier_m(notifier) ! {} ! ! typedef sheet_t::monitor_active_t monitor_active_t; ! typedef sheet_t::monitor_value_t monitor_value_t; ! ! /* ! REVISIT (sparent) : Token is starting to look like a "binding" abstraction of some sort. ! ! We're going to add a bind function to the factory token to take care of the complexity ! of binding to a layout_sheet or sheet. ! ! REVISIT (sparent) : This code also indicates problems with the current sheet interfaces: ! ! 1. There should be some way to build a single index for both sheets to cover the entire ! scope. ! 2. The set() functions may become functions which return setter objects and don't need to ! do the lookup. ! */ ! monitor_value_t bind(name_t name, const monitor_active_t& monitor_active, const monitor_value_t& monitor_value) const ! { ! if (client_holder_m.layout_sheet_m.count_interface(name)) ! { ! client_holder_m.assemblage_m.hold_connection(client_holder_m.layout_sheet_m.monitor_interface(name, monitor_value)); ! return boost::bind( &implementation::layout_sheet_set_update, ! &client_holder_m.layout_sheet_m, ! &client_holder_m.visible_change_queue_m, ! &client_holder_m.eve_m, name, _1); ! } ! client_holder_m.assemblage_m.hold_connection(sheet_m.monitor_value(name, monitor_value)); ! client_holder_m.assemblage_m.hold_connection(sheet_m.monitor_active(name, monitor_active)); ! ! return boost::bind( &implementation::sheet_set_update, ! &sheet_m, ! &client_holder_m.visible_change_queue_m, ! &client_holder_m.eve_m, name, _1); ! } ! void bind_in(name_t name, const monitor_value_t& monitor_value) const ! { ! if (client_holder_m.layout_sheet_m.count_interface(name)) ! client_holder_m.assemblage_m.hold_connection(client_holder_m.layout_sheet_m.monitor_interface(name, monitor_value)); ! else ! client_holder_m.assemblage_m.hold_connection(sheet_m.monitor_value(name, monitor_value)); ! } ! // ! /// Created widgets should be made with respect to this display, and inserted ! /// into the given parent by this display. ! // ! display_t& display_m; ! // ! /// The current Adam sheet -- this contains all of the cells which widgets might ! /// want to bind against. ! // ! sheet_t& sheet_m; ! // ! /// The current eve_client_holder -- keeps all the relevant parts of a view in ! /// one location. Originally the factory token was duplication nearly every ! /// member of the client_holder as a member itself, so this cleans up factory_token ! /// quite a bit. ! // ! eve_client::eve_client_holder& client_holder_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; }; *************** *** 175,212 **** struct widget_node_t { ! widget_node_t( size_enum_t size, ! const eve_t::iterator& eve_token, ! const display_t::position_t& display_token #ifndef NDEBUG ! , const ui_overlay_t::position_t& overlay_token #endif ! ) : ! size_m(size), ! eve_token_m(eve_token), ! display_token_m(display_token) #ifndef NDEBUG ! , overlay_token_m(overlay_token) #endif ! { } ! // ! /// 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. ! // ! eve_t::iterator eve_token_m; ! // ! /// The widget as known by the display. ! /// This should *not* be mutable -- for now it's more convenient. ! // ! mutable display_t::position_t display_token_m; #ifndef NDEBUG ! // ! /// The widget as known by the overlay. ! /// This should *not* be mutable -- for now it's more convenient. ! // ! mutable ui_overlay_t::position_t overlay_token_m; #endif }; --- 175,212 ---- struct widget_node_t { ! widget_node_t( size_enum_t size, ! const eve_t::iterator& eve_token, ! const display_t::position_t& display_token #ifndef NDEBUG ! , const ui_overlay_t::position_t& overlay_token #endif ! ) : ! size_m(size), ! eve_token_m(eve_token), ! display_token_m(display_token) #ifndef NDEBUG ! , overlay_token_m(overlay_token) #endif ! { } ! // ! /// 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. ! // ! eve_t::iterator eve_token_m; ! // ! /// The widget as known by the display. ! /// This should *not* be mutable -- for now it's more convenient. ! // ! mutable display_t::position_t display_token_m; #ifndef NDEBUG ! // ! /// The widget as known by the overlay. ! /// This should *not* be mutable -- for now it's more convenient. ! // ! mutable ui_overlay_t::position_t overlay_token_m; #endif }; *************** *** 217,229 **** /// not valid then a std::runtime_error exception is thrown. /// ! /// \param name the name of the widget to create, like "button" or "checkbox". ! /// \param parameters a dictionary of paramters for the new widget. ! /// \param parent the parent widget for this new (child) widget. This parameter ! /// may be zero when creating top-level widgets, such as windows. ! /// \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); --- 217,229 ---- /// not valid then a std::runtime_error exception is thrown. /// ! /// \param name the name of the widget to create, like "button" or "checkbox". ! /// \param parameters a dictionary of paramters for the new widget. ! /// \param parent the parent widget for this new (child) widget. This parameter ! /// may be zero when creating top-level widgets, such as windows. ! /// \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); *************** *** 233,243 **** /// 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); --- 233,243 ---- /// 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); *************** *** 247,257 **** /// 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); --- 247,257 ---- /// 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); *************** *** 261,271 **** /// 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); --- 261,271 ---- /// 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); *************** *** 275,285 **** /// 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. /// ! /// \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 dialog_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); --- 275,285 ---- /// 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. /// ! /// \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 dialog_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); *************** *** 289,299 **** /// 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. /// ! /// \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 palette_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); --- 289,299 ---- /// 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. /// ! /// \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 palette_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); *************** *** 303,313 **** /// 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. /// ! /// \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 button_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); --- 303,313 ---- /// 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. /// ! /// \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 button_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); *************** *** 317,327 **** /// 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. /// ! /// \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 checkbox_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); --- 317,327 ---- /// 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. /// ! /// \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 checkbox_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); *************** *** 331,341 **** /// 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. /// ! /// \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 radio_button_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); --- 331,341 ---- /// 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. /// ! /// \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 radio_button_factory(const dictionary_t& parameters, const widget_node_t& parent, const factory_token_t& token); *************** *** 345,355 **** /// 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. /// ! /// \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 edit_text_f... [truncated message content] |