geometryUI::geometryUI() { // constructor 
  Add(3/*how many*/, xUI,"X",0., yUI,"Y",0., zUI,"Z",0.); // add to base class managed list. 
  load();  // Set defaults. 
  sync(0); // Redraw UI. 
} 
The base class "plug" (or "plugin") keeps lists of components.  That's about all it needs to supply save, load, restore, undo, print, and cut/paste.void Dashboard::sync(Widget*o) { 
  if (o== heatOnUI) turn_heat_on(); 
  if (o==radioOnUI) turn_radio_on(); 
  // etc, then: 
  heatOnUI ->value(is_heat_on()); 
  radioOnUI->value(is_radio_on()); 
  if (o) do_callback(); // "o" not null means a sub-component called sync(). 
} 
//... 
void Interior::sync(Widget*o) { 
  if (o== dashboardUI) play_annoying_ding(); 
  if (o==smartphoneUI)  inform_government(); 
  // etc, then: 
  dashboardUI ->sync(0); 
  smartphoneUI->sync(0); 
  if (o) do_callback(); 
}nedwaves.com 2017 [171108]