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:
@@ -40,10 +40,19 @@ CEF_BUTTON_VIEW_T class CefButtonView : public CEF_VIEW_VIEW_D {
|
||||
return button;
|
||||
}
|
||||
|
||||
// views::CustomButton methods:
|
||||
void StateChanged() override;
|
||||
|
||||
// views::ButtonListener methods:
|
||||
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
||||
};
|
||||
|
||||
CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged() {
|
||||
ParentClass::StateChanged();
|
||||
if (ParentClass::cef_delegate())
|
||||
ParentClass::cef_delegate()->OnButtonStateChanged(GetCefButton());
|
||||
}
|
||||
|
||||
CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::ButtonPressed(
|
||||
views::Button* sender, const ui::Event& event) {
|
||||
if (ParentClass::cef_delegate())
|
||||
|
Reference in New Issue
Block a user