mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Minor docs updates. Added a method to Rectangle.
This commit is contained in:
parent
54a62c9c1a
commit
b627a75c21
4 changed files with 19 additions and 6 deletions
|
|
@ -31,9 +31,9 @@
|
|||
|
||||
//==============================================================================
|
||||
/**
|
||||
A mutex class.
|
||||
A re-entrant mutex.
|
||||
|
||||
A CriticalSection acts as a re-entrant mutex lock. The best way to lock and unlock
|
||||
A CriticalSection acts as a re-entrant mutex object. The best way to lock and unlock
|
||||
one of these is by using RAII in the form of a local ScopedLock object - have a look
|
||||
through the codebase for many examples of how to do this.
|
||||
|
||||
|
|
|
|||
|
|
@ -478,6 +478,17 @@ public:
|
|||
jlimit (pos.y, pos.y + h, point.y));
|
||||
}
|
||||
|
||||
/** Returns a point within this rectangle, specified as proportional coordinates.
|
||||
The relative X and Y values should be between 0 and 1, where 0 is the left or
|
||||
top of this rectangle, and 1 is the right or bottom. (Out-of-bounds values
|
||||
will return a point outside the rectangle).
|
||||
*/
|
||||
Point<ValueType> getRelativePoint (double relativeX, double relativeY) const noexcept
|
||||
{
|
||||
return Point<ValueType> (pos.x + static_cast <ValueType> (w * relativeX),
|
||||
pos.y + static_cast <ValueType> (h * relativeY));
|
||||
}
|
||||
|
||||
/** Returns true if any part of another rectangle overlaps this one. */
|
||||
bool intersects (const Rectangle& other) const noexcept
|
||||
{
|
||||
|
|
|
|||
|
|
@ -810,8 +810,9 @@ public:
|
|||
*/
|
||||
virtual void parentHierarchyChanged();
|
||||
|
||||
/** Subclasses can use this callback to be told when children are added or removed.
|
||||
@see parentHierarchyChanged
|
||||
/** Subclasses can use this callback to be told when children are added or removed, or
|
||||
when their z-order changes.
|
||||
@see parentHierarchyChanged, ComponentListener::componentChildrenChanged
|
||||
*/
|
||||
virtual void childrenChanged();
|
||||
|
||||
|
|
|
|||
|
|
@ -71,9 +71,10 @@ public:
|
|||
*/
|
||||
virtual void componentVisibilityChanged (Component& component);
|
||||
|
||||
/** Called when the component has children added or removed.
|
||||
/** Called when the component has children added or removed, or their z-order
|
||||
changes.
|
||||
|
||||
@param component the component whose children were changed
|
||||
@param component the component whose children have changed
|
||||
@see Component::childrenChanged, Component::addChildComponent,
|
||||
Component::removeChildComponent
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue