Menu bar support

Think CEF could benefit from a new feature or capability? Discuss CEF feature requests here.

Menu bar support

Postby dfabulich » Wed Jul 02, 2014 1:16 pm

Today, adding a menu bar to a CEF application requires creating your own window, which means that the app author has to handle a bunch of focus/close/resize/paint boilerplate. (Compare cefsimple_win.cpp with cefclient_win.cpp.)

CefWindowInfo already has a "menu" member, in which you can specify a menu, but at least on Windows, there's no way to handle menu commands unless you created the window and are running your own WndProc function.

It would be great if CEF had something like a CefMenuBarHandler, giving me a hook to configure the menu bar after the window was created, and giving me a callback when a menu is opened/selected. That way I could write just my own menu code without having to marshall all window events myself.

In the meantime, I'm just going to copy and paste a few hundred lines out of cefclient_win.cpp. (Wish me luck!)
dfabulich
Newbie
 
Posts: 8
Joined: Tue Jul 01, 2014 1:51 am

Re: Menu bar support

Postby magreenblatt » Wed Jul 02, 2014 1:35 pm

The menu creation/ownership model is very different across platforms. For example, menus on OS X and some Linux WMs are owned by the application and not the window. This functionality is application-specific and unlikely to be provided by CEF any time soon.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Feature Request Forum

Who is online

Users browsing this forum: Google [Bot] and 10 guests