diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/menu.h | 5 | ||||
-rw-r--r-- | views/controls/menu/menu_win.h | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/views/controls/menu/menu.h b/views/controls/menu/menu.h index faf4a7b..b93ef98 100644 --- a/views/controls/menu/menu.h +++ b/views/controls/menu/menu.h @@ -271,6 +271,11 @@ class Menu { // Returns the number of menu items. virtual int ItemCount() = 0; +#if defined(OS_WIN) + // Returns the underlying menu handle + virtual HMENU GetMenuHandle() const = 0; +#endif // defined(OS_WIN) + protected: explicit Menu(Menu* parent); diff --git a/views/controls/menu/menu_win.h b/views/controls/menu/menu_win.h index 5022db7..0469c12 100644 --- a/views/controls/menu/menu_win.h +++ b/views/controls/menu/menu_win.h @@ -63,6 +63,13 @@ class MenuWin : public Menu { virtual void Cancel(); virtual int ItemCount(); + virtual HMENU GetMenuHandle() const { + return menu_; + } + + // Gets the Win32 TPM alignment flags for the specified AnchorPoint. + DWORD GetTPMAlignFlags() const; + protected: virtual void AddMenuItemInternal(int index, int item_id, @@ -91,9 +98,6 @@ class MenuWin : public Menu { // the state of the item in preference to |controller_|. UINT GetStateFlagsForItemID(int item_id) const; - // Gets the Win32 TPM alignment flags for the specified AnchorPoint. - DWORD GetTPMAlignFlags() const; - // The Win32 Menu Handle we wrap HMENU menu_; |