Bookmarks

GUI component

A user interface widget (see IWidget API) may have persistent settings which are stored in a plain JSON file.

The Bookmarks GUI component can be used to define up to ten bookmarks: each bookmark represents a separate JSON settings file, including a screenshot of the corresponding visual output of the widget.

This is an example for a JSON settings file of the Mandelbrot tutorial:

{
  "gui": {
    "slots": [{
        "collapsed": false,
        "panels": [{
            "name": "Mandelbrot",
            "collapsed": true
          }, {
            "name": "Bookmarks",
            "collapsed": false
          }]
      }, {
        "collapsed": false
      }]
  },
  "mandelbrot": {
    "bounds": [{
        "pMin": -2,
        "pMax": 0.5,
        "qMin": -1.25,
        "qMax": 1.25
      }]
  }
}}

Usually, the settings include the user interface state (e.g. collapsed state of trees and panels, state of checkboxes or choices, etc. ) as well as the state of the widget itself, such as camera position, map coordinates or zoom level.

BookmarksGui

The buttons and corresponding keyboard shortcuts can be used to manage bookmarks quickly.

Save

The Save button saves the current widget state as a new bookmark, overwriting the existing one, if present.

Load

The Load button loads the bookmark and restores the widget state accordingly.

Delete

The Delete button deletes the corresponding bookmark.