implement IKeyboardInputSink

This commit is contained in:
anthony taranto
2012-03-05 14:08:11 -08:00
parent 16168d4bf3
commit f293f9759d
2 changed files with 40 additions and 2 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ namespace Wpf
IntPtr WebView::SourceHook(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam, bool% handled)
{
handled = false;
switch(message)
{
case WM_KEYDOWN:
+39 -1
View File
@@ -22,7 +22,8 @@ namespace CefSharp
namespace Wpf
{
[TemplatePart(Name="PART_Browser", Type=Image::typeid)]
public ref class WebView sealed : public ContentControl, IRenderWebBrowser
public ref class WebView sealed : public ContentControl,
IRenderWebBrowser, IKeyboardInputSink
{
private:
delegate void ActionDelegate();
@@ -184,5 +185,42 @@ namespace Wpf
virtual void OnApplyTemplate() override;
virtual void SetCursor(CefCursorHandle cursor);
virtual void SetBuffer(int width, int height, const void* buffer);
// IKeyboadInputSink
virtual property IKeyboardInputSite^ KeyboardInputSite
{
IKeyboardInputSite^ get() { return nullptr; }
void set(IKeyboardInputSite^ site) { }
}
virtual bool HasFocusWithin()
{
return false;
}
virtual bool OnMnemonic(System::Windows::Interop::MSG% msg, System::Windows::Input::ModifierKeys modifiers)
{
return false;
}
virtual bool TranslateAccelerator(System::Windows::Interop::MSG% msg, System::Windows::Input::ModifierKeys modifiers)
{
return false;
}
virtual bool TranslateChar(System::Windows::Interop::MSG% msg, System::Windows::Input::ModifierKeys modifiers)
{
return false;
}
virtual IKeyboardInputSite^ RegisterKeyboardInputSink(IKeyboardInputSink^ sink)
{
return nullptr;
}
virtual bool TabInto(TraversalRequest^ request)
{
return false;
}
};
}}