public CefWebView(CefBrowserSettings settings, string startUrl) { this.core = new CefWebBrowserCore(this, settings, startUrl); this.core.Created += new EventHandler(core_Created); this.core.TitleChanged += new EventHandler(core_TitleChanged); this.SetStyle( ControlStyles.ContainerControl | ControlStyles.ResizeRedraw | ControlStyles.FixedWidth | ControlStyles.FixedHeight | ControlStyles.StandardClick | ControlStyles.UserMouse | ControlStyles.SupportsTransparentBackColor | ControlStyles.StandardDoubleClick | ControlStyles.OptimizedDoubleBuffer | ControlStyles.CacheText | ControlStyles.EnableNotifyMessage | ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UseTextForAccessibility | ControlStyles.Opaque, false); this.SetStyle( ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.Selectable, true); }
protected override void OnRealized() { base.OnRealized(); Console.WriteLine("OnRealized2"); this.core = new CefWebBrowserCore(this, new CefBrowserSettings(), "http://google.com"); this.core.Created += HandleCoreCreated; this.ChildVisible = true; var windowInfo = new CefWindowInfo(); #if WINDOWS #error WINDOWS is not supported currently. // TODO: Win32 // windowInfo.SetAsChild( // gdk_win32_drawable_get_handle(this.GdkWindow.Handle), this.x, this.y, this.width, this.height // ); #elif LINUX windowInfo.SetAsChild( this.Raw ); #else #error OS not supported. #endif this.core.Create(windowInfo); windowInfo.Dispose(); }
public CefWebDragHandler(CefWebBrowserCore context) { this.context = context; }