Mercurial > octave-dspies
view examples/addtwomatrices.cc @ 18707:f31fde98c872 gui-release
use shortcut manager for the window menu
* main-window.cc (construct_window_menu_item): add action and connect its slot;
(construct_window_menu): created menu actions are class variables, removed
calls to connect which are now obsolete here;
(set_global_shortcuts): call shortcut manager for setting the shortcuts
* main-window.h: construct_window_menu_item with other parameters, window
actions as class variables
* shirtcut-manger.cc (do_init_data): insert debug actions into the list
author | Torsten <ttl@justmail.de> |
---|---|
date | Wed, 30 Apr 2014 19:33:55 +0200 |
parents | be41c30bcb44 |
children |
line wrap: on
line source
#include <octave/oct.h> DEFUN_DLD (addtwomatrices, args, , "Add A to B") { int nargin = args.length (); if (nargin != 2) print_usage (); else { NDArray A = args(0).array_value (); NDArray B = args(1).array_value (); if (! error_state) return octave_value (A + B); } return octave_value_list (); }