|
Gin
|
A debugging tool that displays component hierarchy and properties. More...
#include <gin_componentviewer.h>
Inherits juce::DocumentWindow, and juce::ComponentListener.
Public Member Functions | |
| ComponentViewer (Component *toTrack=nullptr, juce::PropertiesFile *settings=nullptr, bool alwaysOnTop=true) | |
| Creates a ComponentViewer window. | |
| ~ComponentViewer () override | |
| Destructor. | |
Public Attributes | |
| std::function< void()> | onClose |
| Callback invoked when the user requests to close the window. | |
A debugging tool that displays component hierarchy and properties.
ComponentViewer is a window that shows information about the component under the mouse cursor, including its position, size, class name, and component hierarchy. This is extremely useful for debugging UI layouts and understanding component structures during development.
Features:
Example usage:
| ComponentViewer::ComponentViewer | ( | Component * | toTrack = nullptr, |
| juce::PropertiesFile * | settings = nullptr, |
||
| bool | alwaysOnTop = true |
||
| ) |
Creates a ComponentViewer window.
| toTrack | Optional component to track - when this component is deleted, the ComponentViewer will automatically be deleted as well. Pass nullptr to disable this feature. |
| settings | Optional PropertiesFile for storing window position. Pass nullptr to use a default settings file. |
| alwaysOnTop | If true, the window will stay on top of other windows |
|
override |
Destructor.
| std::function<void ()> ComponentViewer::onClose |
Callback invoked when the user requests to close the window.
By default, the ComponentViewer deletes itself when closed. You can override this behavior by setting this callback to perform custom cleanup.