Loading @Cell/pb_call.m +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,9 @@ gui.undo_man.new_state(undo_data); end gui.update_undoredo end No newline at end of file @GUI/GUI.m +2 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,8 @@ classdef GUI < handle multi_opt_out = []; version = '0.1'; undo_man = []; undo_opt = []; redo_opt = []; end methods Loading @GUI/init.m +9 −6 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ 'FontWeight','bold',... 'FontSize',12,... 'Max',2.0,... 'KeyPressFcn',@(src,event)textbox_callback(object,src,event),... 'BackgroundColor',[1 1 1]); % input list label Loading @@ -119,6 +120,7 @@ 'FontWeight','bold',... 'Max',2.0,... 'FontSize',12,... 'KeyPressFcn',@(src,event)textbox_callback(object,src,event),... 'BackgroundColor',[1 1 1]); %object.multi_grp = uibuttongroup(... Loading Loading @@ -163,8 +165,8 @@ uimenu(filemenu,'Label','Save to Block','Separator','on','Accelerator','s','Callback',@(src,event)save_call(object,src,event)); uimenu(filemenu,'Label','Save to M-File','Callback',@(src,event)save_ext_call(object,src,event)); uimenu(filemenu,'Label','Close','Accelerator','w','Separator','on','Callback',@(src,event)close_fig(object,src,event)); uimenu(editmenu,'Label','Undo','Accelerator','z','Callback',@(src,event)undo_call(object,src,event)); uimenu(editmenu,'Label','Redo','Accelerator','r','Callback',@(src,event)redo_call(object,src,event)); object.undo_opt = uimenu(editmenu,'Label','Undo','Accelerator','z','Callback',@(src,event)undo_call(object,src,event)); object.redo_opt = uimenu(editmenu,'Label','Redo','Accelerator','r','Callback',@(src,event)redo_call(object,src,event)); uimenu(editmenu,'Label','Show edit controls','Checked','on','Separator','on'); uimenu(editmenu,'Label','Ports and Data Manager','Accelerator','p','Callback',@(src,event)input_call(object,src,event)); multi_mode_menu = uimenu(editmenu,'Label','Output Mode'); Loading Loading @@ -193,17 +195,17 @@ end object.undo_man = UndoManager(); object.update_Statusbar; object.update_multi_check_status; object.update_undoredo; object.PVS = PVS_checker(object.Data); object.EMLGen = EMLGenerator(object.Data); object.undo_man = UndoManager(); object.initialized = 1; Loading @@ -212,6 +214,7 @@ end Loading @GUI/textbox_callback.m +2 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ %end object.update_undoredo Loading @GUI/update_undoredo.m 0 → 100644 +20 −0 Original line number Diff line number Diff line function [ ] = update_undoredo( object ) % updates the menu options so that they are either enabled or disabled if (object.undo_man.undo_level == 0) set(object.redo_opt,'Enable','off'); else set(object.redo_opt,'Enable','on'); end if (object.undo_man.current_depth == 0) set(object.undo_opt,'Enable','off'); else set(object.undo_opt,'Enable','on'); end end Loading
@Cell/pb_call.m +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,9 @@ gui.undo_man.new_state(undo_data); end gui.update_undoredo end No newline at end of file
@GUI/GUI.m +2 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,8 @@ classdef GUI < handle multi_opt_out = []; version = '0.1'; undo_man = []; undo_opt = []; redo_opt = []; end methods Loading
@GUI/init.m +9 −6 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ 'FontWeight','bold',... 'FontSize',12,... 'Max',2.0,... 'KeyPressFcn',@(src,event)textbox_callback(object,src,event),... 'BackgroundColor',[1 1 1]); % input list label Loading @@ -119,6 +120,7 @@ 'FontWeight','bold',... 'Max',2.0,... 'FontSize',12,... 'KeyPressFcn',@(src,event)textbox_callback(object,src,event),... 'BackgroundColor',[1 1 1]); %object.multi_grp = uibuttongroup(... Loading Loading @@ -163,8 +165,8 @@ uimenu(filemenu,'Label','Save to Block','Separator','on','Accelerator','s','Callback',@(src,event)save_call(object,src,event)); uimenu(filemenu,'Label','Save to M-File','Callback',@(src,event)save_ext_call(object,src,event)); uimenu(filemenu,'Label','Close','Accelerator','w','Separator','on','Callback',@(src,event)close_fig(object,src,event)); uimenu(editmenu,'Label','Undo','Accelerator','z','Callback',@(src,event)undo_call(object,src,event)); uimenu(editmenu,'Label','Redo','Accelerator','r','Callback',@(src,event)redo_call(object,src,event)); object.undo_opt = uimenu(editmenu,'Label','Undo','Accelerator','z','Callback',@(src,event)undo_call(object,src,event)); object.redo_opt = uimenu(editmenu,'Label','Redo','Accelerator','r','Callback',@(src,event)redo_call(object,src,event)); uimenu(editmenu,'Label','Show edit controls','Checked','on','Separator','on'); uimenu(editmenu,'Label','Ports and Data Manager','Accelerator','p','Callback',@(src,event)input_call(object,src,event)); multi_mode_menu = uimenu(editmenu,'Label','Output Mode'); Loading Loading @@ -193,17 +195,17 @@ end object.undo_man = UndoManager(); object.update_Statusbar; object.update_multi_check_status; object.update_undoredo; object.PVS = PVS_checker(object.Data); object.EMLGen = EMLGenerator(object.Data); object.undo_man = UndoManager(); object.initialized = 1; Loading @@ -212,6 +214,7 @@ end Loading
@GUI/textbox_callback.m +2 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ %end object.update_undoredo Loading
@GUI/update_undoredo.m 0 → 100644 +20 −0 Original line number Diff line number Diff line function [ ] = update_undoredo( object ) % updates the menu options so that they are either enabled or disabled if (object.undo_man.undo_level == 0) set(object.redo_opt,'Enable','off'); else set(object.redo_opt,'Enable','on'); end if (object.undo_man.current_depth == 0) set(object.undo_opt,'Enable','off'); else set(object.undo_opt,'Enable','on'); end end