Implemented SetTitle using nsString::ToCString. Will need to revisit when UNICODE window titles are supported.

This commit is contained in:
beard%netscape.com 1998-12-07 03:08:07 +00:00
Родитель 6178db9009
Коммит c77f1c7ae7
2 изменённых файлов: 17 добавлений и 0 удалений

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

@ -232,6 +232,21 @@ NS_IMETHODIMP nsMacWindow::Resize(PRUint32 aWidth, PRUint32 aHeight, PRBool aRep
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Set this window's title
//
//-------------------------------------------------------------------------
NS_IMETHODIMP nsMacWindow::SetTitle(const nsString& aTitle)
{
Str255 title;
title[0] = aTitle.Length();
aTitle.ToCString((char*)title + 1, sizeof(title) - 1);
::SetWTitle(mWindowPtr, title);
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Handle OS events

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

@ -77,6 +77,8 @@ public:
NS_IMETHOD Move(PRUint32 aX, PRUint32 aY);
NS_IMETHOD Resize(PRUint32 aWidth,PRUint32 aHeight, PRBool aRepaint);
NS_IMETHOD SetTitle(const nsString& aTitle);
virtual PRBool HandleOSEvent(
EventRecord& aOSEvent);