UI/area questions
Vladimir Prus
ghost at cs.msu.su
Sat Dec 15 09:24:41 UTC 2007
Folks,
I have some questions about Sublime, areas and mainwindows behaviour.
1. Presently, the list of documents appear to be maintained by Sublime/Area.
It also appears that whenever a View is added to Area, a real widget for that
View is created -- see MainWindowPrivate::ViewCreator::operator()
Then, it means that if I have mainwindow with 100 open documents, and create
a new mainwindow, then the new mainwindow will create 100 view widgets, even
though only one document is immediately shown, and I might never open 99 others.
Even if view are supposed to be lightweight, I doubt that fresh Kate widget is
exactly 4 bytes in size, and so such design seems rather resource hungry.
To make matters worse, I would expect "Debug" area to be able to show source *and*
to be able to switch to arbitrary source file. Then, we'd need 100 view widgets
there.
Would not a better design make Sublime more 'lazy' so that real view widgets are
created only when actually needed?
2. When using a single main window, I want to have named "areas" and be able
to switch between them, and have KDevelop remember the set of tools/documents
in each. Two examples are "coding" and "debug" areas. Ok, now for the case
of multiple windows, I want to
- Be able to switch between "coding" and "debug" areas in each window.
- Have "debug" area in different windows to be independent. Say, I
can debug two communication applications together, and different set of view
make sense for each.
In order to implement this, I think that area should keep both name and mainwindow's
number, and that UiController::switchToArea should accept both area name and window
number. Or maybe even better -- switchToArea should accept a MainWindow* parameter.
If null, new mainwindow is created. If not null, an named area associated with that
main window is found and the mainwindow switches to it.
Does this sound about right?
- Volodya
More information about the KDevelop-devel
mailing list