I am looking for an API which tells me whether a dockable is currently visible on the screen, regardless whether its content is visible or not, regardless whether it is minimized or not.
It seems that AbstractCDockable.isShowing() is not what I am looking for.
By ‘visible’ I don’t necessarily mean the content of the dockable is visible, but either the content, or just the title tab.
Consider the first scenario in the attached image file. All dockables are visible:
isShowing() returns true for all dockables, so far so good.
In the second scenario, I double-click on dockable A to maximize it:
isShowing() on dockable A returns true
isShowing() on dockables B and C returns false, so far so good.
In the third scenario:
isShowing() on dockable A returns true
isShowing() on dockable B returns true
isShowing() on dockable C returns false (probably because its content is not showing, even though its tab is visible).
Is there an API that would return visible=TRUE for dockable C in the third scenario?
Unfortunately CDockable.isVisible() seems not to be exactly what you are looking for either.
I fear you’ll need to write your own method to find the information you require. I would use “CDockable.intern” to get an ordinary dockable, and then travel the tree upwards (Dockable.getDockParent…) until you reach the root. Of the 4 possible DockStations you encounter, only SplitDockStation is capable of really hiding one of its children. It has a method “getFullscreen” which can tell you, which child is the one that is maximized.
Actually, my problem was I wasn’t able to distinguish:
the case where isShowing() returns false because some other dockable is maximized to fullscreen (like in the second scenario above) and
the case where isShowing() returns false because it is not the active tab in its parent dockstation, while the dockstation itself is visible (like in the third scenario above).
So I was able to do the distinction as follows: when isShowing() return false, I check isStationShowing() on the parent, and if that one returns true, I know I am in case 2.
So isStationShowing() turned out to be what I was looking for.