public TextFoundEventArgs(int identifier, int count, CefRect selectionRect, int index, bool finalUpdate) { this.ID = identifier; this.Count = count; this.SelectionRect = selectionRect; this.Index = index; this.FinalUpdate = finalUpdate; }
public virtual void Rotate() { CefRect screenRect = _screenInfo.Rect; CefRect screenAvail = _screenInfo.AvailableRect; _screenInfo.Rect = new CefRect(screenRect.Y, screenRect.X, screenRect.Height, screenRect.Width); _screenInfo.AvailableRect = new CefRect(screenAvail.Y, screenAvail.X, screenAvail.Height, screenAvail.Width); }
public void ScaleToViewport(ref CefRect rect, float pixelPerDip) { rect = new CefRect( (int)(rect.X * Scale * pixelPerDip), (int)(rect.Y * Scale * pixelPerDip), (int)(rect.Width * Scale * pixelPerDip), (int)(rect.Height * Scale * pixelPerDip) ); }
public CefRect GetBounds(float pixelPerDip) { CefRect viewportRect = this.ViewportRect; return(new CefRect( (int)(X * pixelPerDip), (int)(Y * pixelPerDip), (int)(viewportRect.Width * Scale * pixelPerDip), (int)(viewportRect.Height * Scale * pixelPerDip) )); }
public PopupShowEventArgs(CefRect rect) { this.Visible = (rect.Width | rect.Height) != 0; this.Bounds = rect; }
/// <summary> /// Called to report find results returned by cef_browser_host_t::find(). /// |identifer| is the identifier passed to find(), |count| is the number of /// matches currently identified, |selectionRect| is the location of where the /// match was found (in window coordinates), |activeMatchOrdinal| is the /// current position in the search results, and |finalUpdate| is true (1) if /// this is the last find notification. /// </summary> protected internal unsafe virtual void OnFindResult(CefBrowser browser, int identifier, int count, CefRect selectionRect, int activeMatchOrdinal, bool finalUpdate) { }
/// <summary> /// Set the printer printable area in device units. Some platforms already /// provide flipped area. Set |landscape_needs_flip| to false (0) on those /// platforms to avoid double flipping. /// </summary> public unsafe virtual void SetPrinterPrintableArea(CefSize physicalSizeDeviceUnits, CefRect printableAreaDeviceUnits, bool landscapeNeedsFlip) { NativeInstance->SetPrinterPrintableArea((cef_size_t *)&physicalSizeDeviceUnits, (cef_rect_t *)&printableAreaDeviceUnits, landscapeNeedsFlip ? 1 : 0); GC.KeepAlive(this); }
/// <summary> /// Translates the device point to drawing surface point. /// </summary> /// <param name="rect"></param> /// <param name="pixelPerDip"></param> public void MoveToDevice(ref CefRect rect, float pixelPerDip) { rect.X += (int)(X * pixelPerDip); rect.Y += (int)(Y * pixelPerDip); }