Sublime Forum

Determining what kind of widget a view represents

#1

It is possible to determine if a view is a widget with this:

self.view.settings().get("is_widget")

Is it also possible to determine what kind of widget the view represents? e.g. The console, a find panel, an input panel, the command palette, file chooser, goto, etc…

What I specifically need is a way to determine if the view represents one of the overlays (command palette, file chooser, goto, etc.)?

Thanks.

0 Likes

#2

I asked about this a while ago:

1 Like

#3

Thanks for the pointer, but unfortunately that thread doesn’t help.

I had hight hopes for the window.panels() method but tests showed that it returns only panel names, and does not include any overlays at all. e.g.

['console', 'find', 'find_in_files', 'output.find_results', 'replace']
0 Likes

#4

Yes, there is no way to find out what kind of widget view you are dealing with, currently. See also

2 Likes

#5

Thanks FichteFoll. Useful link, your suggestion in that thread is spot on.

0 Likes