OptionBox::~OptionBox() { if (popup) { GUI_DELETE( popup ); } clear_deferred_list(); }
MenuBox::~MenuBox() { if (popup) { GUI_DELETE( popup ); } clear_deferred_list(); }
void OptionBox::clear() { if (popup) popup->clear(); clear_deferred_list(); }
void OptionBox::set_in_window() { popup = GUI_NEW( PopUpMenu( get_window() ) ); popup->selected_id_signal.connect( this, &OptionBox::item_activated ); DeferredAdd *l=deferred_add_list; while (l) { if (l->is_sep) add_separator(); else if (l->bitmap<0) add_item( l->text, l->id,l->shortcut, l->shortcut_active ); else add_item( l->bitmap, l->text, l->id,l->shortcut, l->shortcut_active ); l=l->next; } clear_deferred_list(); }
void MenuBox::clear() { popup->clear(); clear_deferred_list(); }