Esempio n. 1
0
 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;
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 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)
         );
 }
Esempio n. 4
0
        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)
                       ));
        }
Esempio n. 5
0
 public PopupShowEventArgs(CefRect rect)
 {
     this.Visible = (rect.Width | rect.Height) != 0;
     this.Bounds  = rect;
 }
Esempio n. 6
0
 /// <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)
 {
 }
Esempio n. 7
0
 /// <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);
 }
Esempio n. 8
0
 /// <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);
 }