mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user