Add getExpandState callback which allows saving expand/collapse state

[resolves #78]
Merge branch 'get-expand-state' into dev
Build