List of all created widgets

Is there a function/method to get a list of all realised widgets
Not been able to find anything

Check the section in the GTK reference documentation about “Running GTK+ Applications”

There is a part about Environment variables

GTK_DEBUG - interactive: Running the interactive debugger.

If you click that link there you get the description about that handy little tool. It lets you analyze your realized widgets, write custom CSS code on the fly, you can change options on your widgets etc.

1 Like

There is no such function in GTK.

What are you actually trying to achieve, here?

If the question is about looking what you have in the application then check the GTK inspector:
(as it was mentioned above you can run it with GTK_DEBUG=interactive)
It shows tree of all widgets in your application, hidden ones are marked with grey color.

You can use:

I think it’s pointless to tell the OP what kind of API to use to traverse the public graph (which may or may not include private children) until we know what they are trying to achieve in the first place.

1 Like