comparison libgui/graphics/Menu.cc @ 30999:fef2957c38ec

Deprecate uimenu properties "label" and "callback" (bug #62443) Replace "label" property with "text". Replace "callback" property with "menuselectedfcn". Both old properties are hidden, but continue to exist and work as before to support old code. * NEWS.8.md: Announce deprecation. * graphics.in.h (uimenu::BEGIN_PROPERTIES): Mark "callback" property with "hgs" for hidden, get, set routines. Mark "label" property with "hgs". * graphics.in.h (uimenu::get_callback, uimenu::set_callback): New functions which simply relay calls to "get_menuselectedfcn" and "set_menuselectedfcn". * Menu.cc (Menu::actionTriggered, Menu::actionHovered): Replace "callback" with "menuselectedfcn" in gh_callback_event calls. * __init_fltk__.cc (script_cb): Rename "execute_callback" to "execute_menuselectedfcn". * __init_fltk__.cc (update_menuselectedfcn): Rename function from "update_callback". Rename "get_callback" to "get_menuselectedfcn". * __init_fltk__.cc (add_to_uimenu): Rename "update_callback" to "update_menuselectedfcn". * __init_fltk__.cc (uimenu_update): Rename "ID_CALLBACK" to "ID_MENUSELECTEDFCN". * uimenu.m: Update documentation to use "menuselectedfcn" and "text". Update demos and BIST tests to use new property names. * __add_default_menu__.m: Update code to use "menuselectedfcn" and "text".
author Rik <rik@octave.org>
date Sat, 14 May 2022 19:06:56 -0700
parents 796f54d4ddbf
children ca7d58406f82 c6d54dd31a7e
comparison
equal deleted inserted replaced
30998:1bf26f913b9c 30999:fef2957c38ec
292 { 292 {
293 QAction *action = qWidget<QAction> (); 293 QAction *action = qWidget<QAction> ();
294 294
295 if (action->isCheckable ()) 295 if (action->isCheckable ())
296 action->setChecked (! action->isChecked ()); 296 action->setChecked (! action->isChecked ());
297 emit gh_callback_event (m_handle, "callback"); 297 emit gh_callback_event (m_handle, "menuselectedfcn");
298 } 298 }
299 299
300 void 300 void
301 Menu::actionHovered (void) 301 Menu::actionHovered (void)
302 { 302 {
303 emit gh_callback_event (m_handle, "callback"); 303 emit gh_callback_event (m_handle, "menuselectedfcn");
304 } 304 }
305 305
306 void 306 void
307 Menu::updateSiblingPositions (void) 307 Menu::updateSiblingPositions (void)
308 { 308 {