views: Add groups and focus/blur callbacks (issue #2102)

- cefclient: Only make menus focusable when ALT is pressed.
- cefclient: Display sample top menu when passed the `--show-top-menu`
  command-line flag.
This commit is contained in:
Marshall Greenblatt
2017-02-17 21:08:51 -05:00
parent bd1b80198f
commit 6ed4fe96b8
58 changed files with 1284 additions and 39 deletions

View File

@@ -191,6 +191,42 @@ void CefMenuButtonDelegateCToCpp::OnChildViewChanged(CefRefPtr<CefView> view,
CefViewCppToC::Wrap(child));
}
void CefMenuButtonDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_focus))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: view; type: refptr_diff
DCHECK(view.get());
if (!view.get())
return;
// Execute
_struct->on_focus(_struct,
CefViewCppToC::Wrap(view));
}
void CefMenuButtonDelegateCToCpp::OnBlur(CefRefPtr<CefView> view) {
cef_view_delegate_t* _struct = reinterpret_cast<cef_view_delegate_t*>(
GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_blur))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: view; type: refptr_diff
DCHECK(view.get());
if (!view.get())
return;
// Execute
_struct->on_blur(_struct,
CefViewCppToC::Wrap(view));
}
// CONSTRUCTOR - Do not edit by hand.