I would like to understand how to build an attached menubar. For example, Image
has the following bar - an attached cell that arises when clicked on:
NotebookOpen@
FileNameJoin[{$InstallationDirectory,
"SystemFiles/FrontEnd/SystemResources/AttachedImage2D.nb"}]
Here's a minimal example that will show the bar:
RawBoxes @ GraphicsBox[
TagBox[
RasterBox@{{{0, 0, 255}}},
BoxForm`ImageTag["Byte"]
], ImageSizeRaw -> {2, 2}]
So far as I can tell, the TagBox
and ImageSizeRaw
options are both necessary - removing either causes the AttachedImage2D to go away.
Such a tutorial would be need to explain three things:
- How to build the GUI cell (something that looks like AttachedImage2D)?
- How to access/alter the data of the boxed object to which it is attached?
- How to associate the bar to a specific type of box and trigger it on clicks?
If a developer could help explain this, there are tons of fun applications here, e.g. making an AttachedGraph2D/3D cells, etc.