JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_LookAndFeel.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//==============================================================================
37{
38 //==============================================================================
40 struct JUCE_API LassoComponentMethods
41 {
42 virtual ~LassoComponentMethods() = default;
43
44 virtual void drawLasso (Graphics&, Component& lassoComp) = 0;
45 };
46
47 //==============================================================================
50 {
51 virtual ~KeyMappingEditorComponentMethods() = default;
52
53 virtual void drawKeymapChangeButton (Graphics&, int width, int height, Button&, const String& keyDescription) = 0;
54 };
55
56 //==============================================================================
59 {
60 virtual ~AudioDeviceSelectorComponentMethods() = default;
61
62 virtual void drawLevelMeter (Graphics&, int width, int height, float level) = 0;
63 };
64};
65
66
67//==============================================================================
108{
109public:
110 //==============================================================================
112 LookAndFeel();
113
115 ~LookAndFeel() override;
116
117 //==============================================================================
123 static LookAndFeel& getDefaultLookAndFeel() noexcept;
124
133 static void setDefaultLookAndFeel (LookAndFeel* newDefaultLookAndFeel) noexcept;
134
135 //==============================================================================
153 Colour findColour (int colourId) const noexcept;
154
161 void setColour (int colourId, Colour colour) noexcept;
162
166 bool isColourSpecified (int colourId) const noexcept;
167
168 //==============================================================================
176 virtual Typeface::Ptr getTypefaceForFont (const Font&);
177
187 void setDefaultSansSerifTypeface (Typeface::Ptr newDefaultTypeface);
188
195 void setDefaultSansSerifTypefaceName (const String& newName);
196
197 //==============================================================================
203 void setUsingNativeAlertWindows (bool shouldUseNativeAlerts);
204
211 bool isUsingNativeAlertWindows();
212
213 //==============================================================================
219 virtual void drawSpinningWaitAnimation (Graphics&, const Colour& colour,
220 int x, int y, int w, int h) = 0;
221
223 virtual Path getTickShape (float height) = 0;
224
226 virtual Path getCrossShape (float height) = 0;
227
233
239
240 //==============================================================================
246 virtual MouseCursor getMouseCursorFor (Component&);
247
249 virtual std::unique_ptr<LowLevelGraphicsContext> createGraphicsContext (const Image& imageToRenderOn,
250 Point<int> origin,
251 const RectangleList<int>& initialClip);
252
256 virtual void playAlertSound();
257
258private:
259 //==============================================================================
260 struct ColourSetting
261 {
262 int colourID;
263 Colour colour;
264
265 bool operator< (const ColourSetting& other) const noexcept { return colourID < other.colourID; }
266 bool operator== (const ColourSetting& other) const noexcept { return colourID == other.colourID; }
267 };
268
269 SortedSet<ColourSetting> colours;
270 String defaultSans, defaultSerif, defaultFixed;
271 Typeface::Ptr defaultTypeface;
272 bool useNativeAlertWindows = false;
273
276};
277
278} // namespace juce
A base class for buttons.
Definition juce_Button.h:43
Represents a colour, also including a transparency value.
Definition juce_Colour.h:38
The base class for all JUCE user-interface objects.
Represents a particular font, including its size, style, etc.
Definition juce_Font.h:42
A graphics context, used for drawing a component or image.
Holds a fixed-size bitmap.
Definition juce_Image.h:58
LookAndFeel objects define the appearance of all the JUCE widgets, and subclasses can be used to appl...
virtual Path getCrossShape(float height)=0
Returns a cross shape for use in yes/no boxes, etc.
virtual void drawSpinningWaitAnimation(Graphics &, const Colour &colour, int x, int y, int w, int h)=0
Draws a small image that spins to indicate that something's happening.
virtual std::unique_ptr< DropShadower > createDropShadowerForComponent(Component &)=0
Creates a drop-shadower for a given component, if required.
virtual std::unique_ptr< FocusOutline > createFocusOutlineForComponent(Component &)=0
Creates a focus outline for a given component, if required.
virtual Path getTickShape(float height)=0
Returns a tick shape for use in yes/no boxes, etc.
Represents a mouse cursor image.
A path is a sequence of lines and curves that may either form a closed shape or be open-ended.
Definition juce_Path.h:65
A pair of (x, y) coordinates.
Definition juce_Point.h:42
Maintains a set of rectangles as a complex region.
The JUCE String class!
Definition juce_String.h:53
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for ...
#define JUCE_DECLARE_WEAK_REFERENCEABLE(Class)
Macro to easily allow a class to be made weak-referenceable.
JUCE Namespace.
This class is used to hold a few look and feel base classes which are associated with classes that ma...
This abstract base class is implemented by LookAndFeel classes to provide alert-window drawing functi...
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide button-drawing functionalit...
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide ComboBox functionality.
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide window drawing functionalit...
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide various file-browser layout...
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide label drawing functionality...
Definition juce_Label.h:277
This abstract base class is implemented by LookAndFeel classes to provide menu drawing functionality.
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide window drawing functionalit...
This abstract base class is implemented by LookAndFeel classes to provide scrollbar-drawing functiona...
This abstract base class is implemented by LookAndFeel classes to provide SidePanel drawing functiona...
This abstract base class is implemented by LookAndFeel classes to provide slider drawing functionalit...
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide window drawing functionalit...
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide TextEditor drawing function...
This abstract base class is implemented by LookAndFeel classes.
This abstract base class is implemented by LookAndFeel classes to provide window drawing functionalit...
This abstract base class is implemented by LookAndFeel classes to provide TreeView drawing functional...