openshot-audio  0.1.2
juce_GroupComponent.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_GROUPCOMPONENT_H_INCLUDED
26 #define JUCE_GROUPCOMPONENT_H_INCLUDED
27 
28 
29 //==============================================================================
36 {
37 public:
38  //==============================================================================
44  GroupComponent (const String& componentName = String::empty,
45  const String& labelText = String::empty);
46 
48  ~GroupComponent();
49 
50  //==============================================================================
52  void setText (const String& newText);
53 
55  String getText() const;
56 
63  void setTextLabelPosition (Justification justification);
64 
69  Justification getTextLabelPosition() const noexcept { return justification; }
70 
71  //==============================================================================
79  enum ColourIds
80  {
81  outlineColourId = 0x1005400,
82  textColourId = 0x1005410
83  };
84 
85  //==============================================================================
88  {
89  virtual ~LookAndFeelMethods() {}
90 
91  virtual void drawGroupComponentOutline (Graphics&, int w, int h, const String& text,
92  const Justification&, GroupComponent&) = 0;
93  };
94 
95  //==============================================================================
97  void paint (Graphics&) override;
99  void enablementChanged() override;
101  void colourChanged() override;
102 
103 private:
104  String text;
105  Justification justification;
106 
108 };
109 
110 
111 #endif // JUCE_GROUPCOMPONENT_H_INCLUDED
ColourIds
Definition: juce_GroupComponent.h:79
Definition: juce_GroupComponent.h:87
static const String empty
Definition: juce_String.h:152
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_Justification.h:38
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
#define const
Definition: juce_GroupComponent.h:35
virtual ~LookAndFeelMethods()
Definition: juce_GroupComponent.h:89
Definition: juce_Component.h:33
Justification getTextLabelPosition() const noexcept
Definition: juce_GroupComponent.h:69
#define JUCE_DECLARE_NON_COPYABLE(className)
Definition: juce_PlatformDefs.h:191
Definition: juce_GraphicsContext.h:42