This is a static copy of a profile report

Home

scribe.legend.methods>set_contextmenu (2 calls, 0.073 sec)
Generated 18-Mar-2011 23:32:04 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/@scribe/@legend/methods.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
scribe.legend.methodsM-function2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
1131
hMenu = graph2dhelper('createS...
20.021 s28.6%
1190
set(findall(hMenu),'Visible','...
20.010 s14.3%
1168
hMenu(end+1) = graph2dhelper('...
20.010 s14.3%
1160
hMenu(end+1) = graph2dhelper('...
20.010 s14.3%
1157
hMenu(end+1) = graph2dhelper('...
20.010 s14.3%
All other lines  0.010 s14.3%
Totals  0.073 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
graph2dhelperM-function180.062 s85.7%
findallM-function100.010 s14.3%
flipudM-function60 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.073 s100% 
M-Lint results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function80
Non-code lines (comments, blank lines)32
Code lines (lines that can run)48
Code lines that did run48
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1123 function set_contextmenu(h,onoff) %#ok
1124
2 1125 fig = ancestor(h,'figure');
2 1126 uic = get(h,'UIContextMenu');
2 1127 if isempty(uic)
2 1128 uic = uicontextmenu('Parent',fig,'HandleVisibility','off');
2 1129 setappdata(uic,'CallbackObject',h);
1130 % Refresh
0.02 2 1131 hMenu = graph2dhelper('createScribeUIMenuEntry',fig,'GeneralAction','Refresh','','',{@refresh_cb,h});
2 1132 set(hMenu,'Tag','scribe:legend:refresh');
1133 % Delete
2 1134 hMenu(end+1) = graph2dhelper('createScribeUIMenuEntry',fig,'GeneralAction','Delete','','',{@delete_cb,h});
2 1135 set(hMenu(end),'Tag','scribe:legend:delete');
1136 % Color
2 1137 hMenu(end+1) = graph2dhelper('createScribeUIMenuEntry',fig,'Color','Color ...','Color','Color');
2 1138 set(hMenu(end),'Separator','on');
2 1139 set(hMenu(end),'Tag','scribe:legend:color');
1140 % Edge color (xcolor and ycolor)
0.01 2 1141 hMenu(end+1) = graph2dhelper('createScribeUIMenuEntry',fig,'Color','Edge Color ...',{'XColor','YColor'},'Edge Color');
2 1142 set(hMenu(end),'Tag','scribe:legend:edgecolor');
1143 % Line width
2 1144 hMenu(end+1) = graph2dhelper('createScribeUIMenuEntry',fig,'LineWidth','Line Width','LineWidth','Line Width');
2 1145 set(hMenu(end),'Tag','scribe:legend:linewidth');
2 1146 hChil = findall(hMenu(end));
2 1147 hChil = hChil(2:end);
2 1148 widthTags = {'scribe:legend:linewidth:12.0';'scribe:legend:linewidth:11.0';...
1149 'scribe:legend:linewidth:10.0';'scribe:legend:linewidth:9.0';...
1150 'scribe:legend:linewidth:8.0';'scribe:legend:linewidth:7.0';...
1151 'scribe:legend:linewidth:6.0';'scribe:legend:linewidth:5.0';...
1152 'scribe:legend:linewidth:4.0';'scribe:legend:linewidth:3.0';...
1153 'scribe:legend:linewidth:2.0';'scribe:legend:linewidth:1.0';...
1154 'scribe:legend:linewidth:0.5'};
2 1155 set(hChil,{'Tag'},widthTags);
1156 % Font properties
0.01 2 1157 hMenu(end+1) = graph2dhelper('createScribeUIMenuEntry',fig,'Font','Font ...','','Font');
2 1158 set(hMenu(end),'Tag','scribe:legend:font');
1159 % Interpreter
0.01 2 1160 hMenu(end+1) = graph2dhelper('createScribeUIMenuEntry',fig,'TextInterpreter','Interpreter','Interpreter','Interpreter');
2 1161 set(hMenu(end),'Tag','scribe:legend:interpreter');
2 1162 hChil = findall(hMenu(end));
2 1163 hChil = flipud(hChil(2:end));
2 1164 intTags = {'scribe:legend:interpreter:latex';'scribe:legend:interpreter:tex';...
1165 'scribe:legend:interpreter:none'};
2 1166 set(hChil,{'Tag'},intTags);
1167 % Location
0.01 2 1168 hMenu(end+1) = graph2dhelper('createScribeUIMenuEntry',fig,'EnumEntry','Location','Location','Location',...
1169 {'Best','Inside North East','Outside North East','Inside South East',...
1170 'Inside North West','Outside North West','Inside South West'},...
1171 {'Best','NorthEast','NorthEastOutside','SouthEast','NorthWest','NorthWestOutside','SouthWest'});
2 1172 set(hMenu(end),'Tag','scribe:legend:location');
2 1173 hChil = findall(hMenu(end));
2 1174 hChil = flipud(hChil(2:end));
2 1175 loctags = {'scribe:legend:location:best';'scribe:legend:location:northeast';...
1176 'scribe:legend:location:northeastoutside';'scribe:legend:location:southeast';...
1177 'scribe:legend:location:northwest';'scribe:legend:location:northwestoutside';...
1178 'scribe:legend:location:southwest'};
2 1179 set(hChil,{'Tag'},loctags);
1180 % Orientation
2 1181 hMenu(end+1) = graph2dhelper('createScribeUIMenuEntry',fig,'EnumEntry','Orientation','Orientation','Orientation',...
1182 {'vertical','horizontal'},{'vertical','horizontal'});
2 1183 set(hMenu(end),'Tag','scribe:legend:orientation');
2 1184 hChil = findall(hMenu(end));
2 1185 hChil = flipud(hChil(2:end));
2 1186 ortags = {'scribe:legend:orientation:vertical';'scribe:legend:orientation:horizontal'};
2 1187 set(hChil,{'Tag'},ortags);
1188 % Set the parent of the menus
2 1189 set(hMenu,'Parent',uic);
0.01 2 1190 set(findall(hMenu),'Visible','on');
1191 % Property Editor
2 1192 hMenu = uimenu(uic,'HandleVisibility','off','Separator','on',...
1193 'Label','Show Property Editor','Callback',{@localOpenPropertyEditor,h});
2 1194 set(hMenu,'Tag','scribe:legend:propedit');
1195 % M-Code
2 1196 hMenu = uimenu(uic,'HandleVisibility','off','Separator','on',...
1197 'Label','Show M-Code','Callback',{@localGenerateMCode,h});
2 1198 set(hMenu,'Tag','scribe:legend:mcode');
1199
1200 % set the context menu
2 1201 set(h,'uicontextmenu',uic);
2 1202 end

Other subfunctions in this file are not included in this listing.