2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-10 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
27 //==============================================================================
28 // String::hashCode64 actually hit some dupes, so this is a more powerful version.
29 const int64
hashCode64 (const String
& s
);
30 const String
randomHexString (Random
& random
, int numChars
);
31 const String
hexString8Digits (int value
);
33 const String
createAlphaNumericUID();
34 const String
createGUID (const String
& seed
); // Turns a seed into a windows GUID
36 const String
escapeSpaces (const String
& text
); // replaces spaces with blackslash-space
38 const StringPairArray
parsePreprocessorDefs (const String
& defs
);
39 const StringPairArray
mergePreprocessorDefs (StringPairArray inheritedDefs
, const StringPairArray
& overridingDefs
);
40 const String
createGCCPreprocessorFlags (const StringPairArray
& defs
);
41 const String
replacePreprocessorDefs (const StringPairArray
& definitions
, String sourceString
);
43 //==============================================================================
44 int indexOfLineStartingWith (const StringArray
& lines
, const String
& text
, int startIndex
);
46 void autoScrollForMouseEvent (const MouseEvent
& e
, bool scrollX
= true, bool scrollY
= true);
48 void drawComponentPlaceholder (Graphics
& g
, int w
, int h
, const String
& text
);
49 void drawRecessedShadows (Graphics
& g
, int w
, int h
, int shadowSize
);
52 //==============================================================================
53 class PropertyPanelWithTooltips
: public Component
,
57 PropertyPanelWithTooltips();
58 ~PropertyPanelWithTooltips();
60 PropertyPanel
& getPanel() noexcept
{ return panel
; }
62 void paint (Graphics
& g
);
72 const String
findTip (Component
* c
);
75 //==============================================================================
76 class FloatingLabelComponent
: public Component
79 FloatingLabelComponent();
82 void update (Component
* parent
, const String
& text
, const Colour
& textColour
, int x
, int y
, bool toRight
, bool below
);
83 void paint (Graphics
& g
);
88 GlyphArrangement glyphs
;