이 제출물을 팔로우합니다
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다
Handy function to add/remove/append an arbitrary number of callbacks to an object (e.g. figure, axes, line, patch, surface, text, image, zoom, pan, rotate, ...).
This function is extremely useful, if you write general purpose functions, which should be executed as object-callbacks without deleting any already existing callback(s).
A simple example can illustrate the functionality. Click on the current axis after executing each command:
CallbackStack(gca,'ButtonDownFcn','disp(''Hello'')') % Now click
CallbackStack(gca,'ButtonDownFcn',{@disp, 'World'}) % Click again
CallbackStack(gca,'ButtonDownFcn',{@disp, 'Hello'}) % ...
CallbackStack(gca,'ButtonDownFcn',{@disp, 'Hello'})
CallbackStack(gca,'ButtonDownFcn',{@disp, 'World'},'add')
CallbackStack(gca,'ButtonDownFcn',{@disp, 'World'},'remove')
This should give you an idea of how to add/append/remove callbacks to an object. OK, hope you find this useful. For further details have a look in the help contained in the file.
Sebastian
인용 양식
Sebastian Hölz (2026). Callback Stack (https://kr.mathworks.com/matlabcentral/fileexchange/21625-callback-stack), MATLAB Central File Exchange. 검색 날짜: .
