LMMS
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 //==============================================================================
41 {
42 virtual ~LassoComponentMethods() = default;
43
44 virtual void drawLasso (Graphics&, Component& lassoComp) = 0;
45 };
46
47 //==============================================================================
50 {
52
53 virtual void drawKeymapChangeButton (Graphics&, int width, int height, Button&, const String& keyDescription) = 0;
54 };
55
56 //==============================================================================
59 {
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
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
232 virtual std::unique_ptr<DropShadower> createDropShadowerForComponent (Component&) = 0;
233
238 virtual std::unique_ptr<FocusOutline> createFocusOutlineForComponent (Component&) = 0;
239
240 //==============================================================================
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 //==============================================================================
261 {
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
273
276};
277
278} // namespace juce
Definition juce_Button.h:43
Definition juce_Colour.h:38
Definition juce_Component.h:36
Definition juce_Font.h:42
Definition juce_GraphicsContext.h:45
Definition juce_Image.h:58
static LookAndFeel & getDefaultLookAndFeel() noexcept
Definition juce_LookAndFeel.cpp:107
LookAndFeel()
Definition juce_LookAndFeel.cpp:38
void setDefaultSansSerifTypefaceName(const String &newName)
Definition juce_LookAndFeel.cpp:145
virtual Typeface::Ptr getTypefaceForFont(const Font &)
Definition juce_LookAndFeel.cpp:118
virtual std::unique_ptr< LowLevelGraphicsContext > createGraphicsContext(const Image &imageToRenderOn, Point< int > origin, const RectangleList< int > &initialClip)
Definition juce_LookAndFeel.cpp:170
bool isUsingNativeAlertWindows()
Definition juce_LookAndFeel.cpp:183
String defaultFixed
Definition juce_LookAndFeel.h:270
String defaultSerif
Definition juce_LookAndFeel.h:270
virtual Path getCrossShape(float height)=0
virtual MouseCursor getMouseCursorFor(Component &)
Definition juce_LookAndFeel.cpp:156
virtual void playAlertSound()
Definition juce_linux_Windowing.cpp:809
virtual void drawSpinningWaitAnimation(Graphics &, const Colour &colour, int x, int y, int w, int h)=0
virtual std::unique_ptr< DropShadower > createDropShadowerForComponent(Component &)=0
void setUsingNativeAlertWindows(bool shouldUseNativeAlerts)
Definition juce_LookAndFeel.cpp:178
bool isColourSpecified(int colourId) const noexcept
Definition juce_LookAndFeel.cpp:100
String defaultSans
Definition juce_LookAndFeel.h:270
void setDefaultSansSerifTypeface(Typeface::Ptr newDefaultTypeface)
Definition juce_LookAndFeel.cpp:136
bool useNativeAlertWindows
Definition juce_LookAndFeel.h:272
void setColour(int colourId, Colour colour) noexcept
Definition juce_LookAndFeel.cpp:89
virtual std::unique_ptr< FocusOutline > createFocusOutlineForComponent(Component &)=0
Typeface::Ptr defaultTypeface
Definition juce_LookAndFeel.h:271
SortedSet< ColourSetting > colours
Definition juce_LookAndFeel.h:269
static void setDefaultLookAndFeel(LookAndFeel *newDefaultLookAndFeel) noexcept
Definition juce_LookAndFeel.cpp:112
virtual Path getTickShape(float height)=0
Colour findColour(int colourId) const noexcept
Definition juce_LookAndFeel.cpp:77
Definition juce_MouseCursor.h:39
Definition juce_Path.h:65
Definition juce_Point.h:42
Definition juce_RectangleList.h:43
Definition juce_SortedSet.h:54
Definition juce_String.h:53
ReferenceCountedObjectPtr< Typeface > Ptr
Definition juce_Typeface.h:51
UINT_D64 w
Definition inflate.c:942
int y
Definition inflate.c:1588
unsigned x[BMAX+1]
Definition inflate.c:1586
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
#define JUCE_DECLARE_WEAK_REFERENCEABLE(Class)
Definition juce_WeakReference.h:234
Definition carla_juce.cpp:31
Definition juce_AlertWindow.h:453
Definition juce_BubbleComponent.h:151
Definition juce_Button.h:392
Definition juce_CallOutBox.h:138
Definition juce_ComboBox.h:369
Definition juce_ConcertinaPanel.h:114
Definition juce_DocumentWindow.h:245
virtual void drawLevelMeter(Graphics &, int width, int height, float level)=0
virtual void drawKeymapChangeButton(Graphics &, int width, int height, Button &, const String &keyDescription)=0
virtual void drawLasso(Graphics &, Component &lassoComp)=0
Definition juce_LookAndFeel.h:37
Definition juce_FileBrowserComponent.h:184
Definition juce_FilenameComponent.h:192
Definition juce_GroupComponent.h:87
Definition juce_ImageButton.h:132
Definition juce_Label.h:277
Definition juce_LookAndFeel.h:261
Colour colour
Definition juce_LookAndFeel.h:263
int colourID
Definition juce_LookAndFeel.h:262
Definition juce_PopupMenu.h:915
Definition juce_ProgressBar.h:103
Definition juce_PropertyComponent.h:124
Definition juce_ResizableWindow.h:330
Definition juce_ScrollBar.h:334
Definition juce_SidePanel.h:153
Definition juce_Slider.h:915
Definition juce_StretchableLayoutResizerBar.h:80
Definition juce_TabbedButtonBar.h:310
Definition juce_TableHeaderComponent.h:391
Definition juce_TextEditor.h:691
Definition juce_Toolbar.h:275
Definition juce_TooltipWindow.h:124
Definition juce_TreeView.h:883
uch h[RAND_HEAD_LEN]
Definition crypt.c:459