LibreOffice Module vcl (master) 1
|
#include <menu.hxx>
Public Member Functions | |
MenuBar () | |
MenuBar (const MenuBar &rMenu) | |
virtual | ~MenuBar () override |
virtual void | dispose () override |
MenuBar & | operator= (const MenuBar &rMenu) |
virtual bool | IsMenuBar () const override |
virtual void | ClosePopup (Menu *pMenu) override |
Close the 'pStartedFrom' menu window. More... | |
virtual void | MenuBarKeyInput (const KeyEvent &rEvent) override |
Forward the KeyInput call to the MenuBar. More... | |
void | ShowCloseButton (bool bShow) |
bool | HasCloseButton () const |
bool | HasFloatButton () const |
bool | HasHideButton () const |
void | ShowButtons (bool bClose, bool bFloat, bool bHide) |
virtual void | SelectItem (sal_uInt16 nId) override |
bool | HandleMenuHighlightEvent (Menu *pMenu, sal_uInt16 nEventId) const |
bool | HandleMenuButtonEvent (sal_uInt16 nEventId) |
void | SetCloseButtonClickHdl (const Link< void *, void > &rLink) |
const Link< void *, void > & | GetCloseButtonClickHdl () const |
void | SetDisplayable (bool bDisplayable) |
bool | IsDisplayable () const |
sal_uInt16 | AddMenuBarButton (const Image &, const Link< MenuBarButtonCallbackArg &, bool > &, const OUString &) |
void | SetMenuBarButtonHighlightHdl (sal_uInt16 nId, const Link< MenuBarButtonCallbackArg &, bool > &) |
tools::Rectangle | GetMenuBarButtonRectPixel (sal_uInt16 nId) |
void | RemoveMenuBarButton (sal_uInt16 nId) |
void | LayoutChanged () |
int | GetMenuBarHeight () const |
Public Member Functions inherited from Menu | |
SAL_DLLPRIVATE void | ImplKillLayoutData () const |
SAL_DLLPRIVATE vcl::Window * | ImplGetWindow () const |
virtual | ~Menu () override |
virtual void | dispose () override |
void | Activate () |
void | Deactivate () |
void | Select () |
void | InsertItem (sal_uInt16 nItemId, const OUString &rStr, MenuItemBits nItemBits=MenuItemBits::NONE, const OUString &rIdent={}, sal_uInt16 nPos=MENU_APPEND) |
void | InsertItem (sal_uInt16 nItemId, const Image &rImage, MenuItemBits nItemBits=MenuItemBits::NONE, const OUString &rIdent={}, sal_uInt16 nPos=MENU_APPEND) |
void | InsertItem (sal_uInt16 nItemId, const OUString &rString, const Image &rImage, MenuItemBits nItemBits=MenuItemBits::NONE, const OUString &rIdent={}, sal_uInt16 nPos=MENU_APPEND) |
void | InsertSeparator (const OUString &rIdent={}, sal_uInt16 nPos=MENU_APPEND) |
void | RemoveItem (sal_uInt16 nPos) |
void | Clear () |
void | CreateAutoMnemonics () |
void | SetMenuFlags (MenuFlags nFlags) |
MenuFlags | GetMenuFlags () const |
bool | HasValidEntries (bool bCheckPopups) const |
sal_uInt16 | GetItemCount () const |
sal_uInt16 | GetItemId (sal_uInt16 nPos) const |
sal_uInt16 | GetItemId (std::u16string_view rIdent) const |
sal_uInt16 | GetItemPos (sal_uInt16 nItemId) const |
OUString | GetItemIdent (sal_uInt16 nItemId) const |
MenuItemType | GetItemType (sal_uInt16 nPos) const |
sal_uInt16 | GetCurItemId () const |
OUString 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) |
void * | GetUserValue (sal_uInt16 nItemId) const |
void | SetPopupMenu (sal_uInt16 nItemId, PopupMenu *pMenu) |
PopupMenu * | GetPopupMenu (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 (std::u16string_view 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 (std::u16string_view 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 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 OUString &rHelpId) |
OUString | GetHelpId (sal_uInt16 nItemId) const |
void | SetHelpId (const OUString &rHelpId) |
OUString | GetHelpId () 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) |
Menu & | operator= (const Menu &rMenu) |
MenuItemList * | GetItemList () const |
void | GetSystemMenuData (SystemMenuData *pData) const |
tools::Rectangle | GetCharacterBounds (sal_uInt16 nItemId, tools::Long nIndex) const |
tools::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::Window * | GetWindow () const |
void | SetAccessibleName (sal_uInt16 nItemId, const OUString &rStr) |
OUString | GetAccessibleName (sal_uInt16 nItemId) const |
void | SetAccessibleDescription (sal_uInt16 nItemId, const OUString &rStr) |
OUString | GetAccessibleDescription (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 |
void | set_id (const OUString &rID) |
Sets an ID. More... | |
const OUString & | get_id () const |
Get the ID of the window. More... | |
Public Member Functions inherited from VclReferenceBase | |
void | acquire () const |
void | release () const |
sal_Int32 | getRefCount () const |
void | disposeOnce () |
bool | isDisposed () const |
Private Member Functions | |
SAL_DLLPRIVATE bool | ImplHandleKeyEvent (const KeyEvent &rKEvent) |
MenuBarWindow * | getMenuBarWindow () |
Return the MenuBarWindow. More... | |
Static Private Member Functions | |
static SAL_DLLPRIVATE VclPtr< vcl::Window > | ImplCreate (vcl::Window *pParent, vcl::Window *pWindow, MenuBar *pMenu) |
static SAL_DLLPRIVATE void | ImplDestroy (MenuBar *pMenu, bool bDelete) |
Private Attributes | |
Link< void *, void > | maCloseHdl |
bool | mbCloseBtnVisible: 1 |
bool | mbFloatBtnVisible: 1 |
bool | mbHideBtnVisible: 1 |
bool | mbDisplayable: 1 |
Friends | |
class | Application |
class | Menu |
class | MenuBarWindow |
class | MenuFloatingWindow |
class | SystemWindow |
Additional Inherited Members | |
Protected Member Functions inherited from Menu | |
SAL_DLLPRIVATE Menu * | ImplGetStartMenu () |
SAL_DLLPRIVATE Menu * | ImplFindSelectMenu () |
SAL_DLLPRIVATE Menu * | ImplFindMenu (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, tools::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 SalMenu * | ImplGetSalMenu () |
SAL_DLLPRIVATE OUString | ImplGetHelpText (sal_uInt16 nItemId) const |
SAL_DLLPRIVATE Size | ImplGetNativeCheckAndRadioSize (vcl::RenderContext const &rRenderContext, tools::Long &rCheckHeight, tools::Long &rRadioHeight) const |
SAL_DLLPRIVATE void | ImplAddDel (ImplMenuDelData &rDel) |
SAL_DLLPRIVATE void | ImplRemoveDel (ImplMenuDelData &rDel) |
SAL_DLLPRIVATE MenuItemData * | NbcInsertItem (sal_uInt16 nId, MenuItemBits nBits, const OUString &rStr, Menu *pMenu, size_t nPos, const OUString &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 () |
virtual void | dispose () |
Static Protected Member Functions inherited from Menu | |
static SAL_DLLPRIVATE bool | ImplGetNativeSubmenuArrowSize (vcl::RenderContext const &rRenderContext, Size &rArrowSize, tools::Long &rArrowSpacing) |
MenuBar::MenuBar | ( | ) |
Definition at line 2387 of file menu.cxx.
References SalInstance::CreateMenu(), ImplGetSVData(), ImplSVData::mpDefInst, and Menu::mpSalMenu.
MenuBar::MenuBar | ( | const MenuBar & | rMenu | ) |
Definition at line 2396 of file menu.cxx.
References SalInstance::CreateMenu(), ImplGetSVData(), ImplSVData::mpDefInst, and Menu::mpSalMenu.
|
overridevirtual |
Definition at line 2406 of file menu.cxx.
References VclReferenceBase::disposeOnce().
sal_uInt16 MenuBar::AddMenuBarButton | ( | const Image & | i_rImage, |
const Link< MenuBarButtonCallbackArg &, bool > & | i_rLink, | ||
const OUString & | i_rToolTip | ||
) |
Definition at line 2635 of file menu.cxx.
References MenuBarWindow::AddMenuBarButton(), and getMenuBarWindow().
Referenced by MenuBarUpdateIconManager::AddMenuBarIcon().
|
overridevirtual |
Close the 'pStartedFrom' menu window.
Implements Menu.
Definition at line 2417 of file menu.cxx.
References getMenuBarWindow(), and MenuBarWindow::PopupClosed().
|
overridevirtual |
Reimplemented from Menu.
Definition at line 2411 of file menu.cxx.
References Menu::dispose(), and ImplDestroy().
|
inline |
Definition at line 460 of file menu.hxx.
Referenced by IMPL_LINK_NOARG().
tools::Rectangle MenuBar::GetMenuBarButtonRectPixel | ( | sal_uInt16 | nId | ) |
Definition at line 2657 of file menu.cxx.
References MenuBarWindow::GetMenuBarButtonRectPixel(), getMenuBarWindow(), and nId.
Referenced by MenuBarUpdateIconManager::GetBubbleWindow().
int MenuBar::GetMenuBarHeight | ( | ) | const |
Definition at line 2669 of file menu.cxx.
References SalMenu::GetMenuBarHeight(), vcl::Window::GetOutputSizePixel(), Menu::GetWindow(), Size::Height(), and Menu::ImplGetSalMenu().
|
private |
Return the MenuBarWindow.
Definition at line 2377 of file menu.cxx.
References VclPtr< reference_type >::get(), and Menu::pWindow.
Referenced by AddMenuBarButton(), ClosePopup(), GetMenuBarButtonRectPixel(), HandleMenuButtonEvent(), ImplDestroy(), ImplHandleKeyEvent(), LayoutChanged(), RemoveMenuBarButton(), SelectItem(), SetMenuBarButtonHighlightHdl(), and ShowButtons().
bool MenuBar::HandleMenuButtonEvent | ( | sal_uInt16 | nEventId | ) |
Definition at line 2663 of file menu.cxx.
References getMenuBarWindow(), and MenuBarWindow::HandleMenuButtonEvent().
Referenced by ImplHandleMenuEvent().
bool MenuBar::HandleMenuHighlightEvent | ( | Menu * | pMenu, |
sal_uInt16 | nEventId | ||
) | const |
Definition at line 2594 of file menu.cxx.
References Menu::GetItemIdent(), Menu::GetItemPos(), Menu::ImplCallEventListeners(), Menu::ImplCallHighlight(), Menu::ImplFindMenu(), ImplMenuDelData::isDeleted(), ITEMPOS_INVALID, MenuDehighlight, Menu::mnHighlightedItemPos, Menu::nSelectedId, Menu::pStartedFrom, and Menu::sSelectedIdent.
Referenced by ImplHandleMenuEvent().
|
inline |
Definition at line 450 of file menu.hxx.
Referenced by MenuBarWindow::SetMenu().
|
inline |
Definition at line 451 of file menu.hxx.
Referenced by MenuBarWindow::SetMenu().
|
inline |
Definition at line 452 of file menu.hxx.
Referenced by MenuBarWindow::SetMenu().
|
staticprivate |
Definition at line 2469 of file menu.cxx.
References VclPtr< reference_type >::Create(), Size::Height(), Menu::ImplCalcSize(), Menu::ImplGetSalMenu(), IsDisplayable(), Menu::pStartedFrom, Menu::pWindow, and SalMenu::VisibleMenuBar().
Referenced by SystemWindow::SetMenuBar().
|
staticprivate |
Definition at line 2493 of file menu.cxx.
References VclReferenceBase::disposeOnce(), getMenuBarWindow(), Menu::ImplGetWindow(), MenuBarWindow::KillActivePopup(), Menu::mpSalMenu, and Menu::pWindow.
Referenced by dispose(), and SystemWindow::SetMenuBar().
|
private |
Definition at line 2509 of file menu.cxx.
References SalMenu::CanGetFocus(), KeyEvent::GetKeyCode(), getMenuBarWindow(), MenuBarWindow::HandleKeyEvent(), Menu::ImplGetSalMenu(), Menu::ImplGetWindow(), TaskPaneList::IsCycleKey(), IsDisplayable(), vcl::Window::IsEnabled(), vcl::Window::IsInModalMode(), vcl::Window::IsInputEnabled(), and SalMenu::VisibleMenuBar().
Referenced by SystemWindow::EventNotify().
|
inline |
Definition at line 467 of file menu.hxx.
Referenced by ImplCreate(), ImplHandleKeyEvent(), and MenuBarWindow::LayoutChanged().
|
inlineoverridevirtual |
void MenuBar::LayoutChanged | ( | ) |
Definition at line 2450 of file menu.cxx.
References getMenuBarWindow(), and MenuBarWindow::LayoutChanged().
Referenced by SetDisplayable().
|
overridevirtual |
Forward the KeyInput call to the MenuBar.
Reimplemented from Menu.
Definition at line 2425 of file menu.cxx.
References vcl::Window::KeyInput(), and Menu::pWindow.
Definition at line 488 of file menu.hxx.
References Menu::operator=().
void MenuBar::RemoveMenuBarButton | ( | sal_uInt16 | nId | ) |
Definition at line 2649 of file menu.cxx.
References getMenuBarWindow(), nId, and MenuBarWindow::RemoveMenuBarButton().
Referenced by MenuBarUpdateIconManager::RemoveMenuBarIcon().
|
overridevirtual |
Implements Menu.
Definition at line 2539 of file menu.cxx.
References MenuBarWindow::ChangeHighlightItem(), MenuBarWindow::GetHighlightedItem(), Menu::GetItemPos(), getMenuBarWindow(), vcl::Window::GrabFocus(), ITEMPOS_INVALID, MenuBarWindow::KillActivePopup(), nId, Menu::pWindow, and MenuBarWindow::SetAutoPopup().
|
inline |
void MenuBar::SetDisplayable | ( | bool | bDisplayable | ) |
Definition at line 2457 of file menu.cxx.
References Menu::ImplGetSalMenu(), LayoutChanged(), mbDisplayable, and SalMenu::ShowMenuBar().
void MenuBar::SetMenuBarButtonHighlightHdl | ( | sal_uInt16 | nId, |
const Link< MenuBarButtonCallbackArg &, bool > & | rLink | ||
) |
Definition at line 2641 of file menu.cxx.
References getMenuBarWindow(), nId, and MenuBarWindow::SetMenuBarButtonHighlightHdl().
Referenced by MenuBarUpdateIconManager::AddMenuBarIcon().
void MenuBar::ShowButtons | ( | bool | bClose, |
bool | bFloat, | ||
bool | bHide | ||
) |
Definition at line 2435 of file menu.cxx.
References getMenuBarWindow(), mbCloseBtnVisible, mbFloatBtnVisible, mbHideBtnVisible, and MenuBarWindow::ShowButtons().
Referenced by ShowCloseButton().
void MenuBar::ShowCloseButton | ( | bool | bShow | ) |
Definition at line 2430 of file menu.cxx.
References mbFloatBtnVisible, mbHideBtnVisible, and ShowButtons().
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
Definition at line 415 of file menu.hxx.
Referenced by ShowButtons().
|
private |
Definition at line 418 of file menu.hxx.
Referenced by SetDisplayable().
|
private |
Definition at line 416 of file menu.hxx.
Referenced by ShowButtons(), and ShowCloseButton().
|
private |
Definition at line 417 of file menu.hxx.
Referenced by ShowButtons(), and ShowCloseButton().