HTMLMeterElement.h [plain text]
#ifndef HTMLMeterElement_h
#define HTMLMeterElement_h
#if ENABLE(METER_ELEMENT)
#include "LabelableElement.h"
namespace WebCore {
class MeterValueElement;
class RenderMeter;
class HTMLMeterElement final : public LabelableElement {
public:
static PassRefPtr<HTMLMeterElement> create(const QualifiedName&, Document&);
enum GaugeRegion {
GaugeRegionOptimum,
GaugeRegionSuboptimal,
GaugeRegionEvenLessGood
};
double min() const;
void setMin(double, ExceptionCode&);
double max() const;
void setMax(double, ExceptionCode&);
double value() const;
void setValue(double, ExceptionCode&);
double low() const;
void setLow(double, ExceptionCode&);
double high() const;
void setHigh(double, ExceptionCode&);
double optimum() const;
void setOptimum(double, ExceptionCode&);
double valueRatio() const;
GaugeRegion gaugeRegion() const;
virtual bool canContainRangeEndPoint() const override { return false; }
private:
HTMLMeterElement(const QualifiedName&, Document&);
virtual ~HTMLMeterElement();
RenderMeter* renderMeter() const;
virtual bool supportLabels() const override { return true; }
virtual bool recalcWillValidate() const { return false; }
virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
virtual bool childShouldCreateRenderer(const Node&) const override;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
void didElementStateChange();
virtual void didAddUserAgentShadowRoot(ShadowRoot*) override;
RefPtr<MeterValueElement> m_value;
};
NODE_TYPE_CASTS(HTMLMeterElement)
}
#endif
#endif