LMMS
Loading...
Searching...
No Matches
juce_PropertyPanel.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
29//==============================================================================
44{
45public:
46 //==============================================================================
49
51 PropertyPanel (const String& name);
52
54 ~PropertyPanel() override;
55
56 //==============================================================================
58 void clear();
59
68 void addProperties (const Array<PropertyComponent*>& newPropertyComponents,
69 int extraPaddingBetweenComponents = 0);
70
82 void addSection (const String& sectionTitle,
83 const Array<PropertyComponent*>& newPropertyComponents,
84 bool shouldSectionInitiallyBeOpen = true,
85 int indexToInsertAt = -1,
86 int extraPaddingBetweenComponents = 0);
87
89 void refreshAll() const;
90
92 bool isEmpty() const;
93
97 int getTotalContentHeight() const;
98
99 //==============================================================================
104
108 bool isSectionOpen (int sectionIndex) const;
109
113 void setSectionOpen (int sectionIndex, bool shouldBeOpen);
114
118 void setSectionEnabled (int sectionIndex, bool shouldBeEnabled);
119
123 void removeSection (int sectionIndex);
124
125 //==============================================================================
130 std::unique_ptr<XmlElement> getOpennessState() const;
131
140 void restoreOpennessState (const XmlElement& newState);
141
142 //==============================================================================
146 void setMessageWhenEmpty (const String& newMessage);
147
151 const String& getMessageWhenEmpty() const noexcept;
152
153 //==============================================================================
156
157 //==============================================================================
159 void paint (Graphics&) override;
161 void resized() override;
162
163private:
165 struct SectionComponent;
169
170 void init();
171 void updatePropHolderLayout() const;
173
175};
176
177} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
Definition juce_Array.h:56
Component() noexcept
Definition juce_Component.cpp:517
Definition juce_GraphicsContext.h:45
StringArray getSectionNames() const
Definition juce_PropertyPanel.cpp:301
void setSectionEnabled(int sectionIndex, bool shouldBeEnabled)
Definition juce_PropertyPanel.cpp:328
bool isEmpty() const
Definition juce_PropertyPanel.cpp:243
std::unique_ptr< XmlElement > getOpennessState() const
Definition juce_PropertyPanel.cpp:344
int getTotalContentHeight() const
Definition juce_PropertyPanel.cpp:248
void updatePropHolderLayout() const
Definition juce_PropertyPanel.cpp:282
bool isSectionOpen(int sectionIndex) const
Definition juce_PropertyPanel.cpp:314
void setSectionOpen(int sectionIndex, bool shouldBeOpen)
Definition juce_PropertyPanel.cpp:322
Viewport viewport
Definition juce_PropertyPanel.h:164
void removeSection(int sectionIndex)
Definition juce_PropertyPanel.cpp:334
void addSection(const String &sectionTitle, const Array< PropertyComponent * > &newPropertyComponents, bool shouldSectionInitiallyBeOpen=true, int indexToInsertAt=-1, int extraPaddingBetweenComponents=0)
Definition juce_PropertyPanel.cpp:263
void updatePropHolderLayout(int width) const
PropertyHolderComponent * propertyHolderComponent
Definition juce_PropertyPanel.h:167
PropertyPanel()
Definition juce_PropertyPanel.cpp:191
const String & getMessageWhenEmpty() const noexcept
Definition juce_PropertyPanel.cpp:391
void setMessageWhenEmpty(const String &newMessage)
Definition juce_PropertyPanel.cpp:382
void clear()
Definition juce_PropertyPanel.cpp:234
Viewport & getViewport() noexcept
Definition juce_PropertyPanel.h:155
String messageWhenEmpty
Definition juce_PropertyPanel.h:168
void refreshAll() const
Definition juce_PropertyPanel.cpp:295
void addProperties(const Array< PropertyComponent * > &newPropertyComponents, int extraPaddingBetweenComponents=0)
Definition juce_PropertyPanel.cpp:253
void restoreOpennessState(const XmlElement &newState)
Definition juce_PropertyPanel.cpp:364
Definition juce_StringArray.h:35
Definition juce_String.h:53
Definition juce_Viewport.h:47
Definition juce_XmlElement.h:83
static const char * name
Definition pugl.h:1582
static int width
Definition pugl.h:1593
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
Definition juce_PropertyPanel.cpp:140
Definition juce_PropertyPanel.cpp:30
ZCONST uch * init
Definition extract.c:2392