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.

65 lines
2.3KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. #pragma once
  14. #include "../jucer_JucerDocument.h"
  15. //==============================================================================
  16. class ButtonDocument : public JucerDocument
  17. {
  18. public:
  19. ButtonDocument (SourceCodeDocument* cpp);
  20. ~ButtonDocument();
  21. //==============================================================================
  22. String getTypeName() const;
  23. JucerDocument* createCopy();
  24. Component* createTestComponent (const bool alwaysFillBackground);
  25. int getNumPaintRoutines() const;
  26. StringArray getPaintRoutineNames() const;
  27. PaintRoutine* getPaintRoutine (const int index) const;
  28. void setStatePaintRoutineEnabled (const int index, bool b);
  29. bool isStatePaintRoutineEnabled (const int index) const;
  30. int chooseBestEnabledPaintRoutine (int paintRoutineWanted) const;
  31. ComponentLayout* getComponentLayout() const { return nullptr; }
  32. void addExtraClassProperties (PropertyPanel&);
  33. //==============================================================================
  34. std::unique_ptr<XmlElement> createXml() const;
  35. bool loadFromXml (const XmlElement&);
  36. void fillInGeneratedCode (GeneratedCode& code) const;
  37. void fillInPaintCode (GeneratedCode& code) const;
  38. void getOptionalMethods (StringArray& baseClasses,
  39. StringArray& returnValues,
  40. StringArray& methods,
  41. StringArray& initialContents) const;
  42. //==============================================================================
  43. std::unique_ptr<PaintRoutine> paintRoutines[7];
  44. bool paintStatesEnabled [7];
  45. };