This commit is contained in:
spider%netscape.com 1998-10-28 21:21:50 +00:00
Родитель 94fe9f900b
Коммит ae62ddcd67
8 изменённых файлов: 27 добавлений и 15 удалений

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

@ -334,13 +334,15 @@ nsEventStatus nsCalDayViewCanvas :: PaintForeground(nsIRenderingContext& aRender
* we need to generalize this.
*/
psBuf = pEvent->toStringFmt(usFmt).toCString("");
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),rect.x+1,rect.y,0);
nsString string = psBuf;
aRenderingContext.DrawString(string,rect.x+1,rect.y,0);
delete psBuf;
if (rect.height > (2 * fm_height))
{
psBuf = pEvent->getSummary().toCString("");
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),rect.x+1,rect.y+fm_height,0);
string = psBuf;
aRenderingContext.DrawString(string,rect.x+1,rect.y+fm_height,0);
delete psBuf;
}
}
@ -391,13 +393,15 @@ nsEventStatus nsCalDayViewCanvas :: PaintForeground(nsIRenderingContext& aRender
* we need to generalize this.
*/
psBuf = pEvent->toStringFmt(usFmt).toCString("");
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),rect.x+1,rect.y,0);
nsString string = psBuf;
aRenderingContext.DrawString(string,rect.x+1,rect.y,0);
delete psBuf;
if (rect.height > (2 * fm_height))
{
psBuf = pEvent->getSummary().toCString("");
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),rect.x+1,rect.y+fm_height,0);
string = psBuf;
aRenderingContext.DrawString(string,rect.x+1,rect.y+fm_height,0);
delete psBuf;
}
}

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

@ -257,14 +257,16 @@ nsEventStatus nsCalMonthViewCanvas :: PaintForeground(nsIRenderingContext& aRend
psBuf = pEvent->toStringFmt(usFmt).toCString("");
aRenderingContext.SetColor(NS_RGB(255,255,255));
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),bounds.x+1,bounds.y,0);
nsString string = psBuf;
aRenderingContext.DrawString(string,bounds.x+1,bounds.y,0);
delete psBuf;
if (bounds.height > (2 * fm_height))
{
psBuf = pEvent->getSummary().toCString("");
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),bounds.x+1,bounds.y+fm_height,0);
string = psBuf;
aRenderingContext.DrawString(string,bounds.x+1,bounds.y+fm_height,0);
delete psBuf;
}
}
@ -443,7 +445,8 @@ nsEventStatus nsCalMonthViewCanvas :: PaintCellBackground( PRUint32& aCellRow, P
aRenderingContext.SetColor(GetForegroundColor());
aRenderingContext.DrawString(strDate,nsCRT::strlen(strDate),x,y,0);
nsString string = strDate;
aRenderingContext.DrawString(string,x,y,0);
}

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

@ -218,7 +218,9 @@ nsresult nsCalTimebarScale :: DrawTime(nsIRenderingContext& aContext,
x = aRect.x + (INSET << 1);
y = aRect.y + (INSET << 1);
aContext.DrawString(text,nsCRT::strlen(text),x,y,0);
nsString string = text;
aContext.DrawString(string,x,y,0);
return (NS_OK);
}

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

@ -127,7 +127,7 @@ nsEventStatus nsCalTimebarTimeHeading :: PaintForeground(nsIRenderingContext& aR
y = ((rect.height - height)>>1)+rect.y;
aRenderingContext.SetColor(GetForegroundColor());
aRenderingContext.DrawString(*string,nsCRT::strlen(*string),x,y,0);
aRenderingContext.DrawString(*string,x,y,0);
aRenderingContext.PopState();

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

@ -99,7 +99,7 @@ nsEventStatus nsCalTimebarUserHeading :: PaintForeground(nsIRenderingContext& aR
y = ((rect.height - height)>>1)+rect.y;
aRenderingContext.SetColor(GetForegroundColor());
aRenderingContext.DrawString(mUserName,mUserName.Length(),x,y,0);
aRenderingContext.DrawString(mUserName,x,y,0);
return nsEventStatus_eConsumeNoDefault;
}

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

@ -941,7 +941,10 @@ nsresult nsXPFCCanvas :: SetBounds(const nsRect &aBounds)
if (mView != nsnull)
{
gXPFCToolkit->GetViewManager()->MoveViewTo(mView, mBounds.x, mBounds.y);
nsIView *parent;
mView->GetParent(parent);
if (parent) gXPFCToolkit->GetViewManager()->MoveViewTo(mView, mBounds.x, mBounds.y);
gXPFCToolkit->GetViewManager()->ResizeView(mView, mBounds.width, mBounds.height);
nsIWidget * widget = nsnull;
@ -1442,12 +1445,12 @@ nsEventStatus nsXPFCCanvas :: HandleEvent(nsGUIEvent *aEvent)
rect.width = ((nsPaintEvent *)aEvent)->rect->width;
rect.height = ((nsPaintEvent *)aEvent)->rect->height;
ds = ctx->CreateDrawingSurface(&rect);
ds = ctx->CreateDrawingSurface(&rect,nsnull);
ctx->SelectOffScreenDrawingSurface(ds);
es = OnPaint((*((nsPaintEvent*)aEvent)->renderingContext),(*((nsPaintEvent*)aEvent)->rect));
ctx->CopyOffScreenBits(rect);
ctx->CopyOffScreenBits(ds, rect.x, rect.y, rect,nsnull);
ctx->DestroyDrawingSurface(ds);
return es;

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

@ -310,7 +310,7 @@ nsEventStatus nsXPButton :: PaintForeground(nsIRenderingContext& aRenderingConte
}
aRenderingContext.DrawString(string,string.Length(),x,y,0);
aRenderingContext.DrawString(string,x,y,0);
return nsEventStatus_eConsumeNoDefault;
}

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

@ -291,7 +291,7 @@ nsEventStatus nsXPItem :: PaintForeground(nsIRenderingContext& aRenderingContext
}
aRenderingContext.DrawString(string,string.Length(),x,y,0);
aRenderingContext.DrawString(string,x,y,0);
return nsEventStatus_eConsumeNoDefault;
}