Skip to content

Commit

Permalink
Add KnobEventHandler::getMinimum/getMaximum()
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Feb 25, 2025
1 parent 8ae007d commit 52416da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dgl/EventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ class KnobEventHandler
// NOTE: value is assumed to be scaled if using log
void setDefault(float def) noexcept;

float getMinimum() const noexcept;
float getMaximum() const noexcept;

// NOTE: value is assumed to be scaled if using log
void setRange(float min, float max) noexcept;

Expand Down
10 changes: 10 additions & 0 deletions dgl/src/EventHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,16 @@ void KnobEventHandler::setDefault(const float def) noexcept
pData->usingDefault = true;
}

float KnobEventHandler::getMinimum() const noexcept
{
return pData->minimum;
}

float KnobEventHandler::getMaximum() const noexcept
{
return pData->maximum;
}

void KnobEventHandler::setRange(const float min, const float max) noexcept
{
pData->setRange(min, max);
Expand Down

0 comments on commit 52416da

Please sign in to comment.