Detailed API reference guide
A complete doxygen-generated API reference guide is available here
as HTML, or can be downloaded as a precompiled Windows help file from here.
Installation
To install the code, just unzip it and put the folder somewhere convenient for you. If you're going to
build the demo application (available from the downloads page), then that will
expect to be alongside the main juce folder (i.e. in the same parent directory).
To build the Juce library itself, there are project files for XCode, VC6, Visual Studio Express, etc.
in the juce/build directory.
To compile an application that links to the library, you can either look at the projects in the
demo application, or there are some basic 'hello world' projects in the juce/projects directory.
More detailed documentation about setting up the build environment for specific compilers is included
in the juce/docs directory of the source-tree.
Quick overview of the main classes
Source Tree Structure
The JUCE tree is split into two main sections - "core" classes, and "application framework" classes.
The core classes are basic building blocks that could be used on their own by any application -
strings, containers, files, streams, etc. The application framework classes handle the event-loops, user interface, audio,
imaging, etc., and are designed for use within a dedicated JUCE application. The core classes don't rely on any classes in the
application framework, but those in the app framework use the core classes extensively.
I'd like to think that JUCE is a pretty easy library to learn your way around - the best
way to learn it is probably to look through the demo code, and browse the API documentation.
Here's a breakdown of the important classes to know about...
Core classes
Some of the more important classes in the "core" section are:
- String - a powerful,
reference-counted string class that the whole library
uses.
- Array, OwnedArray, StringArray,
etc. - a collection of array classes.
- File - represents a
file or directory and has many methods for searchng,
copying, reading/writing etc.
- InputStream and OutputStream
- streaming classes, and their various subclasses for
reading/writing to memory, files, gzipping, etc.
- SystemStats - for
easy access to information about the operating system,
CPU, memory, etc.
- Time and RelativeTime
- take care of all your date/time needs
- Random - random
number generator class.
- MathsFunctions.h and DataConversions.h
- these files contain functions for finding min/max
values, converting endianness, rounding floating point
numbers, and lots more useful numerical helper functions.
- MemoryBlock - a class
to allocate and resize/manipulate a block of memory. Much
neater and more powerful than doing a malloc() when you
need a block of memory to work with.
- Singleton.h - this
file contains macros for implementing a thread-safe
singleton class.
- Logger - this class
lets you define a custom application-wide logger object.
- ReferenceCountedObject
- a base class for objects that are reference counted, to
be used along with the ReferenceCountedPtr
smart pointer object.
- XmlDocument and XmlElement
- for parsing XML into a tree of XmlElements, which can
be easily manipulated and turned back into a text
document. The XmlElement class is actually quite a
powerful object for storing data structures in its own
right, even if it doesn't need to be externalised.
- Thread - allows a
thread to be started/stopped, etc.
- CriticalSection and ScopedLock
- critical section handling.
- WaitableEvent - for
allowing threads to wait/signal each other.
- Process - controls
the application's process, allowing its priority to be
adjusted, etc.
Application Framework classes
Some important app-framework classes to be
aware of are:
- JUCEApplication
- this class wraps the startup and shutdown code for an
application.
- Component - the base
class for all user-interface objects. A component can
either be a lightweight component inside another one, or
can be placed on the desktop.
- Various widget classes
in juce/src/juce_appframework/gui/gui_components/widgets
- these include list-boxes, treeviews, scrollbars,
drop-down lists, text editors, drag-and-drop support,
etc.
- LookAndFeel - a class
that controls the way various widgets are drawn, allowing
custom look-and-feel styles to be applied to components.
- MouseCursor - for
choosing either a built-in cursor, or creating a cursor
from an image.
- MouseListener, MouseEvent
- provides powerful mouse handling.
- KeyPress - represents
a key-press including modifier keys, etc.
- PopupMenu - easy
creation of pop-up contextual menus.
- AlertWindow - for
popping up message windows, e.g. ok/cancel boxes, etc.
- MessageManager, Message,
MessageListener - basic event-handling
classes for sending asynchronous events via a
platform-independent message queue.
- Timer - allows a
class to be called back repeatedly at a given time
interval.
- ActionListener, ActionBroadcaster,
ChangeListener, ChangeBroadcaster
- for sending/receiving various types of change events.
- Graphics - this class
is a graphics context, used for drawing the contents of a
component.
- Colour - wrapper
class to represent a colour, with transparency.
- Image - a 24-bit
bitmap, optionally with an alpha-channel.
- ImageFileFormat and ImageCache
- for creating Image objects from jpeg, png, or gif data.
- Path - a shape
defined by straight lines or quadratic/cubic bezier
curves, which can be manipulated and drawn.
- Point, Line,
Rectangle, RectangleList,
AffineTransform - various geometry
classes
- Font - represents a
font with a specific height, style, kerning, aspect
ratio, etc.
- Brush - different
brush types are used by a graphics context to fill
regions; this allows drawing of colour gradients, tiled
images, or customised brush fills.
- ImageEffectFilter -
performs a filtering operation on an image. These can
also be applied to a component to create easy
drop-shadows, glows, etc.
- Desktop - provides
information about the desktop, including the position of
multi-monitor setups.
- DeletedAtShutdown -
objects derived from this class will be automatically
cleared up before the application finishes.
- UndoManager - allows
undo/redo support to be added to an object using a set of
UndoCommand objects.
- AudioIODevice -
controls an audio I/O device, allowing multi-channel
input and output.
- AudioSource - an
audio-processing node, of which there are various types
like a ResamplingAudioSource, AudioFormatReaderSource,
etc.
- AudioSampleBuffer - a
multi-channel buffer for storing/mixing/manipulating
audio samples.
- AudioStreamPlayer -
controls playback of an audio file or other source.
- AudioFormat - base
class for audio format codecs, e.g. WavAudioFormat,
AiffAudioFormat, AudioCDReader.
- MidiMessage, MidiFile
- for reading/writing and manipulating midi files and
events.
- MidiOutput, MidiInput
- allow use of any available hardware MIDI i/o ports.