I'm new in this forum, so please pardon me if this has all been discussed before. After dealing with this issue for a couple of days, I thought best to ask the relevant people.
What I wanted to do was add support for:
shouldBeginEditing
shouldEndEditing
shouldInsertNode
shouldInsertText
shouldChangeSelectedRange
shouldDeleteRange
shouldApplyStyle
present in the BrowserWebViewDelegate and push them onto the handler.
Now this was relatively simple to do. The problem was that each function uses a Webkit::WebRange object to define the range. So naturally, I needed to add support for WebRange. Here is the abstract class:
- Code: Select all
/*--cef(source=library)--*/
class CefDOMRange : public CefBase
{
public:
/*--cef()--*/
virtual int StartOffset() =0;
/*--cef()--*/
virtual int EndOffset() =0;
/*--cef()--*/
virtual CefRefPtr<CefDOMNode> StartContainer(int& exceptionCode) =0;
/*--cef()--*/
virtual CefRefPtr<CefDOMNode> EndContainer(int& exceptionCode) =0;
/*--cef()--*/
virtual CefString ToHTMLText() =0;
/*--cef()--*/
virtual CefString ToPlainText() =0;
/*--cef()--*/
virtual bool IsNull() =0;
};
Now, you say that you have to run Translator.py... and I did run Translator.bat which basically adds the requisite methods to CefHandler.
I've also edited the methods in handler_cpptoc.cc so the implementation is partially complete. However, translor.py just does not want to create CefDOMRange and any of the files relevant to it.
Do you have an idea what's going on?
Thanks!