openshot-audio  0.1.2
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
Definition: juce_StretchableLayoutResizerBar.h:77
Definition: juce_ProgressBar.h:95
Definition: juce_TableHeaderComponent.h:370
Definition: juce_ImageButton.h:129
Definition: juce_LookAndFeel.h:33
void setColour(int colourId, Colour newColour)
Definition: juce_Component.cpp:2189
Definition: juce_GroupComponent.h:87
Colour findColour(int colourId, bool inheritFromParent=false) const
Definition: juce_Component.cpp:2166
Definition: juce_MouseCursor.h:36
Definition: juce_Font.h:39
Definition: juce_Label.h:264
bool isColourSpecified(int colourId) const
Definition: juce_Component.cpp:2178
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_TooltipWindow.h:106
Definition: juce_ComboBox.h:358
Definition: juce_Button.h:39
Definition: juce_LookAndFeel.h:74
Definition: juce_ConcertinaPanel.h:98
Definition: juce_PropertyComponent.h:121
virtual ~AudioDeviceSelectorComponentMethods()
Definition: juce_LookAndFeel.h:57
virtual ~LassoComponentMethods()
Definition: juce_LookAndFeel.h:39
Definition: juce_String.h:43
virtual ~KeyMappingEditorComponentMethods()
Definition: juce_LookAndFeel.h:48
Definition: juce_TreeView.h:821
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_FileBrowserComponent.h:185
Definition: juce_CallOutBox.h:138
Definition: juce_Toolbar.h:272
Definition: juce_Path.h:62
Definition: juce_TextEditor.h:594
Definition: juce_Button.h:356
Definition: juce_Colour.h:35
Definition: juce_DropShadower.h:43
Definition: juce_AlertWindow.h:422
Definition: juce_DocumentWindow.h:230
Definition: juce_Component.h:33
Definition: juce_BubbleComponent.h:143
Definition: juce_FilenameComponent.h:188
JUCE_API bool JUCE_CALLTYPE operator<(const String &s1, const String &s2) noexcept
Definition: juce_core.cpp:590
Definition: juce_WeakReference.h:82
Definition: juce_TabbedButtonBar.h:303
bool operator==(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:565
Definition: juce_ScrollBar.h:299
Definition: juce_ResizableWindow.h:324
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
Definition: juce_GraphicsContext.h:42
Definition: juce_Image.h:54
Definition: juce_LowLevelGraphicsContext.h:43
Definition: juce_PopupMenu.h:549
Definition: juce_Slider.h:799