#ifndef ScrollView_H
#define ScrollView_H
#include "ScrollBarMode.h"
#include "Widget.h"
namespace WebCore {
class FloatRect;
class ScrollView : public Widget {
public:
int visibleWidth() const;
int visibleHeight() const;
FloatRect visibleContentRect() const;
int contentsWidth() const;
int contentsHeight() const;
int contentsX() const;
int contentsY() const;
int actualVisibleWidth() const;
int actualVisibleHeight() const;
int actualContentsX() const;
int actualContentsY() const;
IntSize scrollOffset() const;
void scrollBy(int dx, int dy);
virtual void scrollPointRecursively(int dx, int dy);
virtual void setContentsPos(int x, int y);
virtual void setVScrollBarMode(ScrollBarMode);
virtual void setHScrollBarMode(ScrollBarMode);
virtual void setScrollBarsMode(ScrollBarMode);
void suppressScrollBars(bool suppressed, bool repaintOnUnsuppress = false);
ScrollBarMode vScrollBarMode() const;
ScrollBarMode hScrollBarMode() const;
void addChild(Widget*, int x = 0, int y = 0);
void removeChild(Widget*);
virtual void resizeContents(int w, int h);
void updateContents(const IntRect&, bool now = false);
IntPoint contentsToViewport(const IntPoint&);
IntPoint viewportToContents(const IntPoint&);
void setStaticBackground(bool);
bool inWindow() const;
bool inSuspendedWindow();
void setVisibleSizeOverrideEnabled(bool);
#if __APPLE__
NSView* getDocumentView() const;
#endif
#if WIN32
ScrollView();
~ScrollView();
private:
void updateScrollBars();
IntSize maximumScroll() const;
int updateScrollInfo(short type, int current, int max, int pageSize);
class ScrollViewPrivate;
ScrollViewPrivate* m_data;
#endif
#if PLATFORM(GDK)
void updateView(const IntRect&, bool now = false);
virtual void setDrawable(GdkDrawable* drawable);
virtual void setFrameGeometry(const IntRect&);
ScrollView();
~ScrollView();
private:
void updateScrollBars();
IntSize maximumScroll() const;
int updateScrollInfo(short type, int current, int max, int pageSize);
class ScrollViewPrivate;
ScrollViewPrivate* m_data;
#endif
};
}
#endif