Hi guys! I’m using the ResizableCornerComponent
as a child of my draggable component. Being draggable, the component has its own mouseDrag, but I would like to access the mouseDrag of the child ResizableCornerComponent and not only the parent one. Here my code snippets:
#pragma once
#include <JuceHeader.h>
#include "Config.h"
//==============================================================================
/*
*/
class Pad : public juce::Component,
public juce::ComponentDragger
{
public:
Pad();
~Pad() override;
void paint (juce::Graphics&) override;
void resized() override;
// parent (draggable) mouse events:
void mouseDrag(const juce::MouseEvent& event) override;
void mouseDown(const juce::MouseEvent& event) override;
private:
juce::ComponentBoundsConstrainer movableConstraints;
juce::ComponentBoundsConstrainer resizableConstraints;
// instance of the child (resizable corner component):
// how can I access the mousDrag of the resizableCorner ??
juce::ResizableCornerComponent resizableCorner = juce::ResizableCornerComponent(this, &resizableConstraints);
juce::TextButton button;
void init(juce::String name);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pad)
};
Can you help me please?
Cheers!