]>
git.saurik.com Git - iphone-api.git/blob - WebCore/RenderSlider.h
3 * Copyright (C) 2006 Apple Computer, Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
22 #ifndef RenderSlider_h
23 #define RenderSlider_h
25 #include "RenderBlock.h"
30 class HTMLInputElement
;
31 class HTMLSliderThumbElement
;
34 class RenderSlider
: public RenderBlock
{
36 RenderSlider(HTMLInputElement
*);
39 virtual const char* renderName() const { return "RenderSlider"; }
40 virtual bool isSlider() const { return true; }
42 virtual int baselinePosition( bool, bool ) const;
43 virtual void calcPrefWidths();
44 virtual void layout();
45 virtual void updateFromElement();
47 virtual bool mouseEventIsInThumb(MouseEvent
*);
49 void setValueForPosition(int position
);
50 double setPositionFromValue(bool inLayout
= false);
51 int positionForOffset(const IntPoint
&);
55 int currentPosition();
56 void setCurrentPosition(int pos
);
58 void forwardEvent(Event
*);
59 bool inDragMode() const;
62 virtual void styleDidChange(StyleDifference
, const RenderStyle
* oldStyle
);
65 PassRefPtr
<RenderStyle
> createThumbStyle(const RenderStyle
* parentStyle
, const RenderStyle
* oldStyle
= 0);
68 RefPtr
<HTMLSliderThumbElement
> m_thumb
;
71 } // namespace WebCore
73 #endif // RenderSlider_h