The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1KB

  1. #pragma once
  2. #include "../JuceLibraryCode/JuceHeader.h"
  3. class MainContentComponent : public Component
  4. {
  5. public:
  6. //==============================================================================
  7. MainContentComponent()
  8. {
  9. addAndMakeVisible (eventButton);
  10. setSize (300, 200);
  11. StringPairArray logButtonPressParameters;
  12. logButtonPressParameters.set ("id", "a");
  13. logEventButtonPress = new ButtonTracker (eventButton, "button_press", logButtonPressParameters);
  14. }
  15. ~MainContentComponent() {}
  16. void paint (Graphics& g) override
  17. {
  18. g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));
  19. }
  20. void resized() override
  21. {
  22. eventButton.centreWithSize (100, 50);
  23. }
  24. private:
  25. //==============================================================================
  26. TextButton eventButton { "Press me!" };
  27. ScopedPointer<ButtonTracker> logEventButtonPress;
  28. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)
  29. };