Inherits juce::Component, and juce::Timer.
Animated grid container with drag-and-drop reordering support.
ComponentGrid arranges child components in a row or column with smooth animated transitions. Components can be reordered via drag-and-drop, making it ideal for customizable toolbars, tab bars, or any UI where users can rearrange elements.
Key Features:
- Automatic grid layout (horizontal or vertical)
- Smooth animations when reordering
- Drag-and-drop reordering with visual feedback
- Configurable spacing between items
- Callbacks for drag events and order changes
- Component dragging across grid boundaries
The grid handles layout and animation automatically. When children are reordered via drag-and-drop, the grid smoothly animates them to their new positions.
Usage:
grid.setGap(5);
grid.addAndMakeVisible(new Button("Tool 1"));
grid.addAndMakeVisible(new Button("Tool 2"));
grid.addAndMakeVisible(new Button("Tool 3"));
};
return e.mods.isLeftButtonDown();
};
Animated grid container with drag-and-drop reordering support.
Definition gin_componentgrid.h:58
@ horizontal
Definition gin_componentgrid.h:63
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25
- See also
- ComponentAnimator