LibreOffice Module vcl (master)  1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | Friends | List of all members
Menu Class Referenceabstract

#include <menu.hxx>

Inheritance diagram for Menu:
[legend]
Collaboration diagram for Menu:
[legend]

Public Member Functions

SAL_DLLPRIVATE void ImplKillLayoutData () const
 
SAL_DLLPRIVATE vcl::WindowImplGetWindow () const
 
virtual ~Menu () override
 
virtual void dispose () override
 
void Activate ()
 
void Deactivate ()
 
virtual void Select ()
 
void InsertItem (sal_uInt16 nItemId, const OUString &rStr, MenuItemBits nItemBits=MenuItemBits::NONE, const OString &rIdent=OString(), sal_uInt16 nPos=MENU_APPEND)
 
void InsertItem (sal_uInt16 nItemId, const Image &rImage, MenuItemBits nItemBits=MenuItemBits::NONE, const OString &rIdent=OString(), sal_uInt16 nPos=MENU_APPEND)
 
void InsertItem (sal_uInt16 nItemId, const OUString &rString, const Image &rImage, MenuItemBits nItemBits=MenuItemBits::NONE, const OString &rIdent=OString(), sal_uInt16 nPos=MENU_APPEND)
 
void InsertItem (const OUString &rCommand, const css::uno::Reference< css::frame::XFrame > &rFrame)
 
void InsertSeparator (const OString &rIdent=OString(), sal_uInt16 nPos=MENU_APPEND)
 
void RemoveItem (sal_uInt16 nPos)
 
void Clear ()
 
void CreateAutoMnemonics ()
 
void SetMenuFlags (MenuFlags nFlags)
 
MenuFlags GetMenuFlags () const
 
sal_uInt16 GetItemCount () const
 
sal_uInt16 GetItemId (sal_uInt16 nPos) const
 
sal_uInt16 GetItemId (const OString &rIdent) const
 
sal_uInt16 GetItemPos (sal_uInt16 nItemId) const
 
OString GetItemIdent (sal_uInt16 nItemId) const
 
MenuItemType GetItemType (sal_uInt16 nPos) const
 
sal_uInt16 GetCurItemId () const
 
OString const & GetCurItemIdent () const
 
void SetItemBits (sal_uInt16 nItemId, MenuItemBits nBits)
 
MenuItemBits GetItemBits (sal_uInt16 nItemId) const
 
void SetUserValue (sal_uInt16 nItemId, void *nUserValue, MenuUserDataReleaseFunction aFunc=nullptr)
 
voidGetUserValue (sal_uInt16 nItemId) const
 
void SetPopupMenu (sal_uInt16 nItemId, PopupMenu *pMenu)
 
PopupMenuGetPopupMenu (sal_uInt16 nItemId) const
 
void SetAccelKey (sal_uInt16 nItemId, const vcl::KeyCode &rKeyCode)
 
vcl::KeyCode GetAccelKey (sal_uInt16 nItemId) const
 
void CheckItem (sal_uInt16 nItemId, bool bCheck=true)
 
void CheckItem (const OString &rIdent, bool bCheck=true)
 
bool IsItemChecked (sal_uInt16 nItemId) const
 
virtual void SelectItem (sal_uInt16 nItemId)=0
 
void EnableItem (sal_uInt16 nItemId, bool bEnable=true)
 
void EnableItem (const OString &rIdent, bool bEnable=true)
 
bool IsItemEnabled (sal_uInt16 nItemId) const
 
void ShowItem (sal_uInt16 nItemId, bool bVisible=true)
 
void HideItem (sal_uInt16 nItemId)
 
bool IsItemPosVisible (sal_uInt16 nItemPos) const
 
bool IsMenuVisible () const
 
virtual bool IsMenuBar () const =0
 
void RemoveDisabledEntries (bool bCheckPopups=true, bool bRemoveEmptyPopups=false)
 
void UpdateNativeMenu ()
 
void SetItemText (sal_uInt16 nItemId, const OUString &rStr)
 
OUString GetItemText (sal_uInt16 nItemId) const
 
void SetItemImage (sal_uInt16 nItemId, const Image &rImage)
 
Image GetItemImage (sal_uInt16 nItemId) const
 
void SetItemCommand (sal_uInt16 nItemId, const OUString &rCommand)
 
OUString GetItemCommand (sal_uInt16 nItemId) const
 
void SetHelpText (sal_uInt16 nItemId, const OUString &rString)
 
OUString GetHelpText (sal_uInt16 nItemId) const
 
void SetTipHelpText (sal_uInt16 nItemId, const OUString &rString)
 
OUString GetTipHelpText (sal_uInt16 nItemId) const
 
void SetHelpCommand (sal_uInt16 nItemId, const OUString &rString)
 
OUString GetHelpCommand (sal_uInt16 nItemId) const
 
void SetHelpId (sal_uInt16 nItemId, const OString &rHelpId)
 
OString GetHelpId (sal_uInt16 nItemId) const
 
void SetActivateHdl (const Link< Menu *, bool > &rLink)
 
void SetDeactivateHdl (const Link< Menu *, bool > &rLink)
 
void SetSelectHdl (const Link< Menu *, bool > &rLink)
 
sal_uInt16 GetTitleHeight () const
 
void AddEventListener (const Link< VclMenuEvent &, void > &rEventListener)
 
void RemoveEventListener (const Link< VclMenuEvent &, void > &rEventListener)
 
Menuoperator= (const Menu &rMenu)
 
MenuItemListGetItemList () const
 
void GetSystemMenuData (SystemMenuData *pData) const
 
tools::Rectangle GetCharacterBounds (sal_uInt16 nItemId, long nIndex) const
 
long GetIndexForPoint (const Point &rPoint, sal_uInt16 &rItemID) const
 
tools::Rectangle GetBoundingRectangle (sal_uInt16 nItemPos) const
 
css::uno::Reference< css::accessibility::XAccessible > GetAccessible ()
 
void SetAccessible (const css::uno::Reference< css::accessibility::XAccessible > &rxAccessible)
 
KeyEvent GetActivationKey (sal_uInt16 nItemId) const
 
vcl::WindowGetWindow () const
 
OUString GetAccessibleName (sal_uInt16 nItemId) const
 
bool IsHighlighted (sal_uInt16 nItemPos) const
 
void HighlightItem (sal_uInt16 nItemPos)
 
void DeHighlight ()
 
bool HandleMenuCommandEvent (Menu *pMenu, sal_uInt16 nEventId) const
 
bool HandleMenuActivateEvent (Menu *pMenu) const
 
bool HandleMenuDeActivateEvent (Menu *pMenu) const
 
- Public Member Functions inherited from VclReferenceBase
void acquire () const
 
void release () const
 
sal_Int32 getRefCount () const
 
void disposeOnce ()
 
bool isDisposed () const
 

Protected Member Functions

SAL_DLLPRIVATE MenuImplGetStartMenu ()
 
SAL_DLLPRIVATE MenuImplFindSelectMenu ()
 
SAL_DLLPRIVATE MenuImplFindMenu (sal_uInt16 nId)
 
SAL_DLLPRIVATE Size ImplCalcSize (vcl::Window *pWin)
 
SAL_DLLPRIVATE bool ImplIsVisible (sal_uInt16 nPos) const
 
SAL_DLLPRIVATE bool ImplCurrentlyHiddenOnGUI (sal_uInt16 nPos) const
 
SAL_DLLPRIVATE bool ImplIsSelectable (sal_uInt16 nPos) const
 
SAL_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount () const
 
SAL_DLLPRIVATE sal_uInt16 ImplGetFirstVisible () const
 
SAL_DLLPRIVATE sal_uInt16 ImplGetPrevVisible (sal_uInt16 nPos) const
 
SAL_DLLPRIVATE sal_uInt16 ImplGetNextVisible (sal_uInt16 nPos) const
 
SAL_DLLPRIVATE void ImplPaint (vcl::RenderContext &rRenderContext, Size const &rSize, sal_uInt16 nBorder, long nOffY=0, MenuItemData const *pThisDataOnly=nullptr, bool bHighlighted=false, bool bLayout=false, bool bRollover=false) const
 
SAL_DLLPRIVATE void ImplPaintMenuTitle (vcl::RenderContext &, const tools::Rectangle &rRect) const
 
SAL_DLLPRIVATE void ImplSelect ()
 
SAL_DLLPRIVATE void ImplCallHighlight (sal_uInt16 nHighlightItem)
 
SAL_DLLPRIVATE void ImplCallEventListeners (VclEventId nEvent, sal_uInt16 nPos)
 
 DECL_DLLPRIVATE_LINK (ImplCallSelect, void *, void)
 
SAL_DLLPRIVATE void ImplFillLayoutData () const
 
SAL_DLLPRIVATE SalMenuImplGetSalMenu ()
 
SAL_DLLPRIVATE void ImplClearSalMenu ()
 
SAL_DLLPRIVATE OUString ImplGetHelpText (sal_uInt16 nItemId) const
 
SAL_DLLPRIVATE Size ImplGetNativeCheckAndRadioSize (vcl::RenderContext const &rRenderContext, long &rCheckHeight, long &rRadioHeight) const
 
SAL_DLLPRIVATE void ImplAddDel (ImplMenuDelData &rDel)
 
SAL_DLLPRIVATE void ImplRemoveDel (ImplMenuDelData &rDel)
 
SAL_DLLPRIVATE MenuItemDataNbcInsertItem (sal_uInt16 nId, MenuItemBits nBits, const OUString &rStr, Menu *pMenu, size_t nPos, const OString &rIdent)
 
virtual void ClosePopup (Menu *pMenu)=0
 Close the 'pStartedFrom' menu window. More...
 
virtual void MenuBarKeyInput (const KeyEvent &rEvent)
 Forward the KeyInput call to the MenuBar. More...
 
 Menu ()
 The Menu constructor is protected. More...
 
- Protected Member Functions inherited from VclReferenceBase
 VclReferenceBase ()
 
virtual ~VclReferenceBase ()
 

Static Protected Member Functions

static SAL_DLLPRIVATE bool ImplGetNativeSubmenuArrowSize (vcl::RenderContext const &rRenderContext, Size &rArrowSize, long &rArrowSpacing)
 

Private Attributes

ImplMenuDelDatampFirstDel
 
std::unique_ptr< MenuItemListpItemList
 
VclPtr< MenupStartedFrom
 
VclPtr< vcl::WindowpWindow
 
Link< Menu *, bool > aActivateHdl
 
Link< Menu *, bool > aDeactivateHdl
 
Link< Menu *, bool > aSelectHdl
 
std::list< Link< VclMenuEvent &, void > > maEventListeners
 
OUString aTitleText
 
sal_uInt16 nTitleHeight
 
ImplSVEventnEventId
 
sal_uInt16 mnHighlightedItemPos
 
MenuFlags nMenuFlags
 
sal_uInt16 nSelectedId
 
OString sSelectedIdent
 
sal_uInt16 nImgOrChkPos
 
sal_uInt16 nTextPos
 
bool bCanceled: 1
 Terminated during a callback. More...
 
bool bInCallback: 1
 In Activate/Deactivate. More...
 
bool bKilled: 1
 Killed. More...
 
css::uno::Reference< css::accessibility::XAccessible > mxAccessible
 
std::unique_ptr< vcl::MenuLayoutDatampLayoutData
 
std::unique_ptr< SalMenumpSalMenu
 

Friends

class MenuBar
 
class MenuBarWindow
 
class MenuButton
 
class MenuFloatingWindow
 
class PopupMenu
 
class SystemWindow
 
struct ImplMenuDelData
 

Detailed Description

Definition at line 121 of file menu.hxx.

Constructor & Destructor Documentation

Menu::Menu ( )
protected

The Menu constructor is protected.

The callers are supposed to instantiate either PopupMenu or MenuBar, but not a Menu directly.

Definition at line 157 of file menu.cxx.

References NONE.

Menu::~Menu ( )
overridevirtual

Definition at line 175 of file menu.cxx.

References VclReferenceBase::disposeOnce().

Member Function Documentation

void Menu::Activate ( )
void Menu::AddEventListener ( const Link< VclMenuEvent &, void > &  rEventListener)

Definition at line 395 of file menu.cxx.

References maEventListeners.

Referenced by ToolBox::ExecuteCustomMenu().

void Menu::CheckItem ( sal_uInt16  nItemId,
bool  bCheck = true 
)
void Menu::CheckItem ( const OString &  rIdent,
bool  bCheck = true 
)

Definition at line 887 of file menu.cxx.

References CheckItem(), and GetItemId().

void Menu::Clear ( )
virtual void Menu::ClosePopup ( Menu pMenu)
protectedpure virtual

Close the 'pStartedFrom' menu window.

Implemented in PopupMenu, and MenuBar.

void Menu::CreateAutoMnemonics ( )
void Menu::Deactivate ( )
Menu::DECL_DLLPRIVATE_LINK ( ImplCallSelect  ,
void ,
void   
)
protected
void Menu::DeHighlight ( )
inline

Definition at line 385 of file menu.hxx.

void Menu::dispose ( void  )
overridevirtual
void Menu::EnableItem ( sal_uInt16  nItemId,
bool  bEnable = true 
)
void Menu::EnableItem ( const OString &  rIdent,
bool  bEnable = true 
)
inline

Definition at line 286 of file menu.hxx.

KeyCode Menu::GetAccelKey ( sal_uInt16  nItemId) const

Definition at line 787 of file menu.cxx.

References MenuItemData::aAccelKey, and pItemList.

css::uno::Reference< css::accessibility::XAccessible > Menu::GetAccessible ( )
OUString Menu::GetAccessibleName ( sal_uInt16  nItemId) const

Definition at line 2291 of file menu.cxx.

References MenuItemData::aAccessibleName, and pItemList.

KeyEvent Menu::GetActivationKey ( sal_uInt16  nItemId) const

Definition at line 797 of file menu.cxx.

References MenuItemData::aText, KEY_0, KEY_A, KEY_MOD2, nPos, and pItemList.

tools::Rectangle Menu::GetBoundingRectangle ( sal_uInt16  nItemPos) const

Definition at line 2276 of file menu.cxx.

References ImplFillLayoutData(), and mpLayoutData.

tools::Rectangle Menu::GetCharacterBounds ( sal_uInt16  nItemId,
long  nIndex 
) const

Definition at line 2233 of file menu.cxx.

References i, ImplFillLayoutData(), and mpLayoutData.

sal_uInt16 Menu::GetCurItemId ( ) const
inline

Definition at line 265 of file menu.hxx.

Referenced by MenuButton::ExecuteMenu(), ImplCallHighlight(), and Select().

OString const& Menu::GetCurItemIdent ( ) const
inline

Definition at line 266 of file menu.hxx.

Referenced by MenuButton::ExecuteMenu(), and SalInstanceMenu::popup_at_rect().

OUString Menu::GetHelpCommand ( sal_uInt16  nItemId) const

Definition at line 1065 of file menu.cxx.

References MenuItemData::aHelpCommandStr, and pItemList.

OString Menu::GetHelpId ( sal_uInt16  nItemId) const
OUString Menu::GetHelpText ( sal_uInt16  nItemId) const

Definition at line 1103 of file menu.cxx.

References ImplGetHelpText().

Referenced by MenuWindow::ImplHandleHelpEvent().

long Menu::GetIndexForPoint ( const Point rPoint,
sal_uInt16 &  rItemID 
) const

Definition at line 2252 of file menu.cxx.

References i, ImplFillLayoutData(), and mpLayoutData.

MenuItemBits Menu::GetItemBits ( sal_uInt16  nItemId) const

Definition at line 695 of file menu.cxx.

References MenuItemData::nBits, NONE, and pItemList.

OUString Menu::GetItemCommand ( sal_uInt16  nItemId) const

Definition at line 1047 of file menu.cxx.

References MenuItemData::aCommandStr, and pItemList.

Referenced by MenuWindow::ImplHandleHelpEvent().

sal_uInt16 Menu::GetItemCount ( ) const
sal_uInt16 Menu::GetItemId ( sal_uInt16  nPos) const
sal_uInt16 Menu::GetItemId ( const OString &  rIdent) const

Definition at line 642 of file menu.cxx.

References MENU_ITEM_NOTFOUND, MenuItemData::nId, pItemList, and MenuItemData::sIdent.

OString Menu::GetItemIdent ( sal_uInt16  nItemId) const
Image Menu::GetItemImage ( sal_uInt16  nItemId) const

Definition at line 1028 of file menu.cxx.

References MenuItemData::aImage, and pItemList.

MenuItemList* Menu::GetItemList ( ) const
inline
sal_uInt16 Menu::GetItemPos ( sal_uInt16  nItemId) const
OUString Menu::GetItemText ( sal_uInt16  nItemId) const

Definition at line 1001 of file menu.cxx.

References MenuItemData::aText, nPos, and pItemList.

Referenced by SalInstanceMenuButton::get_item_label().

MenuItemType Menu::GetItemType ( sal_uInt16  nPos) const

Definition at line 664 of file menu.cxx.

References DONTKNOW, MenuItemData::eType, and pItemList.

Referenced by CollectMenuItemIds(), ImplCopyItem(), and RemoveDisabledEntries().

MenuFlags Menu::GetMenuFlags ( ) const
inline

Definition at line 257 of file menu.hxx.

PopupMenu * Menu::GetPopupMenu ( sal_uInt16  nItemId) const
void Menu::GetSystemMenuData ( SystemMenuData pData) const

Definition at line 2306 of file menu.cxx.

References SalMenu::GetSystemMenuData(), and ImplGetSalMenu().

OUString Menu::GetTipHelpText ( sal_uInt16  nItemId) const

Definition at line 1116 of file menu.cxx.

References MenuItemData::aTipHelpText, and pItemList.

Referenced by MenuWindow::ImplHandleHelpEvent().

sal_uInt16 Menu::GetTitleHeight ( ) const
inline

Definition at line 339 of file menu.hxx.

Referenced by MenuFloatingWindow::ImplGetStartY().

void * Menu::GetUserValue ( sal_uInt16  nItemId) const

Definition at line 716 of file menu.cxx.

References MenuItemData::nUserValue, and pItemList.

vcl::Window* Menu::GetWindow ( ) const
inline
bool Menu::HandleMenuActivateEvent ( Menu pMenu) const

Definition at line 2560 of file menu.cxx.

References Activate(), bInCallback, ImplMenuDelData::isDeleted(), and pStartedFrom.

Referenced by ImplHandleMenuEvent().

bool Menu::HandleMenuCommandEvent ( Menu pMenu,
sal_uInt16  nEventId 
) const

Definition at line 2616 of file menu.cxx.

References GetItemIdent(), ImplFindMenu(), ImplSelect(), nSelectedId, pStartedFrom, and sSelectedIdent.

Referenced by ImplHandleMenuEvent().

bool Menu::HandleMenuDeActivateEvent ( Menu pMenu) const

Definition at line 2576 of file menu.cxx.

References bInCallback, Deactivate(), ImplMenuDelData::isDeleted(), and pStartedFrom.

Referenced by ImplHandleMenuEvent().

void Menu::HideItem ( sal_uInt16  nItemId)
inline

Definition at line 293 of file menu.hxx.

void Menu::HighlightItem ( sal_uInt16  nItemPos)
void Menu::ImplAddDel ( ImplMenuDelData rDel)
protected

Definition at line 1378 of file menu.cxx.

References mpFirstDel, ImplMenuDelData::mpMenu, ImplMenuDelData::mpNext, and SAL_WARN_IF.

Size Menu::ImplCalcSize ( vcl::Window pWin)
protected

Definition at line 1408 of file menu.cxx.

References MenuItemData::aAccelKey, Size::AdjustHeight(), Size::AdjustWidth(), MenuItemData::aImage, aName, MenuItemData::aSz, MenuItemData::aText, aTitleText, ENABLED, Entire, MenuItemData::eType, EXTRAITEMHEIGHT, FONT, VclPtr< reference_type >::get(), vcl::KeyCode::GetCode(), OutputDevice::GetCtrlTextWidth(), OutputDevice::GetFont(), tools::Rectangle::GetHeight(), vcl::KeyCode::GetName(), OutputDevice::GetNativeControlRegion(), Application::GetScreenPosSizePixel(), OutputDevice::GetSettings(), tools::Rectangle::GetSize(), Image::GetSizePixel(), AllSettings::GetStyleSettings(), OutputDevice::GetTextBoundRect(), MenuItemData::GetTextGlyphs(), OutputDevice::GetTextHeight(), OutputDevice::GetTextWidth(), StyleSettings::GetUseImagesInMenus(), tools::Rectangle::GetWidth(), gfxExtra, MenuItemData::HasCheck(), Size::Height(), i, IMAGE, ImplAccelDisabled(), ImplGetNativeCheckAndRadioSize(), ImplGetSVData(), vcl::Window::ImplGetWindowImpl(), ImplIsVisible(), IsMenuBar(), OutputDevice::IsNativeControlSupported(), SalFrame::maGeometry, Menubar, WindowImpl::mpFrame, SalFrameGeometry::nDisplayScreenNumber, nImgOrChkPos, nTextPos, nTitleHeight, pItemList, OutputDevice::Pop(), MenuItemData::pSubMenu, OutputDevice::Push(), pWindow, SEPARATOR, OutputDevice::SetFont(), Size::setHeight(), vcl::Font::SetWeight(), Size::setWidth(), SPACE_AROUND_TITLE, STRING, STRINGIMAGE, WEIGHT_BOLD, and Size::Width().

Referenced by MenuBar::ImplCreate(), PopupMenu::ImplExecute(), InsertItem(), MenuBarWindow::LayoutChanged(), RemoveItem(), and SetItemText().

void Menu::ImplCallEventListeners ( VclEventId  nEvent,
sal_uInt16  nPos 
)
protected
void Menu::ImplCallHighlight ( sal_uInt16  nHighlightItem)
protected
void Menu::ImplClearSalMenu ( )
protected

Definition at line 2301 of file menu.cxx.

References mpSalMenu.

Referenced by dispose().

bool Menu::ImplCurrentlyHiddenOnGUI ( sal_uInt16  nPos) const
protected

Definition at line 1175 of file menu.cxx.

References MenuItemData::bHiddenOnGUI, and pItemList.

Referenced by MenuBarWindow::HandleKeyEvent().

void Menu::ImplFillLayoutData ( ) const
protected
Menu * Menu::ImplFindMenu ( sal_uInt16  nId)
protected
Menu * Menu::ImplFindSelectMenu ( )
protected
sal_uInt16 Menu::ImplGetFirstVisible ( ) const
protected

Definition at line 602 of file menu.cxx.

References ImplIsVisible(), ITEMPOS_INVALID, and pItemList.

Referenced by PopupMenu::ImplExecute().

OUString Menu::ImplGetHelpText ( sal_uInt16  nItemId) const
protected
Size Menu::ImplGetNativeCheckAndRadioSize ( vcl::RenderContext const &  rRenderContext,
long &  rCheckHeight,
long &  rRadioHeight 
) const
protected
bool Menu::ImplGetNativeSubmenuArrowSize ( vcl::RenderContext const &  rRenderContext,
Size rArrowSize,
long &  rArrowSpacing 
)
staticprotected
sal_uInt16 Menu::ImplGetNextVisible ( sal_uInt16  nPos) const
protected

Definition at line 622 of file menu.cxx.

References ImplIsVisible(), ITEMPOS_INVALID, and pItemList.

Referenced by MenuFloatingWindow::ImplScroll().

sal_uInt16 Menu::ImplGetPrevVisible ( sal_uInt16  nPos) const
protected

Definition at line 612 of file menu.cxx.

References ImplIsVisible(), and ITEMPOS_INVALID.

Referenced by MenuFloatingWindow::ImplScroll().

SAL_DLLPRIVATE SalMenu* Menu::ImplGetSalMenu ( )
inlineprotected
Menu * Menu::ImplGetStartMenu ( )
protected
sal_uInt16 Menu::ImplGetVisibleItemCount ( ) const
protected

Definition at line 591 of file menu.cxx.

References ImplIsVisible(), and pItemList.

Referenced by PopupMenu::ImplExecute().

SAL_DLLPRIVATE vcl::Window* Menu::ImplGetWindow ( ) const
inline
bool Menu::ImplIsSelectable ( sal_uInt16  nPos) const
protected
bool Menu::ImplIsVisible ( sal_uInt16  nPos) const
protected
void Menu::ImplKillLayoutData ( ) const
void Menu::ImplPaint ( vcl::RenderContext rRenderContext,
Size const &  rSize,
sal_uInt16  nBorder,
long  nOffY = 0,
MenuItemData const *  pThisDataOnly = nullptr,
bool  bHighlighted = false,
bool  bLayout = false,
bool  bRollover = false 
) const
protected

Definition at line 1713 of file menu.cxx.

References MenuItemData::aAccelKey, tools::Rectangle::AdjustBottom(), tools::Rectangle::AdjustLeft(), tools::Rectangle::AdjustRight(), tools::Rectangle::AdjustTop(), Point::AdjustX(), Point::AdjustY(), MenuItemData::aImage, MenuItemData::aSz, MenuItemData::aText, MenuItemData::bChecked, MenuItemData::bEnabled, MenuItemData::bHiddenOnGUI, MenuItemData::bIsTemporary, CHECKMARK, Disable, OutputDevice::DrawCtrlText(), DecorationView::DrawFrame(), OutputDevice::DrawImage(), OutputDevice::DrawLine(), OutputDevice::DrawNativeControl(), DecorationView::DrawSymbol(), ENABLED, Entire, psp::eSymbol, MenuItemData::eType, VclPtr< reference_type >::get(), vcl::KeyCode::GetCode(), tools::Rectangle::GetHeight(), StyleSettings::GetLightColor(), StyleSettings::GetMenuBarColor(), StyleSettings::GetMenuBarHighlightTextColor(), StyleSettings::GetMenuBarRolloverTextColor(), StyleSettings::GetMenuBarTextColor(), StyleSettings::GetMenuColor(), StyleSettings::GetMenuHighlightTextColor(), StyleSettings::GetMenuTextColor(), vcl::KeyCode::GetName(), OutputDevice::GetSettings(), StyleSettings::GetShadowColor(), getShortenedString(), Image::GetSizePixel(), AllSettings::GetStyleSettings(), OutputDevice::GetTextColor(), MenuItemData::GetTextGlyphs(), OutputDevice::GetTextHeight(), OutputDevice::GetTextWidth(), tools::Rectangle::GetWidth(), Group, GUTTERBORDER, MenuItemData::HasCheck(), Size::Height(), HideMnemonic, if(), IMAGE, ImplAccelDisabled(), ImplGetNativeCheckAndRadioSize(), ImplGetNativeSubmenuArrowSize(), ImplGetSVData(), ImplIsVisible(), ImplPaintCheckBackground(), ImplPaintMenuTitle(), OutputDevice::IsBackground(), vcl::Window::IsEnabled(), IsMenuBar(), OutputDevice::IsNativeControlSupported(), tools::Rectangle::Left(), ImplSVData::maNWFData, MenuItemCheckMark, MenuItemRadioMark, MenuPopup, Mnemonic, ImplSVNWFData::mnMenuFormatBorderX, mpLayoutData, MenuItemData::nBits, MenuItemData::nId, nImgOrChkPos, NONE, nTextPos, nTitleHeight, pItemList, POPUPSELECT, PRESSED, pStartedFrom, MenuItemData::pSubMenu, pWindow, RADIOCHECK, RADIOCHECKMARK, SELECTED, SEPARATOR, Separator, OutputDevice::SetBackground(), OutputDevice::SetLineColor(), OutputDevice::SetTextColor(), Size::setWidth(), Point::setX(), Point::setY(), SPIN_RIGHT, STRING, STRINGIMAGE, SubmenuArrow, tools::Rectangle::Top(), tools::Rectangle::TopLeft(), Size::Width(), Point::X(), and Point::Y().

Referenced by MenuBarWindow::HighlightItem(), ImplFillLayoutData(), MenuFloatingWindow::Paint(), MenuBarWindow::Paint(), and MenuFloatingWindow::RenderHighlightItem().

void Menu::ImplPaintMenuTitle ( vcl::RenderContext rRenderContext,
const tools::Rectangle rRect 
) const
protected
void Menu::ImplRemoveDel ( ImplMenuDelData rDel)
protected

Definition at line 1389 of file menu.cxx.

References mpFirstDel, ImplMenuDelData::mpMenu, ImplMenuDelData::mpNext, and SAL_WARN_IF.

void Menu::ImplSelect ( )
protected
void Menu::InsertItem ( sal_uInt16  nItemId,
const OUString &  rStr,
MenuItemBits  nItemBits = MenuItemBits::NONE,
const OString &  rIdent = OString(),
sal_uInt16  nPos = MENU_APPEND 
)
void Menu::InsertItem ( sal_uInt16  nItemId,
const Image rImage,
MenuItemBits  nItemBits = MenuItemBits::NONE,
const OString &  rIdent = OString(),
sal_uInt16  nPos = MENU_APPEND 
)

Definition at line 445 of file menu.cxx.

References InsertItem(), and SetItemImage().

void Menu::InsertItem ( sal_uInt16  nItemId,
const OUString &  rString,
const Image rImage,
MenuItemBits  nItemBits = MenuItemBits::NONE,
const OString &  rIdent = OString(),
sal_uInt16  nPos = MENU_APPEND 
)

Definition at line 452 of file menu.cxx.

References InsertItem(), and SetItemImage().

void Menu::InsertItem ( const OUString &  rCommand,
const css::uno::Reference< css::frame::XFrame > &  rFrame 
)
void Menu::InsertSeparator ( const OString &  rIdent = OString(),
sal_uInt16  nPos = MENU_APPEND 
)
bool Menu::IsHighlighted ( sal_uInt16  nItemPos) const

Definition at line 2315 of file menu.cxx.

References VclPtr< reference_type >::get(), IsMenuBar(), and pWindow.

bool Menu::IsItemChecked ( sal_uInt16  nItemId) const

Definition at line 892 of file menu.cxx.

References MenuItemData::bChecked, nPos, and pItemList.

Referenced by CheckItem(), SalInstanceMenu::get_active(), ImplCopyItem(), and ImplSelect().

bool Menu::IsItemEnabled ( sal_uInt16  nItemId) const

Definition at line 937 of file menu.cxx.

References MenuItemData::bEnabled, nPos, and pItemList.

Referenced by ImplCopyItem().

bool Menu::IsItemPosVisible ( sal_uInt16  nItemPos) const

Definition at line 1262 of file menu.cxx.

References ImplIsVisible(), and IsMenuVisible().

virtual bool Menu::IsMenuBar ( ) const
pure virtual
bool Menu::IsMenuVisible ( ) const

Definition at line 1267 of file menu.cxx.

References vcl::Window::IsReallyVisible(), and pWindow.

Referenced by IsItemPosVisible().

void Menu::MenuBarKeyInput ( const KeyEvent rEvent)
protectedvirtual

Forward the KeyInput call to the MenuBar.

Reimplemented in MenuBar.

Definition at line 2206 of file menu.cxx.

Referenced by MenuFloatingWindow::KeyInput().

MenuItemData * Menu::NbcInsertItem ( sal_uInt16  nId,
MenuItemBits  nBits,
const OUString &  rStr,
Menu pMenu,
size_t  nPos,
const OString &  rIdent 
)
protected
Menu & Menu::operator= ( const Menu rMenu)
void Menu::RemoveDisabledEntries ( bool  bCheckPopups = true,
bool  bRemoveEmptyPopups = false 
)
void Menu::RemoveEventListener ( const Link< VclMenuEvent &, void > &  rEventListener)

Definition at line 400 of file menu.cxx.

References maEventListeners.

Referenced by ToolBox::ExecuteCustomMenu().

void Menu::RemoveItem ( sal_uInt16  nPos)
void Menu::Select ( )
virtual
virtual void Menu::SelectItem ( sal_uInt16  nItemId)
pure virtual

Implemented in PopupMenu, and MenuBar.

void Menu::SetAccelKey ( sal_uInt16  nItemId,
const vcl::KeyCode rKeyCode 
)
void Menu::SetAccessible ( const css::uno::Reference< css::accessibility::XAccessible > &  rxAccessible)

Definition at line 1316 of file menu.cxx.

References mxAccessible.

void Menu::SetActivateHdl ( const Link< Menu *, bool > &  rLink)
inline

Definition at line 324 of file menu.hxx.

void Menu::SetDeactivateHdl ( const Link< Menu *, bool > &  rLink)
inline

Definition at line 329 of file menu.hxx.

void Menu::SetHelpCommand ( sal_uInt16  nItemId,
const OUString &  rString 
)

Definition at line 1057 of file menu.cxx.

References MenuItemData::aHelpCommandStr, and pItemList.

Referenced by ImplCopyItem(), and MenuBarWindow::ImplCreatePopup().

void Menu::SetHelpId ( sal_uInt16  nItemId,
const OString &  rHelpId 
)
void Menu::SetHelpText ( sal_uInt16  nItemId,
const OUString &  rString 
)

Definition at line 1075 of file menu.cxx.

References MenuItemData::aHelpText, and pItemList.

Referenced by ImplCopyItem(), MenuBarWindow::ImplCreatePopup(), and InsertItem().

void Menu::SetItemBits ( sal_uInt16  nItemId,
MenuItemBits  nBits 
)

Definition at line 680 of file menu.cxx.

References ImplGetSalMenu(), MenuItemData::nBits, nPos, pItemList, and SalMenu::SetItemBits().

void Menu::SetItemCommand ( sal_uInt16  nItemId,
const OUString &  rCommand 
)
void Menu::SetItemImage ( sal_uInt16  nItemId,
const Image rImage 
)
void Menu::SetItemText ( sal_uInt16  nItemId,
const OUString &  rStr 
)
void Menu::SetMenuFlags ( MenuFlags  nFlags)
inline
void Menu::SetPopupMenu ( sal_uInt16  nItemId,
PopupMenu pMenu 
)
void Menu::SetSelectHdl ( const Link< Menu *, bool > &  rLink)
inline

Definition at line 334 of file menu.hxx.

void Menu::SetTipHelpText ( sal_uInt16  nItemId,
const OUString &  rString 
)

Definition at line 1108 of file menu.cxx.

References MenuItemData::aTipHelpText, and pItemList.

Referenced by VclBuilder::insertMenuObject().

void Menu::SetUserValue ( sal_uInt16  nItemId,
void nUserValue,
MenuUserDataReleaseFunction  aFunc = nullptr 
)
void Menu::ShowItem ( sal_uInt16  nItemId,
bool  bVisible = true 
)
void Menu::UpdateNativeMenu ( )

Definition at line 2200 of file menu.cxx.

References ImplGetSalMenu(), and SalMenu::Update().

Friends And Related Function Documentation

friend struct ImplMenuDelData
friend

Definition at line 129 of file menu.hxx.

friend class MenuBar
friend

Definition at line 123 of file menu.hxx.

friend class MenuBarWindow
friend

Definition at line 124 of file menu.hxx.

friend class MenuButton
friend

Definition at line 125 of file menu.hxx.

friend class MenuFloatingWindow
friend

Definition at line 126 of file menu.hxx.

friend class PopupMenu
friend

Definition at line 127 of file menu.hxx.

friend class SystemWindow
friend

Definition at line 128 of file menu.hxx.

Member Data Documentation

Link<Menu*, bool> Menu::aActivateHdl
private

Definition at line 136 of file menu.hxx.

Referenced by Activate(), and operator=().

Link<Menu*, bool> Menu::aDeactivateHdl
private

Definition at line 137 of file menu.hxx.

Referenced by Deactivate(), and operator=().

Link<Menu*, bool> Menu::aSelectHdl
private

Definition at line 138 of file menu.hxx.

Referenced by operator=(), and Select().

OUString Menu::aTitleText
private

Definition at line 142 of file menu.hxx.

Referenced by ImplCalcSize(), ImplPaintMenuTitle(), and operator=().

bool Menu::bCanceled
private

Terminated during a callback.

Definition at line 155 of file menu.hxx.

Referenced by PopupMenu::ImplExecute().

bool Menu::bInCallback
private
bool Menu::bKilled
private

Killed.

Definition at line 157 of file menu.hxx.

Referenced by dispose(), and PopupMenu::ImplExecute().

std::list<Link<VclMenuEvent&,void> > Menu::maEventListeners
private

Definition at line 140 of file menu.hxx.

Referenced by AddEventListener(), ImplCallEventListeners(), and RemoveEventListener().

sal_uInt16 Menu::mnHighlightedItemPos
private

Definition at line 146 of file menu.hxx.

Referenced by MenuBar::HandleMenuHighlightEvent().

ImplMenuDelData* Menu::mpFirstDel
private

Definition at line 131 of file menu.hxx.

Referenced by dispose(), ImplAddDel(), and ImplRemoveDel().

std::unique_ptr<vcl::MenuLayoutData> Menu::mpLayoutData
mutableprivate
std::unique_ptr<SalMenu> Menu::mpSalMenu
private
css::uno::Reference<css::accessibility::XAccessible > Menu::mxAccessible
private

Definition at line 159 of file menu.hxx.

Referenced by dispose(), GetAccessible(), and SetAccessible().

ImplSVEvent* Menu::nEventId
private
sal_uInt16 Menu::nImgOrChkPos
private

Definition at line 152 of file menu.hxx.

Referenced by ImplCalcSize(), and ImplPaint().

MenuFlags Menu::nMenuFlags
private

Definition at line 147 of file menu.hxx.

Referenced by Activate(), PopupMenu::ImplExecute(), and ImplIsVisible().

sal_uInt16 Menu::nSelectedId
private
sal_uInt16 Menu::nTextPos
private
sal_uInt16 Menu::nTitleHeight
private

Definition at line 143 of file menu.hxx.

Referenced by ImplCalcSize(), ImplPaint(), ImplPaintMenuTitle(), and operator=().

std::unique_ptr<MenuItemList> Menu::pItemList
private
VclPtr<Menu> Menu::pStartedFrom
private
VclPtr<vcl::Window> Menu::pWindow
private
OString Menu::sSelectedIdent
private

The documentation for this class was generated from the following files: