#ifndef GAUGEMSG_H
#define GAUGEMSG_H
#include "util/msg.h"

class GaugeMsg: public msg::Message {
public:
    typedef enum { normal, tick } kind;

private:
    kind gaugeType_;
    size_t progress_;
    size_t range_;

public:
    GaugeMsg (void): gaugeType_ (normal), progress_(0), range_(1) {};
    GaugeMsg (kind t, size_t p=0, size_t r=1): gaugeType_ (t), progress_ (p), range_ (r) {}
    kind gaugeType (void) const { return gaugeType_; }
    void gaugeType (kind t) { gaugeType_ = t; }
    size_t progress (void) const { return progress_; }
    void progress (size_t p) { progress_ = p; }
    size_t range (void) const { return range_; }
    void range (size_t r) { range_ = r; }
};

class GaugeRequestMsg: public msg::Message {
public:
    GaugeRequestMsg (const std::string& gL, msg::Talker* t, const std::string& bL="", msg::Listener* l=NULL):
      gaugeLabel (gL), gaugeTalker (t), buttonLabel (bL), buttonListener (l) {}
    std::string gaugeLabel;
    msg::Talker* gaugeTalker;
    std::string buttonLabel;
    msg::Listener* buttonListener;
};

class GaugeDisposeMsg: public msg::Message {
public:
    GaugeDisposeMsg (msg::Talker* t, msg::Listener* l=NULL):
      gaugeTalker (t), buttonListener (l) {}
    msg::Talker* gaugeTalker;
    msg::Listener* buttonListener;
};
#endif
