#pragma once

#include "widget.h"
#include "core/rectangle.h"
#include "core/corefactory.h"

class BPMSlider : public Widget
{
public:
    explicit BPMSlider(const std::shared_ptr<kku::CoreFactory>& factory);

    virtual void input(const kku::SystemEvent& event) override;
    virtual void update(const kku::microsec& dt) override;
    virtual void display() const override;
    virtual void move(const kku::Vector2<float>& delta) override;
    virtual bool isUnderMouse(const kku::Point& position) const override;

    virtual void setRect(const kku::Area<float>& rect) override;
    virtual kku::Area<float> getRect() const override;

    virtual void setPosition(const kku::Point& position) override;
    virtual kku::Point getPosition() const override;

    void setTickPosition(float x_position);

private:
    std::shared_ptr<kku::Rectangle> _slider_background;
    std::shared_ptr<kku::Rectangle> _slider_tick;
};


