31 expiryTime (0), deleteAfterUse (
false)
80 mouseClickCounter += 0xfffff;
86const float bubblePaddingX = 20.0f;
87const float bubblePaddingY = 14.0f;
100 (
float) w - bubblePaddingX, (
float) h - bubblePaddingY));
111void BubbleMessageComponent::hide (
const bool fadeOut)
A text string with a set of colour/font settings that are associated with sub-ranges of the text.
void setPosition(Component *componentToPointTo, int distanceFromTarget=15, int arrowLength=10)
Moves and resizes the bubble to point at a given component.
void getContentSize(int &w, int &h) override
Subclasses should override this to return the size of the content they want to draw inside the bubble...
void showAt(const Rectangle< int > &position, const AttributedString &message, int numMillisecondsBeforeRemoving, bool removeWhenMouseClicked=true, bool deleteSelfAfterUse=false)
Shows a message bubble at a particular position.
BubbleMessageComponent(int fadeOutLengthMs=150)
Creates a bubble component.
void paintContent(Graphics &g, int w, int h) override
Subclasses should override this to draw their bubble's contents.
~BubbleMessageComponent() override
Destructor.
void timerCallback() override
The user-defined callback routine that actually gets called periodically.
void fadeOut(Component *component, int millisecondsToTake)
Begins a fade-out of this components alpha level.
The base class for all JUCE user-interface objects.
bool isShowing() const
Tests whether this component and all its parents are visible.
void setAlpha(float newAlpha)
Changes the transparency of this component.
void repaint()
Marks the whole component as needing to be redrawn.
Colour findColour(int colourID, bool inheritFromParent=false) const
Looks for a colour that has been registered with the given colour ID number.
virtual void setVisible(bool shouldBeVisible)
Makes the component visible or invisible.
ComponentAnimator & getAnimator() noexcept
The Desktop object has a ComponentAnimator instance which can be used for performing your animations.
int getMouseButtonClickCounter() const noexcept
Returns the number of times the mouse button has been clicked since the app started.
static Desktop &JUCE_CALLTYPE getInstance()
There's only one desktop object, and this method will return it.
A graphics context, used for drawing a component or image.
void setColour(Colour newColour)
Changes the current drawing colour.
Manages a rectangle and allows geometric operations to be performed on it.
void createLayoutWithBalancedLineLengths(const AttributedString &, float maxWidth)
Creates a layout, attempting to choose a width which results in lines of a similar length.
float getWidth() const noexcept
Returns the maximum width of the content.
void draw(Graphics &, Rectangle< float > area) const
Draws the layout within the specified area.
float getHeight() const noexcept
Returns the maximum height of the content.
static uint32 getMillisecondCounter() noexcept
Returns the number of millisecs since a fixed event (usually system startup).
void stopTimer() noexcept
Stops the timer.
void startTimer(int intervalInMilliseconds) noexcept
Starts the timer and sets the length of interval required.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
unsigned int uint32
A platform-independent 32-bit unsigned integer type.