Complex graphical interfaces may contain dozens or hundreds of widgets, each with their properties and classes which will impact their behaviour, position and appearance, making debugging quite difficult.

Stk includes an inspection window, which displays the widget hierarchy of another window, with their properties, classes, size constraints, ... An inspection window is attached to a window and can ask the latter to highlight a widget, when it is selected in the widget tree. To do so, all windows inherit from the layers widget, and use a layer to display a quite transparent rectangle above the widget, and another one for its margins.

The inspection window is open with a key combination defined in the environment variable STK_INSPECT_WINDOW_KEY. If it it not defined or is incorrect (i.e. the content does not represent a valid key combination), the inspect window cannot be open (except programmatically). This is to prevent any conflict with other keyboard shortcuts in an application window.

When a window has an inspection window created (and not closed), it handles click with button 1 with Control key pressed above a leaf widget, to ask the inspection window to display this widget's information.

Here is a short video showing the use of inspection window on the example application included in distribution, launched with the following command from the root directory of compiled sources:

$ STK_INSPECT_WINDOW_KEY="C-Escape" ./_build/default/examples/examples.exe