|
JUCE
|
Represents an individual BLOCKS device. More...
Inheritance diagram for juce::Block:Classes | |
| struct | ConnectionPort |
| These are the edge-connectors that a device may have. More... | |
| struct | DataInputPortListener |
| Interface for objects listening to input data port. More... | |
Public Types | |
| enum | Type { unknown = 0, lightPadBlock, liveBlock, loopBlock, developerControlBlock } |
| The different block types. More... | |
| using | Ptr = juce::ReferenceCountedObjectPtr< Block > |
| The Block class is reference-counted, so always use a Block::Ptr when you are keeping references to them. More... | |
| using | Array = juce::ReferenceCountedArray< Block > |
| The Block class is reference-counted, so Block::Array is useful when you are storing lists of them. More... | |
| using | UID = uint64 |
| using | Timestamp = uint32 |
| This type is used for timestamping events. More... | |
Public Member Functions | |
| virtual | ~Block () |
| Destructor. More... | |
| virtual Type | getType () const =0 |
| Returns the type of this device. More... | |
| virtual juce::String | getDeviceDescription () const =0 |
| Returns a human-readable description of this device type. More... | |
| virtual float | getBatteryLevel () const =0 |
| Returns the battery level in the range 0.0 to 1.0. More... | |
| virtual bool | isBatteryCharging () const =0 |
| Returns true if the battery is charging. More... | |
| virtual bool | isConnected () const =0 |
| Returns true if this block is connected and active. More... | |
| virtual bool | isMasterBlock () const =0 |
| Returns true if this block is directly connected to the application, as opposed to only being connected to a different block via a connection port. More... | |
| virtual int | getWidth () const =0 |
| Returns the width of the device in logical device units. More... | |
| virtual int | getHeight () const =0 |
| Returns the height of the device in logical device units. More... | |
| virtual bool | isHardwareBlock () const =0 |
| Returns true if the device is a physical hardware block (i.e. More... | |
| virtual float | getMillimetersPerUnit () const =0 |
| Returns the length of one logical device unit as physical millimeters. More... | |
| virtual LEDGrid * | getLEDGrid () const =0 |
| If this block has a grid of LEDs, this will return an object to control it. More... | |
| virtual LEDRow * | getLEDRow () const =0 |
| If this block has a row of LEDs, this will return an object to control it. More... | |
| virtual juce::Array< StatusLight * > | getStatusLights () const =0 |
| If this block has any status LEDs, this will return an array of objects to control them. More... | |
| virtual TouchSurface * | getTouchSurface () const =0 |
| If this block has a pressure-sensitive surface, this will return an object to access its data. More... | |
| virtual juce::Array< ControlButton * > | getButtons () const =0 |
| If this block has any control buttons, this will return an array of objects to control them. More... | |
| virtual bool | supportsGraphics () const =0 |
| This returns true if the block supports generating graphics by drawing into a JUCE Graphics context. More... | |
| virtual juce::Array< ConnectionPort > | getPorts () const =0 |
| Returns a list of the connectors that this device has. More... | |
| virtual void | addDataInputPortListener (DataInputPortListener *) |
| Adds a new listener of data input port. More... | |
| virtual void | removeDataInputPortListener (DataInputPortListener *) |
| Removes a listener of data input port. More... | |
| virtual void | sendMessage (const void *messageData, size_t messageSize)=0 |
| Sends a message to the block. More... | |
Public Attributes | |
| const juce::String | serialNumber |
| The Block's serial number. More... | |
| const UID | uid |
| This Block's UID. More... | |
Protected Member Functions | |
| Block (const juce::String &serialNumberToUse) | |
Protected Attributes | |
| juce::ListenerList< DataInputPortListener > | dataInputPortListeners |
Represents an individual BLOCKS device.
| using juce::Block::Ptr = juce::ReferenceCountedObjectPtr<Block> |
The Block class is reference-counted, so always use a Block::Ptr when you are keeping references to them.
| using juce::Block::Array = juce::ReferenceCountedArray<Block> |
The Block class is reference-counted, so Block::Array is useful when you are storing lists of them.
| using juce::Block::UID = uint64 |
| using juce::Block::Timestamp = uint32 |
This type is used for timestamping events.
It represents a number of milliseconds since the block device was booted.
| enum juce::Block::Type |
The different block types.
| Enumerator | |
|---|---|
| unknown | |
| lightPadBlock | |
| liveBlock | |
| loopBlock | |
| developerControlBlock | |
|
virtual |
Destructor.
|
protected |
|
pure virtual |
Returns the type of this device.
|
pure virtual |
Returns a human-readable description of this device type.
|
pure virtual |
Returns the battery level in the range 0.0 to 1.0.
|
pure virtual |
Returns true if the battery is charging.
|
pure virtual |
Returns true if this block is connected and active.
|
pure virtual |
Returns true if this block is directly connected to the application, as opposed to only being connected to a different block via a connection port.
|
pure virtual |
Returns the width of the device in logical device units.
|
pure virtual |
Returns the height of the device in logical device units.
|
pure virtual |
Returns true if the device is a physical hardware block (i.e.
not a virtual block).
|
pure virtual |
Returns the length of one logical device unit as physical millimeters.
|
pure virtual |
If this block has a grid of LEDs, this will return an object to control it.
Note that the pointer that is returned belongs to this object, and the caller must neither delete it or use it after the lifetime of this Block object has finished. If there are no LEDs, then this method will return nullptr.
|
pure virtual |
If this block has a row of LEDs, this will return an object to control it.
Note that the pointer that is returned belongs to this object, and the caller must neither delete it or use it after the lifetime of this Block object has finished. If there are no LEDs, then this method will return nullptr.
|
pure virtual |
|
pure virtual |
If this block has a pressure-sensitive surface, this will return an object to access its data.
Note that the pointer returned does is owned by this object, and the caller must neither delete it or use it after the lifetime of this Block object has finished. If the device is not touch-sensitive, then this method will return nullptr.
|
pure virtual |
|
pure virtual |
This returns true if the block supports generating graphics by drawing into a JUCE Graphics context.
This should only be true for virtual on-screen blocks; hardware blocks will instead use the LED Grid for visuals.
|
pure virtual |
Returns a list of the connectors that this device has.
|
virtual |
Adds a new listener of data input port.
|
virtual |
Removes a listener of data input port.
|
pure virtual |
Sends a message to the block.
| const juce::String juce::Block::serialNumber |
The Block's serial number.
| const UID juce::Block::uid |
This Block's UID.
This will be globally unique, and remains constant for a particular device.
|
protected |