25 #ifndef JUCE_RESIZABLEBORDERCOMPONENT_H_INCLUDED 26 #define JUCE_RESIZABLEBORDERCOMPONENT_H_INCLUDED 110 Zone& operator= (const
Zone&) noexcept;
112 bool operator== (const
Zone&) const noexcept;
113 bool operator!= (const
Zone&) const noexcept;
119 static
Zone fromPositionOnBorder (const
Rectangle<
int>& totalSize,
121 Point<
int> position);
127 bool isDraggingWholeObject() const noexcept {
return zone == centre; }
140 template <
typename ValueType>
144 if (isDraggingWholeObject())
145 return original + distance;
147 if (isDraggingLeftEdge()) original.setLeft (
jmin (original.getRight(), original.getX() + distance.x));
148 if (isDraggingRightEdge()) original.setWidth (
jmax (ValueType(), original.getWidth() + distance.x));
149 if (isDraggingTopEdge()) original.setTop (
jmin (original.getBottom(), original.getY() + distance.y));
150 if (isDraggingBottomEdge()) original.setHeight (
jmax (ValueType(), original.getHeight() + distance.y));
180 bool hitTest (
int x,
int y)
override;
195 #endif // JUCE_RESIZABLEBORDERCOMPONENT_H_INCLUDED Definition: juce_MouseCursor.h:36
#define noexcept
Definition: juce_CompilerSupport.h:141
Type jmin(const Type a, const Type b)
Definition: juce_core.h:113
Rectangle< ValueType > resizeRectangleBy(Rectangle< ValueType > original, const Point< ValueType > &distance) const noexcept
Definition: juce_ResizableBorderComponent.h:141
Definition: juce_Point.h:39
#define JUCE_API
Definition: juce_StandardHeader.h:139
int getZoneFlags() const noexcept
Definition: juce_ResizableBorderComponent.h:156
Definition: juce_Rectangle.h:36
bool isDraggingTopEdge() const noexcept
Definition: juce_ResizableBorderComponent.h:133
Definition: juce_ResizableBorderComponent.h:45
Definition: juce_Component.h:33
Type jmax(const Type a, const Type b)
Definition: juce_core.h:101
bool isDraggingBottomEdge() const noexcept
Definition: juce_ResizableBorderComponent.h:135
Definition: juce_ResizableBorderComponent.h:91
Definition: juce_BorderSize.h:39
bool isDraggingRightEdge() const noexcept
Definition: juce_ResizableBorderComponent.h:131
Definition: juce_GraphicsContext.h:42
bool isDraggingLeftEdge() const noexcept
Definition: juce_ResizableBorderComponent.h:129
Definition: juce_ComponentBoundsConstrainer.h:41
Zone getCurrentZone() const noexcept
Definition: juce_ResizableBorderComponent.h:164
Definition: juce_MouseEvent.h:36
Zones
Definition: juce_ResizableBorderComponent.h:95