mod/maxgui.mod/fltkmaxgui.mod/src/Fl_Menu_.cxx
const Fl_Menu_Item* Fl_Menu_::picked(const Fl_Menu_Item* v) {
  if (v) {
    if (v->radio()) {
      if (!v->value()) { // they are turning on a radio item
	set_changed();
	((Fl_Menu_Item*)v)->setonly();
      }
      redraw();
    } else if (v->flags & FL_MENU_TOGGLE) {
      set_changed();
      ((Fl_Menu_Item*)v)->flags ^= FL_MENU_VALUE;
      redraw();
    } else if (v != value_) { // normal item
      set_changed();
    }
    value_ = v;
    if (when()&(FL_WHEN_CHANGED|FL_WHEN_RELEASE)) {
      if (changed() || when()&FL_WHEN_NOT_CHANGED) {
	if (value_ && value_->callback_) value_->do_callback((Fl_Widget*)this);
	else do_callback();
      }
    }
  }
  return v;
}
/** 
 When user picks a menu item, call this.  It will do the callback.
 Unfortunately this also casts away const for the checkboxes, but this
 was necessary so non-checkbox menus can really be declared const...
*/
When user picks a menu item, call this.  It will do the callback.
Unfortunately this also casts away const for the checkboxes, but this
was necessary so non-checkbox menus can really be declared const
When user picks a menu item call this . It will do the callback . Unfortunately this also casts away const for the checkboxes but this was necessary so non - checkbox menus can really be declared const
const Fl_Menu_Item* Fl_Menu_::picked(const Fl_Menu_Item* v) {
  if (v) {
    if (v->radio()) {
      if (!v->value()) { 
	set_changed();
	((Fl_Menu_Item*)v)->setonly();
      }
      redraw();
    } else if (v->flags & FL_MENU_TOGGLE) {
      set_changed();
      ((Fl_Menu_Item*)v)->flags ^= FL_MENU_VALUE;
      redraw();
    } else if (v != value_) { 
      set_changed();
    }
    value_ = v;
    if (when()&(FL_WHEN_CHANGED|FL_WHEN_RELEASE)) {
      if (changed() || when()&FL_WHEN_NOT_CHANGED) {
	if (value_ && value_->callback_) value_->do_callback((Fl_Widget*)this);
	else do_callback();
      }
    }
  }
  return v;
}
const Fl_Menu_Item * Fl_Menu_ :: picked ( const Fl_Menu_Item * v ) { if ( v ) { if ( v -> radio ( ) ) { if ( ! v -> value ( ) ) { set_changed ( ) ; ( ( Fl_Menu_Item * ) v ) -> setonly ( ) ; } redraw ( ) ; } else if ( v -> flags & FL_MENU_TOGGLE ) { set_changed ( ) ; ( ( Fl_Menu_Item * ) v ) -> flags ^= FL_MENU_VALUE ; redraw ( ) ; } else if ( v != value_ ) { set_changed ( ) ; } value_ = v ; if ( when ( ) & ( FL_WHEN_CHANGED | FL_WHEN_RELEASE ) ) { if ( changed ( ) || when ( ) & FL_WHEN_NOT_CHANGED ) { if ( value_ && value_ -> callback_ ) value_ -> do_callback ( ( Fl_Widget * ) this ) ; else do_callback ( ) ; } } } return v ; }
When user picks a menu item, call this.
When user picks a menu item call this .
// they are turning on a radio item // normal item