This is a static copy of a profile report

Home

gcbo (105 calls, 0.022 sec)
Generated 05-Aug-2011 13:01:36 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/gcbo.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
gcbffunction91
graphics/private/clofunction9
subplotfunction1
closereqfunction4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
49
fig = ancestor(object,'figure'...
510.011 s50.0%
41
object = [];
400.011 s50.0%
51
end
910 s0%
50
end
510 s0%
48
else
510 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function51
Non-code lines (comments, blank lines)40
Code lines (lines that can run)11
Code lines that did run11
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function [object, fig] = gcbo
2 %GCBO Get handle to current callback object.
3 % OBJECT = GCBO returns the handle of the object whose callback is
4 % currently executing. This handle is obtained from the root property
5 % 'CallbackObject'.
6 %
7 % [OBJECT, FIGURE] = GCBO returns the handle of the object whose callback
8 % is currently executing, and the figure containing that object.
9 %
10 % During a callback, GCBO can be used to obtain the handle of the object
11 % whose callback is executing, and the figure which contains that object.
12 % If one callback is interrupted by another, the root CallbackObject is
13 % updated to contain the handle of the object whose callback is
14 % interrupting. When the execution of the interrupting callback has
15 % completed, and the execution of the original callback resumes, the root
16 % CallbackObject is restored to contain the handle of the original object.
17 %
18 % The root CallbackObject property is read-only, so its value is
19 % guaranteed to be valid at any time during a callback. The root
20 % CurrentFigure property, and the figure CurrentAxes and CurrentObject
21 % properties (returned by GCF, GCA, and GCO respectively) are
22 % user-settable, so they may change during the execution of a callback,
23 % especially if that callback is interrupted by another callback. As a
24 % result, those functions should not be considered interchangeable with
25 % GCBO, because they are not reliable indicators of which object's
26 % callback is executing.
27 %
28 % When no callbacks are executing, GCBO returns []. If the current object
29 % gets deleted during callback execution, GCBO returns [].
30 %
31 % See also GCO, GCF, GCA, GCBF.
32
33 % Copyright 1984-2005 The MathWorks, Inc.
34 % $Revision: 1.17.4.5 $ $Date: 2008/08/01 12:23:10 $
35
105 36 object = get(0, 'CallbackObject');
37
38 % If object is not a handle, it was likely deleted, return empty
39 % to prevent subsequent GETs from failing.
105 40 if isempty(object) || ~(ishghandle(object) || ishandle(object))
0.01 40 41 object = [];
40 42 end
43
44 % return the figure containing the object, if requested:
105 45 if nargout == 2
91 46 if isempty(object)
40 47 fig = [];
51 48 else
0.01 51 49 fig = ancestor(object,'figure');
51 50 end
91 51 end