#ifndef RenderSlider_h
#define RenderSlider_h
#include "RenderBlock.h"
namespace WebCore {
class HTMLDivElement;
class HTMLInputElement;
class HTMLSliderThumbElement;
class MouseEvent;
class RenderSlider : public RenderBlock {
public:
RenderSlider(HTMLInputElement*);
~RenderSlider();
virtual const char* renderName() const { return "RenderSlider"; }
virtual bool isSlider() const { return true; }
virtual short baselinePosition( bool, bool ) const;
virtual void calcPrefWidths();
virtual void setStyle(RenderStyle*);
virtual void layout();
virtual void updateFromElement();
bool mouseEventIsInThumb(MouseEvent*);
void setValueForPosition(int position);
double setPositionFromValue(bool inLayout = false);
int positionForOffset(const IntPoint&);
void valueChanged();
int currentPosition();
void setCurrentPosition(int pos);
void forwardEvent(Event*);
bool inDragMode() const;
private:
RenderStyle* createThumbStyle(RenderStyle* parentStyle, RenderStyle* oldStyle = 0);
int trackSize();
RefPtr<HTMLSliderThumbElement> m_thumb;
};
}
#endif // RenderSlider_h