2016-05-30 23:58:58 -04:00
|
|
|
#pragma once
|
2016-05-19 10:41:06 -04:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "drawtypes/icon.hpp"
|
|
|
|
|
|
|
|
namespace drawtypes
|
|
|
|
{
|
|
|
|
class Ramp
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
std::vector<std::unique_ptr<Icon>> icons;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Ramp(){}
|
2016-05-30 23:58:58 -04:00
|
|
|
explicit Ramp(std::vector<std::unique_ptr<Icon>> icons);
|
2016-05-19 10:41:06 -04:00
|
|
|
|
|
|
|
void add(std::unique_ptr<Icon> &&icon);
|
|
|
|
std::unique_ptr<Icon> &get(int idx);
|
|
|
|
std::unique_ptr<Icon> &get_by_percentage(float percentage);
|
|
|
|
|
|
|
|
operator bool() {
|
|
|
|
return this->icons.size() > 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-06-20 21:59:43 -04:00
|
|
|
std::unique_ptr<Ramp> get_config_ramp(std::string module_name, std::string ramp_name = "ramp", bool required = true);
|
2016-05-19 10:41:06 -04:00
|
|
|
}
|