I don’t know about anyone else, but I seem to keep finding really useful methods in JUCE that I didn’t notice straight away, or which aren’t where I’d expect them to be, so I’m wondering if it would be a good idea to start a thread to list them?
For example, two of my recent discoveries are:
Font::setDefaultSanSerifFontName() : Sets the default font JUCE uses - useful for skinning etc. File::startsAsProcess() : Attempts to launch the file as an executable, or open it with the default application associated. I actually wrote a whole class (cross-platform too) to do this myself, before I realised JUCE could already do it for me.
So anyway, is this a good idea, or am I the only one who doesn’t read the docs properly?
[quote=“jules”]the ComponentDragger class
MouseHoverDetector[/quote]
:shock: I hadn’t noticed those two - I can imagine a number of cool things I could do with ComponentDragger…
[quote=“Karbon L. Forms”]I think the JUCE official slogan should be “Woaw! When the fuck did that appear!?”[/quote] :lol:
I just found another one, which would have been really helpful if I’d noticed it a couple of months ago: the TextLayout class, to let you find out how many pixels a line of text will take up.
[quote=“NiallM”][quote=“Karbon L. Forms”]I think the JUCE official slogan should be “Woaw! When the fuck did that appear!?”[/quote] :lol:
I just found another one, which would have been really helpful if I’d noticed it a couple of months ago: the TextLayout class, to let you find out how many pixels a line of text will take up.
Niall.[/quote]
…and if you’re just measuring the width of a line, it’s also probably easier to use the Font::getStringWidth() method.
:oops: How long’s that been there? I distinctly remember spending a good couple of days looking through the Font (and GlyphArrangement, and String…) documentation for that exact method a couple of months ago…
:oops: How long’s that been there? I distinctly remember spending a good couple of days looking through the Font (and GlyphArrangement, and String…) documentation for that exact method a couple of months ago…