Commit 1793dfd4 authored by hyatt's avatar hyatt
Browse files

Add invalidation methods to widget.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent da767213
2006-09-22 Dave Hyatt <hyatt@apple.com>
Add support for invalidation of widgets. This will be needed for the Win32 widget subsystem (and for
any widget subsystems that don't have any underlying native objects backing the widgets.
Reviewed by anders
* platform/Widget.h:
* platform/mac/WidgetMac.mm:
(WebCore::Widget::invalidate):
(WebCore::Widget::invalidateRect):
* platform/win/TemporaryLinkStubs.cpp:
(Widget::invalidate):
(Widget::invalidateRect):
2006-09-22 Rob Buis <buis@kd.org>
 
Reviewed by eseidel.
......@@ -90,6 +90,8 @@ namespace WebCore {
void move(const IntPoint&);
virtual void paint(GraphicsContext*, const IntRect&);
virtual void invalidate();
virtual void invalidateRect(const IntRect&);
virtual void setFrameGeometry(const IntRect&);
virtual IntRect frameGeometry() const;
......
......@@ -352,6 +352,20 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
END_BLOCK_OBJC_EXCEPTIONS;
}
void Widget::invalidate()
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
[getView() setNeedsDisplay: YES];
END_BLOCK_OBJC_EXCEPTIONS;
}
void Widget::invalidateRect(const IntRect& r)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
[getView() setNeedsDisplayInRect: r];
END_BLOCK_OBJC_EXCEPTIONS;
}
void Widget::sendConsumedMouseUp()
{
if (client())
......
......@@ -264,7 +264,8 @@ HINSTANCE Page::s_instanceHandle = 0;
void Widget::setEnabled(bool) { }
void Widget::paint(GraphicsContext*,IntRect const&) { }
void Widget::setIsSelected(bool) { }
void Widget::invalidate() { }
void Widget::invalidateRect(const IntRect& r) { }
void ScrollView::addChild(Widget*,int,int) { }
void ScrollView::removeChild(Widget*) { }
void ScrollView::scrollPointRecursively(int x, int y) { }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment