openshot-audio  0.1.7
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) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_LOOKANDFEEL_H_INCLUDED
26 #define JUCE_LOOKANDFEEL_H_INCLUDED
27 
28 //==============================================================================
34 {
35  //==============================================================================
38  {
40 
41  virtual void drawLasso (Graphics&, Component& lassoComp) = 0;
42  };
43 
44  //==============================================================================
47  {
49 
50  virtual void drawKeymapChangeButton (Graphics&, int width, int height, Button&, const String& keyDescription) = 0;
51  };
52 
53  //==============================================================================
56  {
58 
59  virtual void drawLevelMeter (Graphics&, int width, int height, float level) = 0;
60  };
61 };
62 
63 
64 //==============================================================================
102 {
103 public:
104  //==============================================================================
106  LookAndFeel();
107 
109  virtual ~LookAndFeel();
110 
111  //==============================================================================
117  static LookAndFeel& getDefaultLookAndFeel() noexcept;
118 
127  static void setDefaultLookAndFeel (LookAndFeel* newDefaultLookAndFeel) noexcept;
128 
129  //==============================================================================
147  Colour findColour (int colourId) const noexcept;
148 
153  void setColour (int colourId, Colour colour) noexcept;
154 
158  bool isColourSpecified (int colourId) const noexcept;
159 
160  //==============================================================================
165  virtual Typeface::Ptr getTypefaceForFont (const Font&);
166 
173  void setDefaultSansSerifTypefaceName (const String& newName);
174 
175  //==============================================================================
179  virtual MouseCursor getMouseCursorFor (Component&);
180 
181  //==============================================================================
183  virtual LowLevelGraphicsContext* createGraphicsContext (const Image& imageToRenderOn,
184  const Point<int>& origin,
185  const RectangleList<int>& initialClip);
186 
187  void setUsingNativeAlertWindows (bool shouldUseNativeAlerts);
188  bool isUsingNativeAlertWindows();
189 
190  //==============================================================================
195  virtual void drawSpinningWaitAnimation (Graphics&, const Colour& colour,
196  int x, int y, int w, int h) = 0;
197 
198  //==============================================================================
200  virtual Path getTickShape (float height) = 0;
202  virtual Path getCrossShape (float height) = 0;
203 
204  //==============================================================================
205  virtual DropShadower* createDropShadowerForComponent (Component*) = 0;
206 
207  //==============================================================================
209  virtual void playAlertSound();
210 
211 private:
212  //==============================================================================
213  friend class WeakReference<LookAndFeel>;
214  WeakReference<LookAndFeel>::Master masterReference;
215 
216  struct ColourSetting
217  {
218  int colourID;
219  Colour colour;
220 
221  bool operator< (const ColourSetting& other) const noexcept { return colourID < other.colourID; }
222  bool operator== (const ColourSetting& other) const noexcept { return colourID == other.colourID; }
223  };
224 
225  SortedSet<ColourSetting> colours;
226  String defaultSans, defaultSerif, defaultFixed;
227  bool useNativeAlertWindows;
228 
230 };
231 
232 
233 #endif // JUCE_LOOKANDFEEL_H_INCLUDED
ExtraLookAndFeelBaseClasses::LassoComponentMethods::~LassoComponentMethods
virtual ~LassoComponentMethods()
Definition: juce_LookAndFeel.h:39
Path
Definition: juce_Path.h:62
ComboBox::LookAndFeelMethods
Definition: juce_ComboBox.h:358
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
operator==
bool operator==(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:565
Toolbar::LookAndFeelMethods
Definition: juce_Toolbar.h:272
FilenameComponent::LookAndFeelMethods
Definition: juce_FilenameComponent.h:188
ExtraLookAndFeelBaseClasses
Definition: juce_LookAndFeel.h:33
Component::isColourSpecified
bool isColourSpecified(int colourId) const
Definition: juce_Component.cpp:2178
FileBrowserComponent::LookAndFeelMethods
Definition: juce_FileBrowserComponent.h:185
Button
Definition: juce_Button.h:39
String
Definition: juce_String.h:43
ExtraLookAndFeelBaseClasses::LassoComponentMethods
Definition: juce_LookAndFeel.h:37
Colour
Definition: juce_Colour.h:35
BubbleComponent::LookAndFeelMethods
Definition: juce_BubbleComponent.h:143
DropShadower
Definition: juce_DropShadower.h:43
JUCE_API
#define JUCE_API
Definition: juce_StandardHeader.h:139
CallOutBox::LookAndFeelMethods
Definition: juce_CallOutBox.h:138
LowLevelGraphicsContext
Definition: juce_LowLevelGraphicsContext.h:43
Image
Definition: juce_Image.h:54
ResizableWindow::LookAndFeelMethods
Definition: juce_ResizableWindow.h:324
SortedSet< ColourSetting >
TabbedButtonBar::LookAndFeelMethods
Definition: juce_TabbedButtonBar.h:303
Graphics
Definition: juce_GraphicsContext.h:42
TableHeaderComponent::LookAndFeelMethods
Definition: juce_TableHeaderComponent.h:370
TextEditor::LookAndFeelMethods
Definition: juce_TextEditor.h:594
noexcept
#define noexcept
Definition: juce_CompilerSupport.h:141
GroupComponent::LookAndFeelMethods
Definition: juce_GroupComponent.h:87
StretchableLayoutResizerBar::LookAndFeelMethods
Definition: juce_StretchableLayoutResizerBar.h:77
PopupMenu::LookAndFeelMethods
Definition: juce_PopupMenu.h:549
Button::LookAndFeelMethods
Definition: juce_Button.h:356
ExtraLookAndFeelBaseClasses::AudioDeviceSelectorComponentMethods
Definition: juce_LookAndFeel.h:55
ScrollBar::LookAndFeelMethods
Definition: juce_ScrollBar.h:299
LookAndFeel
Definition: juce_LookAndFeel.h:74
RectangleList< int >
Slider::LookAndFeelMethods
Definition: juce_Slider.h:799
Font
Definition: juce_Font.h:39
ConcertinaPanel::LookAndFeelMethods
Definition: juce_ConcertinaPanel.h:98
DocumentWindow::LookAndFeelMethods
Definition: juce_DocumentWindow.h:230
Component::setColour
void setColour(int colourId, Colour newColour)
Definition: juce_Component.cpp:2189
AlertWindow::LookAndFeelMethods
Definition: juce_AlertWindow.h:422
ExtraLookAndFeelBaseClasses::KeyMappingEditorComponentMethods
Definition: juce_LookAndFeel.h:46
Component
Definition: juce_Component.h:33
ProgressBar::LookAndFeelMethods
Definition: juce_ProgressBar.h:95
TreeView::LookAndFeelMethods
Definition: juce_TreeView.h:821
MouseCursor
Definition: juce_MouseCursor.h:36
Point< int >
Label::LookAndFeelMethods
Definition: juce_Label.h:264
ExtraLookAndFeelBaseClasses::KeyMappingEditorComponentMethods::~KeyMappingEditorComponentMethods
virtual ~KeyMappingEditorComponentMethods()
Definition: juce_LookAndFeel.h:48
ReferenceCountedObjectPtr< Typeface >
Component::findColour
Colour findColour(int colourId, bool inheritFromParent=false) const
Definition: juce_Component.cpp:2166
operator<
JUCE_API bool JUCE_CALLTYPE operator<(const String &s1, const String &s2) noexcept
Definition: juce_String.cpp:589
PropertyComponent::LookAndFeelMethods
Definition: juce_PropertyComponent.h:121
ExtraLookAndFeelBaseClasses::AudioDeviceSelectorComponentMethods::~AudioDeviceSelectorComponentMethods
virtual ~AudioDeviceSelectorComponentMethods()
Definition: juce_LookAndFeel.h:57
TooltipWindow::LookAndFeelMethods
Definition: juce_TooltipWindow.h:106
WeakReference
Definition: juce_WeakReference.h:82
ImageButton::LookAndFeelMethods
Definition: juce_ImageButton.h:129