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.

41 lines
1.2KB

  1. //==============================================================================
  2. class COMPONENTCLASS : public Component
  3. {
  4. public:
  5. COMPONENTCLASS()
  6. {
  7. // In your constructor, you should add any child components, and
  8. // initialise any special settings that your component needs.
  9. }
  10. ~COMPONENTCLASS()
  11. {
  12. }
  13. void paint (Graphics& g) override
  14. {
  15. // You should replace everything in this method with your own drawing code..
  16. g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId)); // clear the background
  17. g.setColour (Colours::grey);
  18. g.drawRect (getLocalBounds(), 1); // draw an outline around the component
  19. g.setColour (Colours::white);
  20. g.setFont (14.0f);
  21. g.drawText ("COMPONENTCLASS", getLocalBounds(),
  22. Justification::centred, true); // draw some placeholder text
  23. }
  24. void resized() override
  25. {
  26. // This method is where you should set the bounds of any child
  27. // components that your component contains..
  28. }
  29. private:
  30. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (COMPONENTCLASS)
  31. };