JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::ResizableBorderComponent::Zone Class Reference

Represents the different sections of a resizable border, which allow it to resized in different ways. More...

#include <juce_ResizableBorderComponent.h>

Collaboration diagram for juce::ResizableBorderComponent::Zone:

Public Types

enum  Zones {
  centre = 0,
  left = 1,
  top = 2,
  right = 4,
  bottom = 8
}
 Creates a Zone from a combination of the flags in. More...
 

Public Member Functions

 Zone (int zoneFlags) noexcept
 
 Zone () noexcept
 
 Zone (const Zone &) noexcept
 
MouseCursor getMouseCursor () const noexcept
 Returns an appropriate mouse-cursor for this resize zone. More...
 
int getZoneFlags () const noexcept
 Returns the raw flags for this zone. More...
 
bool isDraggingBottomEdge () const noexcept
 Returns true if dragging this zone will move the object's bottom edge. More...
 
bool isDraggingLeftEdge () const noexcept
 Returns true if dragging this zone will move the object's left edge. More...
 
bool isDraggingRightEdge () const noexcept
 Returns true if dragging this zone will move the object's right edge. More...
 
bool isDraggingTopEdge () const noexcept
 Returns true if dragging this zone will move the object's top edge. More...
 
bool isDraggingWholeObject () const noexcept
 Returns true if dragging this zone will move the enire object without resizing it. More...
 
bool operator!= (const Zone &) const noexcept
 
Zoneoperator= (const Zone &) noexcept
 
bool operator== (const Zone &) const noexcept
 
template<typename ValueType >
Rectangle< ValueType > resizeRectangleBy (Rectangle< ValueType > original, const Point< ValueType > &distance) const noexcept
 Resizes this rectangle by the given amount, moving just the edges that this zone applies to. More...
 

Static Public Member Functions

static Zone fromPositionOnBorder (Rectangle< int > totalSize, BorderSize< int > border, Point< int > position)
 Given a point within a rectangle with a resizable border, this returns the zone that the point lies within. More...
 

Private Attributes

int zone = centre
 

Detailed Description

Represents the different sections of a resizable border, which allow it to resized in different ways.

Member Enumeration Documentation

◆ Zones

Creates a Zone from a combination of the flags in.

Enumerator
centre 
left 
top 
right 
bottom 

Constructor & Destructor Documentation

◆ Zone() [1/3]

juce::ResizableBorderComponent::Zone::Zone ( int  zoneFlags)
explicitnoexcept

◆ Zone() [2/3]

juce::ResizableBorderComponent::Zone::Zone ( )
noexcept

◆ Zone() [3/3]

juce::ResizableBorderComponent::Zone::Zone ( const Zone )
noexcept

Member Function Documentation

◆ fromPositionOnBorder()

static Zone juce::ResizableBorderComponent::Zone::fromPositionOnBorder ( Rectangle< int totalSize,
BorderSize< int border,
Point< int position 
)
static

Given a point within a rectangle with a resizable border, this returns the zone that the point lies within.

◆ getMouseCursor()

MouseCursor juce::ResizableBorderComponent::Zone::getMouseCursor ( ) const
noexcept

Returns an appropriate mouse-cursor for this resize zone.

◆ getZoneFlags()

int juce::ResizableBorderComponent::Zone::getZoneFlags ( ) const
inlinenoexcept

Returns the raw flags for this zone.

◆ isDraggingBottomEdge()

bool juce::ResizableBorderComponent::Zone::isDraggingBottomEdge ( ) const
inlinenoexcept

Returns true if dragging this zone will move the object's bottom edge.

◆ isDraggingLeftEdge()

bool juce::ResizableBorderComponent::Zone::isDraggingLeftEdge ( ) const
inlinenoexcept

Returns true if dragging this zone will move the object's left edge.

◆ isDraggingRightEdge()

bool juce::ResizableBorderComponent::Zone::isDraggingRightEdge ( ) const
inlinenoexcept

Returns true if dragging this zone will move the object's right edge.

◆ isDraggingTopEdge()

bool juce::ResizableBorderComponent::Zone::isDraggingTopEdge ( ) const
inlinenoexcept

Returns true if dragging this zone will move the object's top edge.

◆ isDraggingWholeObject()

bool juce::ResizableBorderComponent::Zone::isDraggingWholeObject ( ) const
inlinenoexcept

Returns true if dragging this zone will move the enire object without resizing it.

◆ operator!=()

bool juce::ResizableBorderComponent::Zone::operator!= ( const Zone ) const
noexcept

◆ operator=()

Zone& juce::ResizableBorderComponent::Zone::operator= ( const Zone )
noexcept

◆ operator==()

bool juce::ResizableBorderComponent::Zone::operator== ( const Zone ) const
noexcept

◆ resizeRectangleBy()

template<typename ValueType >
Rectangle<ValueType> juce::ResizableBorderComponent::Zone::resizeRectangleBy ( Rectangle< ValueType >  original,
const Point< ValueType > &  distance 
) const
inlinenoexcept

Resizes this rectangle by the given amount, moving just the edges that this zone applies to.

References juce::jmax(), and juce::jmin().

Member Data Documentation

◆ zone

int juce::ResizableBorderComponent::Zone::zone = centre
private

The documentation for this class was generated from the following file: