View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 7 Downloads (last 30 days) File Size: 29.4 KB File ID: #42535 Version: 1.7
image thumbnail




08 Jul 2013 (Updated )

STACKOBJ is a handle class object that can be used to manage properties and callbacks in a stack.

| Watch this File

File Information

There are many interactive tools that have been provided by the community that can provide great features to users of deployed applications. However, many of these fine tools tend to conflict if used together.

A good example of this is using dragzoom to zoom and/or pan interactively into an interesting data feature and then using dualcursor to inspect values. Dragzoom does a good job of restoring the callbacks that were in place prior to it's execution (it was a major inspiration for this class file), but it has no knowledge of what callbacks have been assigned afterward. Thus, turning dragzoom off in the middle of using dualcursor results in a loss of the callbacks required by the latter tool. The same is true if dualcursor is turned off. A developer may use stackobj to manage any multiple of such interactive tools and their callbacks.

The included file stackobj_demo.m is the best explanation of the utility of this submission.

This class may also be utilized to save and restore any set of properties of any object. One could also easily implement an undo feature with this object.


Dualcursor, Display Cursor Location, and Dragzoom Drag And Zoom Tool inspired this file.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
09 Jul 2013 1.3

updating description and title

11 Jul 2013 1.5

added helper method, auto_wipe feature, and keyword shortcuts 'all' and 'callbacks', changed demo file

22 Jul 2013 1.7

Updated description. Added listener to watch the target properties to prevent a tool lower in the stack from changing the active callbacks.

Contact us