Added a class MenuPrivate to handle access to private BMenu methods.
BMenuItem and BWindow are no longer friends of BMenu, but use this class instead. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24909 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2620,3 +2620,121 @@ get_menu_info(menu_info *info)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
// MenuPrivate
|
||||
namespace BPrivate {
|
||||
|
||||
MenuPrivate::MenuPrivate(BMenu *menu)
|
||||
:
|
||||
fMenu(menu)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
menu_layout
|
||||
MenuPrivate::Layout() const
|
||||
{
|
||||
return fMenu->Layout();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::ItemMarked(BMenuItem *item)
|
||||
{
|
||||
fMenu->_ItemMarked(item);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::CacheFontInfo()
|
||||
{
|
||||
fMenu->_CacheFontInfo();
|
||||
}
|
||||
|
||||
|
||||
float
|
||||
MenuPrivate::FontHeight() const
|
||||
{
|
||||
return fMenu->fFontHeight;
|
||||
}
|
||||
|
||||
|
||||
float
|
||||
MenuPrivate::Ascent() const
|
||||
{
|
||||
return fMenu->fAscent;
|
||||
}
|
||||
|
||||
|
||||
BRect
|
||||
MenuPrivate::Padding() const
|
||||
{
|
||||
return fMenu->fPad;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::GetItemMargins(float *left, float *top,
|
||||
float *right, float *bottom) const
|
||||
{
|
||||
fMenu->GetItemMargins(left, top, right, bottom);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
MenuPrivate::IsAltCommandKey() const
|
||||
{
|
||||
return fMenu->sAltAsCommandKey;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
MenuPrivate::State(BMenuItem **item) const
|
||||
{
|
||||
return fMenu->State(item);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::Install(BWindow *window)
|
||||
{
|
||||
fMenu->_Install(window);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::Uninstall()
|
||||
{
|
||||
fMenu->_Uninstall();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::SetSuper(BMenu *menu)
|
||||
{
|
||||
fMenu->fSuper = menu;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::SetSuperItem(BMenuItem *item)
|
||||
{
|
||||
fMenu->fSuperitem = item;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::InvokeItem(BMenuItem *item, bool now)
|
||||
{
|
||||
fMenu->InvokeItem(item, now);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MenuPrivate::QuitTracking(bool thisMenuOnly)
|
||||
{
|
||||
fMenu->QuitTracking(thisMenuOnly);
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user