mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
views: Support top menu switching with mouse and arrow keys (issue #2102)
- cefclient: Add example ViewsMenuBar implementation and show top menu by default (specify `--hide-top-menu` to hide it).
This commit is contained in:
@@ -54,6 +54,12 @@ class CefButtonDelegate : public CefViewDelegate {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnButtonPressed(CefRefPtr<CefButton> button) =0;
|
||||
|
||||
///
|
||||
// Called when the state of |button| changes.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnButtonStateChanged(CefRefPtr<CefButton> button) {};
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_
|
||||
|
@@ -78,6 +78,13 @@ class CefMenuButton : public CefLabelButton {
|
||||
virtual void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
|
||||
const CefPoint& screen_point,
|
||||
cef_menu_anchor_position_t anchor_position) =0;
|
||||
|
||||
///
|
||||
// Show the menu for this button. Results in a call to
|
||||
// CefMenuButtonDelegate::OnMenuButtonPressed().
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void TriggerMenu() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_H_
|
||||
|
@@ -113,6 +113,7 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
/*--cef()--*/
|
||||
virtual bool OnKeyEvent(CefRefPtr<CefWindow> window,
|
||||
const CefKeyEvent& event) { return false; }
|
||||
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_
|
||||
|
Reference in New Issue
Block a user