LMMS
Loading...
Searching...
No Matches
juce_BubbleComponent.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
29//==============================================================================
47{
48protected:
49 //==============================================================================
56
57public:
59 ~BubbleComponent() override;
60
61 //==============================================================================
68 {
69 above = 1,
70 below = 2,
71 left = 4,
73 };
74
87 void setAllowedPlacement (int newPlacement);
88
89 //==============================================================================
99 void setPosition (Component* componentToPointTo,
100 int distanceFromTarget = 15, int arrowLength = 10);
101
113 void setPosition (Point<int> arrowTipPosition, int arrowLength = 10);
114
129 void setPosition (Rectangle<int> rectangleToPointTo,
130 int distanceFromTarget = 15, int arrowLength = 10);
131
132 //==============================================================================
141 {
142 backgroundColourId = 0x1000af0,
143 outlineColourId = 0x1000af1
144 };
145
146
147 //==============================================================================
151 {
152 virtual ~LookAndFeelMethods() = default;
153
155 const Point<float>& positionOfTip,
156 const Rectangle<float>& body) = 0;
157 };
158
159 //==============================================================================
161 void paint (Graphics&) override;
162
163protected:
164 //==============================================================================
168 virtual void getContentSize (int& width, int& height) = 0;
169
175 virtual void paintContent (Graphics& g, int width, int height) = 0;
176
177private:
182
184};
185
186} // namespace juce
DropShadowEffect shadow
Definition juce_BubbleComponent.h:181
BubbleComponent()
Definition juce_BubbleComponent.cpp:29
virtual void paintContent(Graphics &g, int width, int height)=0
BubblePlacement
Definition juce_BubbleComponent.h:68
@ above
Definition juce_BubbleComponent.h:69
@ left
Definition juce_BubbleComponent.h:71
@ below
Definition juce_BubbleComponent.h:70
@ right
Definition juce_BubbleComponent.h:72
Rectangle< int > content
Definition juce_BubbleComponent.h:178
void paint(Graphics &) override
Definition juce_BubbleComponent.cpp:41
ColourIds
Definition juce_BubbleComponent.h:141
@ outlineColourId
Definition juce_BubbleComponent.h:143
@ backgroundColourId
Definition juce_BubbleComponent.h:142
int allowablePlacements
Definition juce_BubbleComponent.h:180
Point< int > arrowTip
Definition juce_BubbleComponent.h:179
virtual void getContentSize(int &width, int &height)=0
Definition juce_Component.h:36
Component() noexcept
Definition juce_Component.cpp:517
Definition juce_DropShadowEffect.h:86
Definition juce_GraphicsContext.h:45
Definition juce_Point.h:42
Definition juce_Rectangle.h:67
int g
Definition inflate.c:1573
static int int height
Definition pugl.h:1594
static int width
Definition pugl.h:1593
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
Definition juce_BubbleComponent.h:151
virtual void drawBubble(Graphics &, BubbleComponent &, const Point< float > &positionOfTip, const Rectangle< float > &body)=0