Fixed build problem, removed scrollbar errors

This commit is contained in:
rods 1998-06-17 16:27:05 +00:00
Родитель 878cbe9517
Коммит b0e8c05ebd
2 изменённых файлов: 17 добавлений и 14 удалений

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

@ -24,7 +24,7 @@
#include "nsXtEventHandler.h"
#define DBG 1
#define DBG 0
//-------------------------------------------------------------------------
//
@ -35,10 +35,7 @@ nsScrollbar::nsScrollbar(nsISupports *aOuter, PRBool aIsVertical) : nsWindow(aOu
{
strcpy(gInstanceClassName, "nsScrollbar");
mOrientation = (aIsVertical) ? XmVERTICAL : XmHORIZONTAL;
//mScaleFactor = 1.0;
mLineIncrement = 0;
//mBackground = ::GetSysColor(COLOR_SCROLLBAR);
//mBrush = ::CreateSolidBrush(NSRGB_2_COLOREF(mBackground));
}
//-------------------------------------------------------------------------
@ -214,8 +211,10 @@ PRUint32 nsScrollbar::GetPosition()
//-------------------------------------------------------------------------
void nsScrollbar::SetThumbSize(PRUint32 aSize)
{
XtVaSetValues(mWidget, XmNpageIncrement, (int)aSize, nsnull);
XtVaSetValues(mWidget, XmNsliderSize, (int)aSize, nsnull);
if (aSize > 0) {
XtVaSetValues(mWidget, XmNpageIncrement, (int)aSize, nsnull);
XtVaSetValues(mWidget, XmNsliderSize, (int)aSize, nsnull);
}
if (DBG) printf("SetThumbSize %d\n", aSize);
}
@ -268,13 +267,16 @@ void nsScrollbar::SetParameters(PRUint32 aMaxRange, PRUint32 aThumbSize,
PRUint32 aPosition, PRUint32 aLineIncrement)
{
XtVaSetValues(mWidget, XmNincrement, aLineIncrement,
XmNmaximum, aMaxRange,
XmNminimum, 0,
XmNsliderSize, aThumbSize,
XmNpageIncrement, aThumbSize,
XmNvalue, aPosition,
nsnull);
int thumbSize = (aThumbSize > 0?aThumbSize:1);
XtVaSetValues(mWidget,
XmNincrement, (aLineIncrement > 0?aLineIncrement:1),
XmNminimum, 0,
XmNmaximum, (aMaxRange > 0?aMaxRange:10),
XmNsliderSize, thumbSize,
XmNpageIncrement, thumbSize,
XmNvalue, aPosition,
nsnull);
mLineIncrement = aLineIncrement;
if (DBG) printf("SetParameters %d %d %d %d \n", aMaxRange, aThumbSize,

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

@ -389,6 +389,7 @@ void nsXtWidget_Expose_Callback(Widget w, XtPointer p, XtPointer call_data)
nsXtWidget_InitNSEvent(event, p, pevent, NS_PAINT);
pevent.rect = (nsRect *)▭
#if 0
printf("Count %d\n", event->xexpose.count);
if (event->xexpose.count != 0)
return ;
@ -426,7 +427,7 @@ printf("Before %d %d %d %d\n", rect.x, rect.y, rect.width, rect.height);
}
printf("After %d %d %d %d\n", rect.x, rect.y, rect.width, rect.height);
}
#endif
widgetWindow->OnPaint(pevent);
if (DBG) fprintf(stderr, "Out nsXtWidget_ExposureMask_EventHandler\n");