зеркало из https://github.com/mozilla/pjs.git
Fixed textwidget refresh problem.
Added AutoErase method to nsWindow.cpp, nsTextHelper.cpp and nsListBox.cpp
This commit is contained in:
Родитель
dcd4451871
Коммит
eb3853459c
|
@ -291,4 +291,15 @@ DWORD nsListBox::WindowExStyle()
|
|||
return 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Clear window before paint
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
PRBool nsListBox::AutoErase()
|
||||
{
|
||||
return(PR_TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
// nsIWidget interface
|
||||
BASE_IWIDGET_IMPL
|
||||
|
||||
// nsIListBox part
|
||||
// nsIListBox interface
|
||||
void SetMultipleSelection(PRBool aMultipleSelections);
|
||||
void AddItemAt(nsString &aItem, PRInt32 aPosition);
|
||||
PRInt32 FindItem(nsString &aItem, PRInt32 aStartPos);
|
||||
|
@ -61,6 +61,9 @@ public:
|
|||
void SelectItem(PRInt32 aPosition);
|
||||
void Deselect() ;
|
||||
virtual void PreCreateWidget(void *aInitData);
|
||||
|
||||
// nsWindow interface
|
||||
virtual PRBool AutoErase();
|
||||
protected:
|
||||
PRBool mMultiSelect;
|
||||
virtual LPCTSTR WindowClass();
|
||||
|
|
|
@ -168,4 +168,15 @@ DWORD nsTextHelper::WindowExStyle()
|
|||
return 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Clear window before paint
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
PRBool nsTextHelper::AutoErase()
|
||||
{
|
||||
return(PR_TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ public:
|
|||
virtual PRUint32 GetCaretPosition();
|
||||
virtual LPCTSTR WindowClass();
|
||||
virtual DWORD WindowStyle();
|
||||
|
||||
virtual void PreCreateWidget(void *aInitData);
|
||||
virtual void PreCreateWidget(void *aInitData);
|
||||
virtual PRBool AutoErase();
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -1078,10 +1078,13 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
|||
result = OnKey(NS_KEY_DOWN, wParam);
|
||||
break;
|
||||
|
||||
// say we've dealt with erase background
|
||||
case WM_ERASEBKGND:
|
||||
*aRetValue = 1;
|
||||
result = PR_TRUE;
|
||||
// say we've dealt with erase background if widget does
|
||||
// not need auto-erasing
|
||||
case WM_ERASEBKGND:
|
||||
if (! AutoErase()) {
|
||||
*aRetValue = 1;
|
||||
result = PR_TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
|
@ -1709,5 +1712,10 @@ void nsWindow::AddEventListener(nsIEventListener * aListener)
|
|||
mEventListener = aListener;
|
||||
}
|
||||
|
||||
PRBool nsWindow::AutoErase()
|
||||
{
|
||||
return(PR_FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ public:
|
|||
WNDPROC GetPrevWindowProc() { return mPrevWndProc; }
|
||||
|
||||
virtual PRBool DispatchMouseEvent(PRUint32 aEventType);
|
||||
virtual PRBool AutoErase();
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ char * gFailedMsg = NULL;
|
|||
#define WIDGET_DLL "raptorwidget.dll"
|
||||
#define GFXWIN_DLL "raptorgfxwin.dll"
|
||||
|
||||
#define DEBUG_MOUSE 1
|
||||
#define DEBUG_MOUSE 0
|
||||
|
||||
#define NUM_COMBOBOX_ITEMS 8
|
||||
#define kSetCaret "Set Caret"
|
||||
|
|
Загрузка…
Ссылка в новой задаче