30 : allowablePlacements (above | below | left | right)
BubbleComponent()
Creates a BubbleComponent.
void setPosition(Component *componentToPointTo, int distanceFromTarget=15, int arrowLength=10)
Moves and resizes the bubble to point at a given component.
virtual void paintContent(Graphics &g, int width, int height)=0
Subclasses should override this to draw their bubble's contents.
~BubbleComponent() override
Destructor.
void lookAndFeelChanged() override
Called to let the component react to a change in the look-and-feel setting.
void paint(Graphics &) override
Components can override this method to draw their content.
void setAllowedPlacement(int newPlacement)
Tells the bubble which positions it's allowed to put itself in, relative to the point at which it's p...
virtual void getContentSize(int &width, int &height)=0
Subclasses should override this to return the size of the content they want to draw inside the bubble...
The base class for all JUCE user-interface objects.
AffineTransform getTransform() const
Returns the transform that is currently being applied to this component.
void setInterceptsMouseClicks(bool allowClicksOnThisComponent, bool allowClicksOnChildComponents) noexcept
Changes the default return value for the hitTest() method.
Component * getParentComponent() const noexcept
Returns the component which this component is inside.
void setBounds(int x, int y, int width, int height)
Changes the component's position and size.
Rectangle< int > getParentMonitorArea() const
Returns the screen coordinates of the monitor that contains this component.
LookAndFeel & getLookAndFeel() const noexcept
Finds the appropriate look-and-feel to use for this component.
Rectangle< int > getLocalBounds() const noexcept
Returns the component's bounds, relative to its own origin.
A graphics context, used for drawing a component or image.
bool reduceClipRegion(int x, int y, int width, int height)
Intersects the current clipping region with another region.
void setOrigin(Point< int > newOrigin)
Moves the position of the context's origin.
A pair of (x, y) coordinates.
constexpr Point< float > toFloat() const noexcept
Casts this point to a Point<float> object.
ValueType y
The point's Y coordinate.
ValueType x
The point's X coordinate.
Manages a rectangle and allows geometric operations to be performed on it.
ValueType getRight() const noexcept
Returns the x coordinate of the rectangle's right-hand-side.
Rectangle< float > toFloat() const noexcept
Casts this rectangle to a Rectangle<float>.
ValueType getX() const noexcept
Returns the x coordinate of the rectangle's left-hand-side.
Point< ValueType > getPosition() const noexcept
Returns the rectangle's top-left position as a Point.
ValueType getBottom() const noexcept
Returns the y coordinate of the rectangle's bottom edge.
ValueType getWidth() const noexcept
Returns the width of the rectangle.
ValueType getY() const noexcept
Returns the y coordinate of the rectangle's top edge.
Rectangle transformedBy(const AffineTransform &transform) const noexcept
Returns the smallest rectangle that can contain the shape created by applying a transform to this rec...
ValueType getHeight() const noexcept
Returns the height of the rectangle.
void setBounds(ValueType newX, ValueType newY, ValueType newWidth, ValueType newHeight) noexcept
Changes all the rectangle's coordinates.
constexpr Type jmax(Type a, Type b)
Returns the larger of two values.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
virtual void drawBubble(Graphics &g, BubbleComponent &bubbleComponent, const Point< float > &positionOfTip, const Rectangle< float > &body)=0
Override this method to draw a speech-bubble pointing at a specific location on the screen.
virtual void setComponentEffectForBubbleComponent(BubbleComponent &bubbleComponent)=0
Override this method to set effects, such as a drop-shadow, on a BubbleComponent.