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

git-svn-id: svn://10.0.0.236/trunk@15897 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
beard%netscape.com 1998-12-07 03:08:07 +00:00
parent 21ec4ce15e
commit 03f544c401
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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);