LMMS
Loading...
Searching...
No Matches
juce_ComponentBoundsConstrainer.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
52
53 //==============================================================================
55 void setMinimumWidth (int minimumWidth) noexcept;
56
59
61 void setMaximumWidth (int maximumWidth) noexcept;
62
65
67 void setMinimumHeight (int minimumHeight) noexcept;
68
71
73 void setMaximumHeight (int maximumHeight) noexcept;
74
77
79 void setMinimumSize (int minimumWidth,
80 int minimumHeight) noexcept;
81
83 void setMaximumSize (int maximumWidth,
84 int maximumHeight) noexcept;
85
87 void setSizeLimits (int minimumWidth,
88 int minimumHeight,
89 int maximumWidth,
90 int maximumHeight) noexcept;
91
92 //==============================================================================
109 void setMinimumOnscreenAmounts (int minimumWhenOffTheTop,
110 int minimumWhenOffTheLeft,
111 int minimumWhenOffTheBottom,
112 int minimumWhenOffTheRight) noexcept;
113
114
123
124 //==============================================================================
132 void setFixedAspectRatio (double widthOverHeight) noexcept;
133
138 double getFixedAspectRatio() const noexcept;
139
140
141 //==============================================================================
153 virtual void checkBounds (Rectangle<int>& bounds,
154 const Rectangle<int>& previousBounds,
155 const Rectangle<int>& limits,
156 bool isStretchingTop,
157 bool isStretchingLeft,
158 bool isStretchingBottom,
159 bool isStretchingRight);
160
162 virtual void resizeStart();
163
165 virtual void resizeEnd();
166
168 void setBoundsForComponent (Component* component,
169 Rectangle<int> bounds,
170 bool isStretchingTop,
171 bool isStretchingLeft,
172 bool isStretchingBottom,
173 bool isStretchingRight);
174
178 void checkComponentBounds (Component* component);
179
186 virtual void applyBoundsToComponent (Component&, Rectangle<int> bounds);
187
188private:
189 //==============================================================================
190 int minW = 0, maxW = 0x3fffffff, minH = 0, maxH = 0x3fffffff;
192 double aspectRatio = 0;
193
195};
196
197} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
double aspectRatio
Definition juce_ComponentBoundsConstrainer.h:192
int getMinimumWhenOffTheRight() const noexcept
Definition juce_ComponentBoundsConstrainer.h:122
int getMaximumWidth() const noexcept
Definition juce_ComponentBoundsConstrainer.h:64
int maxH
Definition juce_ComponentBoundsConstrainer.h:190
int minOffTop
Definition juce_ComponentBoundsConstrainer.h:191
void setMinimumWidth(int minimumWidth) noexcept
Definition juce_ComponentBoundsConstrainer.cpp:33
int minW
Definition juce_ComponentBoundsConstrainer.h:190
int getMinimumWidth() const noexcept
Definition juce_ComponentBoundsConstrainer.h:58
int getMinimumWhenOffTheBottom() const noexcept
Definition juce_ComponentBoundsConstrainer.h:120
int maxW
Definition juce_ComponentBoundsConstrainer.h:190
int minOffBottom
Definition juce_ComponentBoundsConstrainer.h:191
int getMinimumHeight() const noexcept
Definition juce_ComponentBoundsConstrainer.h:70
int minOffRight
Definition juce_ComponentBoundsConstrainer.h:191
ComponentBoundsConstrainer() noexcept
Definition juce_ComponentBoundsConstrainer.cpp:29
int getMaximumHeight() const noexcept
Definition juce_ComponentBoundsConstrainer.h:76
int minOffLeft
Definition juce_ComponentBoundsConstrainer.h:191
int getMinimumWhenOffTheLeft() const noexcept
Definition juce_ComponentBoundsConstrainer.h:118
int minH
Definition juce_ComponentBoundsConstrainer.h:190
int getMinimumWhenOffTheTop() const noexcept
Definition juce_ComponentBoundsConstrainer.h:116
Definition juce_Component.h:36
Definition juce_Rectangle.h:67
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
#define const
Definition zconf.h:137