Added Update() member function which forces a synchronous repaint of any

dirty regions of the window
This commit is contained in:
troy%netscape.com 1998-10-27 00:16:59 +00:00
Родитель ea0daa7b05
Коммит d03010f3a8
7 изменённых файлов: 42 добавлений и 3 удалений

Просмотреть файл

@ -374,7 +374,7 @@ class nsIWidget : public nsISupports {
* Invalidate the widget and repaint it.
*
* @param aIsSynchronouse PR_TRUE then repaint synchronously. If PR_FALSE repaint later.
*
* @see #Update()
*/
NS_IMETHOD Invalidate(PRBool aIsSynchronous) = 0;
@ -383,11 +383,18 @@ class nsIWidget : public nsISupports {
* Invalidate a specified rect for a widget and repaints it.
*
* @param aIsSynchronouse PR_TRUE then repaint synchronously. If PR_FALSE repaint later.
*
* @see #Update()
*/
NS_IMETHOD Invalidate(const nsRect & aRect, PRBool aIsSynchronous) = 0;
/**
* Force a synchronous repaint of the window if there are dirty rects.
*
* @see Invalidate()
*/
NS_IMETHOD Update() = 0;
/**
* Adds a mouse listener to this widget

Просмотреть файл

@ -623,6 +623,16 @@ GrafPtr curport;
}
//-------------------------------------------------------------------------
//
// Force a synchronous repaint of the window
//
//-------------------------------------------------------------------------
NS_IMETHODIMP nsWindow::Update()
{
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Return some native data according to aDataType

Просмотреть файл

@ -82,6 +82,7 @@ public:
NS_IMETHOD SetFont(const nsFont &aFont);
NS_IMETHOD Invalidate(PRBool aIsSynchronous);
NS_IMETHOD Invalidate(const nsRect &aRect,PRBool aIsSynchronous);
NS_IMETHOD Update();
virtual void* GetNativeData(PRUint32 aDataType);
NS_IMETHOD SetColorMap(nsColorMap *aColorMap);
NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);

Просмотреть файл

@ -1009,6 +1009,16 @@ NS_METHOD nsWindow::Invalidate(const nsRect & aRect, PRBool aIsSynchronous)
}
//-------------------------------------------------------------------------
//
// Force a synchronous repaint of the window
//
//-------------------------------------------------------------------------
NS_IMETHODIMP nsWindow::Update()
{
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Return some native data according to aDataType

Просмотреть файл

@ -108,6 +108,7 @@ public:
NS_IMETHOD SetCursor(nsCursor aCursor);
NS_IMETHOD Invalidate(PRBool aIsSynchronous);
NS_IMETHOD Invalidate(const nsRect &aRect, PRBool aIsSynchronous);
NS_IMETHOD Update();
virtual void* GetNativeData(PRUint32 aDataType);
virtual nsIRenderingContext* GetRenderingContext();
NS_IMETHOD SetColorMap(nsColorMap *aColorMap);

Просмотреть файл

@ -1050,7 +1050,16 @@ NS_METHOD nsWindow::Invalidate(const nsRect & aRect, PRBool aIsSynchronous)
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Force a synchronous repaint of the window
//
//-------------------------------------------------------------------------
NS_IMETHODIMP nsWindow::Update()
{
VERIFY(::UpdateWindow(mWnd));
return NS_OK;
}
//-------------------------------------------------------------------------
//

Просмотреть файл

@ -104,6 +104,7 @@ public:
NS_IMETHOD SetCursor(nsCursor aCursor);
NS_IMETHOD Invalidate(PRBool aIsSynchronous);
NS_IMETHOD Invalidate(const nsRect & aRect, PRBool aIsSynchronous);
NS_IMETHOD Update();
virtual void* GetNativeData(PRUint32 aDataType);
NS_IMETHOD SetColorMap(nsColorMap *aColorMap);
NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);