mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Menu_.cxx
void Fl_Menu_::copy(const Fl_Menu_Item* m, void* ud) {
  int n = m->size();
  Fl_Menu_Item* newMenu = new Fl_Menu_Item[n];
  memcpy(newMenu, m, n*sizeof(Fl_Menu_Item));
  menu(newMenu);
  alloc = 1; // make destructor free array, but not strings
  // for convenience, provide way to change all the user data pointers:
  if (ud) for (; n--;) {
    if (newMenu->callback_) newMenu->user_data_ = ud;
    newMenu++;
  }
}
/** 
  Sets the menu array pointer with a copy of m that will be automatically deleted. 
  If userdata \p ud is not NULL, then all user data pointers are changed in the menus as well.
  See void Fl_Menu_::menu(const Fl_Menu_Item* m). 
*/
Sets the menu array pointer with a copy of m that will be automatically deleted.
If userdata \p ud is not NULL, then all user data pointers are changed in the menus as well.
Sets the menu array pointer with a copy of m that will be automatically deleted . If userdata \ p ud is not NULL then all user data pointers are changed in the menus as well .
void Fl_Menu_::copy(const Fl_Menu_Item* m, void* ud) {
  int n = m->size();
  Fl_Menu_Item* newMenu = new Fl_Menu_Item[n];
  memcpy(newMenu, m, n*sizeof(Fl_Menu_Item));
  menu(newMenu);
  alloc = 1; 
  if (ud) for (; n--;) {
    if (newMenu->callback_) newMenu->user_data_ = ud;
    newMenu++;
  }
}
void Fl_Menu_ :: copy ( const Fl_Menu_Item * m , void * ud ) { int n = m -> size ( ) ; Fl_Menu_Item * newMenu = new Fl_Menu_Item [ n ] ; memcpy ( newMenu , m , n * sizeof ( Fl_Menu_Item ) ) ; menu ( newMenu ) ; alloc = 1 ; if ( ud ) for ( ; n -- ; ) { if ( newMenu -> callback_ ) newMenu -> user_data_ = ud ; newMenu ++ ; } }
Sets the menu array pointer with a copy of m that will be automatically deleted.
Sets the menu array pointer with a copy of m that will be automatically deleted .
// make destructor free array, but not strings // for convenience, provide way to change all the user data pointers: