time | Calls | line |
---|
| | 1 | function [out] = uigettool(fig,id)
|
| | 2 | % This function is undocumented and will change in a future release
|
| | 3 |
|
| | 4 | % C = UIGETTOOL(H,'GroupName.ComponentName')
|
| | 5 | % H is a vector of toolbar handles or a figure handle
|
| | 6 | % 'GroupName' is the name of the toolbar group
|
| | 7 | % 'ComponentName' is the name of the toolbar component
|
| | 8 | % C is a toolbar component
|
| | 9 | %
|
| | 10 | % See also UITOOLFACTORY
|
| | 11 |
|
| | 12 | % Copyright 1984-2016 The MathWorks, Inc.
|
| | 13 |
|
| | 14 | % Note: All code here must have fast performance
|
| | 15 | % since this function will be used in callbacks.
|
< 0.001 | 16 | 16 | if ~all(ishghandle(fig))
|
| | 17 | error(message('MATLAB:uigettool:InvalidHandle'));
|
< 0.001 | 16 | 18 | end
|
< 0.001 | 16 | 19 | if length(fig) == 1 && ishghandle(fig,'figure')
|
| | 20 |
|
| | 21 | % check for live editor defaults and switch to standard defaults
|
0.001 | 16 | 22 | if strcmp(get(fig,'ToolBar'),'none') && ...
|
| | 23 | strcmp(get(fig,'MenuBar'),'none') && ...
|
| | 24 | strcmp(get(fig,'MenuBarMode'),'auto') && ...
|
| | 25 | strcmp(get(fig,'ToolBarMode'),'auto')
|
| | 26 | set(fig,'MenuBar','figure')
|
| | 27 | set(fig,'ToolBar','auto')
|
< 0.001 | 16 | 28 | end
|
| | 29 |
|
0.021 | 16 | 30 | fig = findobj(allchild(fig),'flat','Type','uitoolbar');
|
< 0.001 | 16 | 31 | end
|
| | 32 |
|
| | 33 |
|
0.013 | 16 | 34 | children = findall(fig);
|
| | 35 |
|
0.025 | 16 | 36 | out = matlab.ui.internal.findToolbarModeButtonsById(children,id);
|
Other subfunctions in this file are not included in this listing.