33 font (14.0f,
Font::underlined),
43 font (14.0f,
Font::underlined),
56 const bool resizeToMatchComponentHeight,
60 resizeFont = resizeToMatchComponentHeight;
61 justification = justificationType;
68 setTooltip (newURL.toString (
false));
71Font HyperlinkButton::getFontToUse()
const
86 if (justification != newJustification)
88 justification = newJustification;
106 bool shouldDrawButtonAsHighlighted,
107 bool shouldDrawButtonAsDown)
112 g.
setColour ((shouldDrawButtonAsHighlighted) ? textColour.
darker ((shouldDrawButtonAsDown) ? 1.3f : 0.4f)
Represents a colour, also including a transparency value.
Colour darker(float amountDarker=0.4f) const noexcept
Returns a darker version of this colour.
Colour withMultipliedAlpha(float alphaMultiplier) const noexcept
Returns a colour that's the same colour as this one, but with a modified alpha value.
int getHeight() const noexcept
Returns the component's height in pixels.
void setMouseCursor(const MouseCursor &cursorType)
Changes the mouse cursor shape to use when the mouse is over this component.
void repaint()
Marks the whole component as needing to be redrawn.
void setSize(int newWidth, int newHeight)
Changes the size of the component.
Colour findColour(int colourID, bool inheritFromParent=false) const
Looks for a colour that has been registered with the given colour ID number.
bool isEnabled() const noexcept
Returns true if the component (and all its parents) are enabled.
Rectangle< int > getLocalBounds() const noexcept
Returns the component's bounds, relative to its own origin.
Represents a particular font, including its size, style, etc.
Font withHeight(float height) const
Returns a copy of this font with a new height.
A graphics context, used for drawing a component or image.
void drawText(const String &text, int x, int y, int width, int height, Justification justificationType, bool useEllipsesIfTooBig=true) const
Draws a line of text within a specified rectangle.
void setFont(const Font &newFont)
Changes the font to use for subsequent text-drawing functions.
void setColour(Colour newColour)
Changes the current drawing colour.
Represents a type of justification to be used when positioning graphical items.
@ verticallyCentred
Indicates that the item should be placed in the centre between the top and bottom sides of the availa...
int getOnlyHorizontalFlags() const noexcept
Returns just the flags from this object that deal with horizontal layout.
@ PointingHandCursor
A hand with a pointing finger, for clicking on web-links.
Rectangle reduced(ValueType deltaX, ValueType deltaY) const noexcept
Returns a rectangle that is smaller than this one by a given amount.
Represents a URL and has a bunch of useful functions to manipulate it.
bool isWellFormed() const
True if it seems to be valid.
String toString(bool includeGetParameters) const
Returns a string version of the URL.
bool launchInDefaultBrowser() const
Tries to launch the system's default browser to open the URL.