I’d like to make (most of) the dockable widgets available when running Octave in command line mode[*]. I think this would be useful for people who prefer the CLI interface but may occasionally want to pop up the documentation browser, the code editor, or the variable editor. I imagine that the file, workspace, and history browser widgets could even be useful for some users.
The CLI version already allows Qt graphics windows to be opened, so it seems this should be a fairly easy change. I experimented with making the
base_octave_qobject object own the documentation browser window when Octave doesn’t start the GUI (and thus doesn’t create a
main_window object). But with these widgets built on top of
QDockWidget it wasn’t quite as simple as I’d hoped. The
octave_dock_widget class and the underlying
QDockWidget seem to really want to be attached to a parent where they can be docked.
I’m sure we could create separate widgets for these windows that don’t use the dock widget. I tried another experiment writing a simple documentation widget simply derived from
QWidget and it sort of worked, but would need layout and geometry hints to really work correctly. Since the existing dockable widgets alread have all of that, I’d rather avoid the duplication. And it just seems that it would be nice to have a single widget that has the option of being dockable. It would be even better if that could all be done in the
octave_dock_widget class because then the problem could be solved once for all these windows. Any insight into doing that would be greatly appreciated.
[*] By “command-line mode”, I mean starting
octave without the
--gui flag, but still running the version linked with Qt libraries, not the
octave-cli binary (that one doesn’t link with Qt).