time | Calls | line |
---|
| | 1 | function out = findToolbarModeButtonsById(toolbarChildren,id)
|
| | 2 | % This function is undocumented and will change in a future release
|
| | 3 |
|
| | 4 | % Returns objects where the tag or toolid appdata matches the specified id.
|
| | 5 | % This is used by uigettool and implementations of uimodes to find mode toolbar
|
| | 6 | % buttons in standard figure or in GUIDE
|
| | 7 |
|
| | 8 | % Copyright 2019 The MathWorks, Inc.
|
| | 9 |
|
< 0.001 | 16 | 10 | out = [];
|
< 0.001 | 16 | 11 | for i=1:length(toolbarChildren)
|
| | 12 | % getappdata expects a handle object. Some object in the cameratoolbar
|
| | 13 | % are not handle objects so when it is visible, and rotate is activated,
|
| | 14 | % this will error g2054396
|
0.007 | 160 | 15 | if ishandle(toolbarChildren(i))
|
0.004 | 160 | 16 | toolid = getappdata(toolbarChildren(i),'toolid');
|
0.010 | 160 | 17 | if isequal(get(toolbarChildren(i),'Tag'), id) || isequal(toolid, id)
|
< 0.001 | 16 | 18 | out = [out; toolbarChildren(i)]; %#ok<AGROW>
|
< 0.001 | 160 | 19 | end
|
< 0.001 | 160 | 20 | end
|
< 0.001 | 160 | 21 | end
|