juce_ArrowButton.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifndef JUCE_ARROWBUTTON_H_INCLUDED
  18. #define JUCE_ARROWBUTTON_H_INCLUDED
  19. //==============================================================================
  20. /**
  21. A button with an arrow in it.
  22. @see Button
  23. */
  24. class JUCE_API ArrowButton : public Button
  25. {
  26. public:
  27. //==============================================================================
  28. /** Creates an ArrowButton.
  29. @param buttonName the name to give the button
  30. @param arrowDirection the direction the arrow should point in, where 0.0 is
  31. pointing right, 0.25 is down, 0.5 is left, 0.75 is up
  32. @param arrowColour the colour to use for the arrow
  33. */
  34. ArrowButton (const String& buttonName,
  35. float arrowDirection,
  36. Colour arrowColour);
  37. /** Destructor. */
  38. ~ArrowButton();
  39. /** @internal */
  40. void paintButton (Graphics&, bool isMouseOverButton, bool isButtonDown) override;
  41. private:
  42. Colour colour;
  43. Path path;
  44. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ArrowButton)
  45. };
  46. #endif // JUCE_ARROWBUTTON_H_INCLUDED