11namespace tracktion {
inline namespace engine
21 bool operator< (
const ItemWithID& other)
const {
return id < other.id; }
26 for (
const auto& name : names)
27 items.add ({ name, startID++ });
31 for (
const auto& i : items)
32 m.addItem (i.id, i.name);
49 bool wasFound =
false;
73 for (
int i = 0; i < names.
size(); ++i)
78template <
typename Vector,
typename Predicate>
79inline bool removeIf (Vector& v, Predicate&& pred)
87 v.erase (newEnd, oldEnd);
93template <
typename FloatingPo
intType>
94inline bool almostEqual (FloatingPointType firstValue, FloatingPointType secondValue, FloatingPointType precision = (FloatingPointType) 0.00001)
96 return std::abs (firstValue - secondValue) < precision;
125enum class AuxPosition
static JUCEApplicationBase * getInstance() noexcept
static void hideWaitCursor()
static void showWaitCursor()
ValueType getCentreX() const noexcept
ValueType getCentreY() const noexcept
ValueType getWidth() const noexcept
bool isEmpty() const noexcept
ValueType getHeight() const noexcept
void insert(int index, String stringToAdd)
int size() const noexcept
void add(String stringToAdd)
const String & getAttributeValue(int attributeIndex) const noexcept
void removeAllAttributes() noexcept
const String & getAttributeName(int attributeIndex) const noexcept
int getNumAttributes() const noexcept
void setAttribute(const Identifier &attributeName, const String &newValue)
Shows and hides the mouse wait cursor where appropriate.
~ScopedWaitCursor()
Hides the wait cursor.
ScopedWaitCursor()
Shows the wait cursor.
bool almostEqual(FloatingPointType firstValue, FloatingPointType secondValue, FloatingPointType precision=(FloatingPointType) 0.00001)
Checks to see if two values are equal within a given precision.