LMMS
Loading...
Searching...
No Matches
juce_CallOutBox.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//==============================================================================
60 private Timer
61{
62public:
63 //==============================================================================
77 CallOutBox (Component& contentComponent,
78 Rectangle<int> areaToPointTo,
80
81 //==============================================================================
83 void setArrowSize (float newSize);
84
93 void updatePosition (const Rectangle<int>& newAreaToPointTo,
94 const Rectangle<int>& newAreaToFitIn);
95
96
116 static CallOutBox& launchAsynchronously (std::unique_ptr<Component> contentComponent,
117 Rectangle<int> areaToPointTo,
119
123 void dismiss();
124
133 void setDismissalMouseClicksAreAlwaysConsumed (bool shouldAlwaysBeConsumed) noexcept;
134
135 //==============================================================================
138 {
139 virtual ~LookAndFeelMethods() = default;
140
141 virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image&) = 0;
142 virtual int getCallOutBoxBorderSize (const CallOutBox&) = 0;
143 virtual float getCallOutBoxCornerSize (const CallOutBox&) = 0;
144 };
145
146 //==============================================================================
148 void paint (Graphics&) override;
150 void resized() override;
152 void moved() override;
154 void childBoundsChanged (Component*) override;
156 bool hitTest (int x, int y) override;
158 void inputAttemptWhenModal() override;
160 bool keyPressed (const KeyPress&) override;
162 void handleCommandMessage (int) override;
167
168private:
169 //==============================================================================
175 float arrowSize = 16.0f;
177
179
181 void refreshPath();
182 void timerCallback() override;
183
185};
186
187} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
#define override
Definition DistrhoDefines.h:73
Definition juce_AccessibilityHandler.h:41
void inputAttemptWhenModal() override
Definition juce_CallOutBox.cpp:132
bool keyPressed(const KeyPress &) override
Definition juce_CallOutBox.cpp:180
void handleCommandMessage(int) override
Definition juce_CallOutBox.cpp:164
void dismiss()
Definition juce_CallOutBox.cpp:175
bool dismissalMouseClicksAreAlwaysConsumed
Definition juce_CallOutBox.h:176
Time creationTime
Definition juce_CallOutBox.h:178
int getBorderSize() const noexcept
Definition juce_CallOutBox.cpp:94
Path outline
Definition juce_CallOutBox.h:171
void updatePosition(const Rectangle< int > &newAreaToPointTo, const Rectangle< int > &newAreaToFitIn)
Definition juce_CallOutBox.cpp:191
void childBoundsChanged(Component *) override
Definition juce_CallOutBox.cpp:122
Point< float > targetPoint
Definition juce_CallOutBox.h:172
void refreshPath()
Definition juce_CallOutBox.cpp:245
float arrowSize
Definition juce_CallOutBox.h:175
Image background
Definition juce_CallOutBox.h:174
void setDismissalMouseClicksAreAlwaysConsumed(bool shouldAlwaysBeConsumed) noexcept
Definition juce_CallOutBox.cpp:157
Component & content
Definition juce_CallOutBox.h:170
void timerCallback() override
Definition juce_CallOutBox.cpp:259
void setArrowSize(float newSize)
Definition juce_CallOutBox.cpp:88
static CallOutBox & launchAsynchronously(std::unique_ptr< Component > contentComponent, Rectangle< int > areaToPointTo, Component *parentComponent)
Definition juce_CallOutBox.cpp:80
std::unique_ptr< AccessibilityHandler > createAccessibilityHandler() override
Definition juce_CallOutBox.cpp:266
CallOutBox(Component &contentComponent, Rectangle< int > areaToPointTo, Component *parentComponent)
Definition juce_CallOutBox.cpp:29
bool hitTest(int x, int y) override
Definition juce_CallOutBox.cpp:127
void paint(Graphics &) override
Definition juce_CallOutBox.cpp:105
void lookAndFeelChanged() override
Definition juce_CallOutBox.cpp:99
Rectangle< int > targetArea
Definition juce_CallOutBox.h:173
Rectangle< int > availableArea
Definition juce_CallOutBox.h:173
void resized() override
Definition juce_CallOutBox.cpp:110
void moved() override
Definition juce_CallOutBox.cpp:117
Component * parentComponent
Definition juce_Component.h:2535
Component() noexcept
Definition juce_Component.cpp:517
Definition juce_GraphicsContext.h:45
Definition juce_Image.h:58
Definition juce_KeyPress.h:40
Definition juce_Path.h:65
Definition juce_Point.h:42
Definition juce_Rectangle.h:67
Definition juce_Time.h:37
Timer() noexcept
Definition juce_Timer.cpp:316
int y
Definition inflate.c:1588
unsigned x[BMAX+1]
Definition inflate.c:1586
unsigned f
Definition inflate.c:1572
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
Definition juce_Uuid.h:141
#define false
Definition ordinals.h:83
Definition juce_CallOutBox.h:138
virtual void drawCallOutBoxBackground(CallOutBox &, Graphics &, const Path &, Image &)=0
virtual float getCallOutBoxCornerSize(const CallOutBox &)=0
virtual int getCallOutBoxBorderSize(const CallOutBox &)=0
#define const
Definition zconf.h:137