openshot-audio  0.1.2
juce_PropertyComponent.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_PROPERTYCOMPONENT_H_INCLUDED
26 #define JUCE_PROPERTYCOMPONENT_H_INCLUDED
27 
28 
29 //==============================================================================
47 {
48 public:
49  //==============================================================================
60  PropertyComponent (const String& propertyName,
61  int preferredHeight = 25);
62 
65 
66  //==============================================================================
72  int getPreferredHeight() const noexcept { return preferredHeight; }
73 
74  void setPreferredHeight (int newHeight) noexcept { preferredHeight = newHeight; }
75 
76  //==============================================================================
87  virtual void refresh() = 0;
88 
89 
95  void paint (Graphics&) override;
96 
100  void resized() override;
101 
103  void enablementChanged() override;
104 
105  //==============================================================================
114  {
115  backgroundColourId = 0x1008300,
116  labelTextColourId = 0x1008301,
117  };
118 
119  //==============================================================================
122  {
123  virtual ~LookAndFeelMethods() {}
124 
125  virtual void drawPropertyPanelSectionHeader (Graphics&, const String& name, bool isOpen, int width, int height) = 0;
126  virtual void drawPropertyComponentBackground (Graphics&, int width, int height, PropertyComponent&) = 0;
127  virtual void drawPropertyComponentLabel (Graphics&, int width, int height, PropertyComponent&) = 0;
128  virtual Rectangle<int> getPropertyComponentContentPosition (PropertyComponent&) = 0;
129  };
130 
131 protected:
137 
138 private:
140 };
141 
142 
143 #endif // JUCE_PROPERTYCOMPONENT_H_INCLUDED
Definition: juce_PropertyComponent.h:45
void setPreferredHeight(int newHeight) noexcept
Definition: juce_PropertyComponent.h:74
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_PropertyComponent.h:121
ColourIds
Definition: juce_PropertyComponent.h:113
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_Rectangle.h:36
virtual void resized()
Definition: juce_Component.cpp:2272
Definition: juce_TooltipClient.h:63
virtual void paint(Graphics &g)
Definition: juce_Component.cpp:1929
int preferredHeight
Definition: juce_PropertyComponent.h:136
int getPreferredHeight() const noexcept
Definition: juce_PropertyComponent.h:72
Definition: juce_Component.h:33
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
Definition: juce_GraphicsContext.h:42
virtual void enablementChanged()
Definition: juce_Component.cpp:2915
virtual ~LookAndFeelMethods()
Definition: juce_PropertyComponent.h:123