Listing 3


// create
ptr<> surf = create_surface("fill");
// set its name
surf->object_name("bg");

// add it to an existing surface
//
// returns true if it's been added,
// or false if there's already a 
// surface with this name
bool added = 
  parent->add_if_not_already_in(surf);