Loading...
Searching...
No Matches
juce::ResizableBorderComponent::Zone Class Reference

## Detailed Description

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

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

- juce_gui_basics/layout/juce_ResizableBorderComponent.h

## Public Types

enum | Zones { centre = 0 , left = 1 , top = 2 , right = 4 , bottom = 8 }

## Public Member Functions

| Zone (int zoneFlags) noexcept
| Creates a Zone from a combination of the flags in zoneFlags.
| Zone () noexcept
| Zone (const Zone &) noexcept
Zone & | operator= (const Zone &) noexcept
bool | operator== (const Zone &) const noexcept
bool | operator!= (const Zone &) const noexcept
MouseCursor | getMouseCursor () const noexcept
| Returns an appropriate mouse-cursor for this resize zone.
bool | isDraggingWholeObject () const noexcept
| Returns true if dragging this zone will move the entire object without resizing it.
bool | isDraggingLeftEdge () const noexcept
| Returns true if dragging this zone will move the object's left edge.
bool | isDraggingRightEdge () const noexcept
| Returns true if dragging this zone will move the object's right edge.
bool | isDraggingTopEdge () const noexcept
| Returns true if dragging this zone will move the object's top edge.
bool | isDraggingBottomEdge () const noexcept
| Returns true if dragging this zone will move the object's bottom edge.
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.
int | getZoneFlags () const noexcept
| Returns the raw flags for this zone.

## 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.

## Member Enums

## Zones

enum juce::ResizableBorderComponent::Zone::Zones

Enumerator
centre |
left |
top |
right |
bottom |

## Constructors and Destructors

## Zone() [1/3]

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

explicit noexcept

Creates a Zone from a combination of the flags in zoneFlags.

Referenced by fromPositionOnBorder(), operator!=(), operator=(), operator==(), and Zone().

## Zone() [2/3]

juce::ResizableBorderComponent::Zone::Zone | ( |  | ) |

noexcept

## Zone() [3/3]

juce::ResizableBorderComponent::Zone::Zone | ( | const Zone & |  | ) |

noexcept

References Zone().

## Member Functions

## operator=()

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

noexcept

References Zone().

## operator==()

bool juce::ResizableBorderComponent::Zone::operator== | ( | const Zone & |  | ) | const

noexcept

References Zone().

## operator!=()

bool juce::ResizableBorderComponent::Zone::operator!= | ( | const Zone & |  | ) | const

noexcept

References Zone().

## fromPositionOnBorder()

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.

References fromPositionOnBorder(), and Zone().

Referenced by fromPositionOnBorder().

## getMouseCursor()

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

noexcept

Returns an appropriate mouse-cursor for this resize zone.

References getMouseCursor().

Referenced by getMouseCursor().

## isDraggingWholeObject()

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

inline noexcept

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

References centre, and isDraggingWholeObject().

Referenced by isDraggingWholeObject(), and resizeRectangleBy().

## isDraggingLeftEdge()

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

inline noexcept

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

References left.

Referenced by resizeRectangleBy().

## isDraggingRightEdge()

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

inline noexcept

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

References right.

Referenced by resizeRectangleBy().

## isDraggingTopEdge()

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

inline noexcept

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

References top.

Referenced by resizeRectangleBy().

## isDraggingBottomEdge()

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

inline noexcept

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

References bottom.

Referenced by resizeRectangleBy().

## resizeRectangleBy()

template<typename ValueType>

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

inline noexcept

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

References isDraggingBottomEdge(), isDraggingLeftEdge(), isDraggingRightEdge(), isDraggingTopEdge(), isDraggingWholeObject(), juce::jmax(), and juce::jmin().

## getZoneFlags()

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

inline noexcept

Returns the raw flags for this zone.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited