/m/pub/mozilla/widget/public/nsIMenuItem.h

This commit is contained in:
saari%netscape.com 1999-01-27 16:14:48 +00:00
parent c656fedda3
commit 12a066f392
9 changed files with 44 additions and 1 deletions

View File

@ -60,6 +60,12 @@ class nsIMenuItem : public nsISupports {
*/
NS_IMETHOD GetLabel(nsString &aText) = 0;
/**
* Get the MenuItem label
*
*/
NS_IMETHOD SetLabel(nsString &aText) = 0;
/**
* Gets the MenuItem Command identifier
*

View File

@ -202,6 +202,14 @@ NS_METHOD nsMenuItem::GetLabel(nsString &aText)
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsMenu::SetLabel(nsString &aText)
{
mLabel = aText;
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsMenuItem::GetCommand(PRUint32 & aCommand)
{

View File

@ -50,6 +50,7 @@ public:
// nsIMenuBar Methods
NS_IMETHOD GetLabel(nsString &aText);
NS_IMETHOD SetLabel(nsString &aText);
NS_IMETHOD GetCommand(PRUint32 & aCommand);
NS_IMETHOD GetTarget(nsIWidget *& aTarget);
NS_IMETHOD GetNativeData(void*& aData);

View File

@ -173,7 +173,7 @@ NS_METHOD nsMenuItem::Create(nsIMenu *aParent,
}
// Create(widget, GetNativeParent(), aLabel, aCommand);
aParent->AddItem(this);
aParent->AddMenuItem(this);
return NS_OK;
}
@ -207,6 +207,13 @@ NS_METHOD nsMenuItem::GetLabel(nsString &aText)
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsMenuItem::SetLabel(nsString &aText)
{
mLabel = aText;
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsMenuItem::GetCommand(PRUint32 & aCommand)
{

View File

@ -51,6 +51,7 @@ public:
// nsIMenuBar Methods
NS_IMETHOD GetLabel(nsString &aText);
NS_IMETHOD SetLabel(nsString &aText);
NS_IMETHOD GetCommand(PRUint32 & aCommand);
NS_IMETHOD GetTarget(nsIWidget *& aTarget);
NS_IMETHOD GetNativeData(void*& aData);

View File

@ -196,6 +196,15 @@ NS_METHOD nsMenuItem::GetLabel(nsString &aText)
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsMenu::SetLabel(nsString &aText)
{
mLabel = aText;
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsMenuItem::GetCommand(PRUint32 & aCommand)
{

View File

@ -52,6 +52,7 @@ public:
// nsIMenuBar Methods
NS_IMETHOD GetLabel(nsString &aText);
NS_IMETHOD SetLabel(nsString &aText);
NS_IMETHOD GetCommand(PRUint32 & aCommand);
NS_IMETHOD GetTarget(nsIWidget *& aTarget);
NS_IMETHOD GetNativeData(void*& aData);

View File

@ -149,6 +149,15 @@ NS_METHOD nsMenuItem::GetLabel(nsString &aText)
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsMenu::SetLabel(nsString &aText)
{
mLabel = aText;
return NS_OK;
}
//-------------------------------------------------------------------------
NS_METHOD nsMenuItem::GetCommand(PRUint32 & aCommand)
{

View File

@ -47,6 +47,7 @@ public:
// nsIMenuBar Methods
NS_IMETHOD GetLabel(nsString &aText);
NS_IMETHOD SetLabel(nsString &aText);
NS_IMETHOD GetCommand(PRUint32 & aCommand);
NS_IMETHOD GetTarget(nsIWidget *& aTarget);
NS_IMETHOD GetNativeData(void*& aData);