diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-12-15 13:16:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-12-15 17:29:59 +0100 |
commit | 3dfbf8d7f1aee70920aaa4f8001d78669aa7b85f (patch) | |
tree | 1b18ed663ecfe642765052b3a37b793d1267c185 /include | |
parent | b163f838c79118809d880c76f943fdd2fc0288ed (diff) |
add set_id/get_id to Menus like Windows
Change-Id: Idcbb4e8fc67bf04d0959ba9ab59342240434727c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107768
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/menu.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 6e27a9157a87..935fc68eac11 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -137,6 +137,8 @@ private: std::list<Link<VclMenuEvent&,void> > maEventListeners; + OUString maID; + OUString aTitleText; // PopupMenu text sal_uInt16 nTitleHeight; @@ -388,6 +390,16 @@ public: bool HandleMenuCommandEvent(Menu *pMenu, sal_uInt16 nEventId) const; bool HandleMenuActivateEvent(Menu *pMenu) const; bool HandleMenuDeActivateEvent(Menu *pMenu) const; + + /** + * Sets an ID. + */ + void set_id(const OUString& rID) { maID = rID; } + + /** + * Get the ID of the window. + */ + const OUString& get_id() const { return maID; } }; class VCL_DLLPUBLIC MenuBar : public Menu |