public void Dispose() { this.ptr = null; if (this.paperMetrics != null) { this.paperMetrics.Dispose(); } this.paperMetrics = null; if (this.paperMargins != null) { this.paperMargins.Dispose(); } this.paperMargins = null; GC.SuppressFinalize(this); }
private CefPrintOptions(cef_print_options_t* ptr) { this.ptr = ptr; }
private CefPrintOptions(cef_print_options_t *ptr) { this.ptr = ptr; }
internal static CefPrintOptions From(cef_print_options_t *ptr) { return(new CefPrintOptions(ptr)); }
/// <summary> /// Called to allow customization of standard print options before the /// print dialog is displayed. |printOptions| allows specification of /// paper size, orientation and margins. Note that the specified margins /// may be adjusted if they are outside the range supported by the /// printer. All units are in inches. Return false to display the default /// print options or true to display the modified |printOptions|. /// </summary> private int get_print_options(cef_print_handler_t *self, cef_browser_t *browser, cef_print_options_t *printOptions) { ThrowIfObjectDisposed(); var m_browser = CefBrowser.From(browser); var m_printOptions = CefPrintOptions.From(printOptions); var handled = this.GetPrintOptions(m_browser, m_printOptions); m_printOptions.Dispose(); return(handled ? 1 : 0); }