Forgot to document a new function,

...added documentation renamed it and did some minor cleanups.
This commit is contained in:
Mark de Wever 2008-06-22 18:08:30 +00:00
parent f2f84a592a
commit dc4ed7241b
3 changed files with 14 additions and 6 deletions

View File

@ -532,7 +532,7 @@ void tlistbox::trow::init_in_grid(tgrid* grid,
}
} else if(panel) {
panel->set_callback_mouse_left_click(callback_select_list_item);
panel->set_data(data);
panel->set_members(data);
} else if(child_grid) {
init_in_grid(child_grid, data);
} else {

View File

@ -39,15 +39,15 @@
namespace gui2 {
void ttoggle_panel::set_data(const std::map<std::string /* widget id */, std::map<
void ttoggle_panel::set_members(const std::map<std::string /* widget id */, std::map<
std::string /* member id */, t_string /* member value */> >& data)
{
// typedef boost problem work around.
typedef std::pair<std::string, std::map<std::string, t_string> > hack ;
foreach(const hack& item, data) {
tcontrol* widget = dynamic_cast<tcontrol*>(find_widget(item.first, false));
if(widget) {
widget->set_members(item.second);
tcontrol* control = dynamic_cast<tcontrol*>(find_widget(item.first, false));
if(control) {
control->set_members(item.second);
}
}
}

View File

@ -36,7 +36,15 @@ public:
{
}
void set_data(const std::map<std::string /* widget id */, std::map<
/**
* Sets the members of the child controls.
*
* Sets the members for all controls which have the proper member id. See
* tcontrol::set_members for more info.
*
* @param data Map with the key value pairs to set the members.
*/
void set_members(const std::map<std::string /* widget id */, std::map<
std::string /* member id */, t_string /* member value */> >& data);
/***** ***** ***** ***** Inherited ***** ***** ***** *****/