Custom popupmenu

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Custom popupmenu

Postby Bauglir » Wed Sep 01, 2010 1:22 pm

Hi,
I'd like to create own popup menu for CEF browser control, I'm able to prevent displaying default using HandleBeforeMenu method, I can display my own menu,
but how can I call "copy to clipboard" from that menu or access selection or link mouse is over?

Brona
Bauglir
Newbie
 
Posts: 8
Joined: Wed Sep 01, 2010 1:14 pm

Re: Custom popupmenu

Postby magreenblatt » Wed Sep 01, 2010 2:17 pm

The MenuInfo argument passed to HandleBeforeMenu gives you information about the current state including URLs, selection text, etc. The CefFrame object that can be retrieved by calling methods like CefBrowser::GetFocusedFrame expose methods for cut, copy, paste, etc.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Custom popupmenu

Postby intoinside » Tue Apr 19, 2011 11:13 am

HandleBeforeMenu is not fired when the page stops context menu. Is there a way to get MenuInfo in any moment without waiting for HandleBeforeMenu?
intoinside
Techie
 
Posts: 14
Joined: Wed Mar 16, 2011 7:35 am

Re: Custom popupmenu

Postby magreenblatt » Tue Apr 19, 2011 11:16 am

HandleBeforeMenu is not fired when the page stops context menu.

What do you mean by "page stops context menu"? Do you mean that context menu display is canceled using JavaScript in the page?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Custom popupmenu

Postby intoinside » Wed Apr 20, 2011 2:21 am

magreenblatt wrote:What do you mean by "page stops context menu"? Do you mean that context menu display is canceled using JavaScript in the page?


Yes, exactly
intoinside
Techie
 
Posts: 14
Joined: Wed Mar 16, 2011 7:35 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 18 guests