Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

void wxPdfDocument::SetDisplayMode ( wxPdfZoom  zoom,
wxPdfLayout  layout = wxPDF_LAYOUT_CONTINUOUS,
double  zoomFactor = 100. 
) [virtual]

Defines the way the document is to be displayed by the viewer.

The zoom level can be set:pages can be displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a specific zooming factor or use viewer default (configured in the Preferences menu of Acrobat). The page layout can be specified too: single at once, continuous display, two columns or viewer default. By default, documents use the full width mode with continuous display.

Parameters:
zoomThe zoom to use. It can be one of the following string values or a number indicating the zooming factor to use.

  • wxPDF_ZOOM_FULLPAGE: displays the entire page on screen
  • wxPDF_ZOOM_FULLWIDTH: uses maximum width of window
  • wxPDF_ZOOM_REAL: uses real size (equivalent to 100% zoom)
  • wxPDF_ZOOM_DEFAULT: uses viewer default mode
  • wxPDF_ZOOM_FACTOR: uses viewer default mode
layoutThe page layout. Possible values are:

  • wxPDF_LAYOUT_SINGLE: displays one page at once
  • wxPDF_LAYOUT_CONTINUOUS: displays pages continuously (default)
  • wxPDF_LAYOUT_TWO: displays two pages on two columns
  • wxPDF_LAYOUT_DEFAULT: uses viewer default mode
zoomFactorspecifies the zoom factor in percent if layout is wxPDF_ZOOM_FACTOR

Definition at line 1911 of file pdfdoc.cpp.

References m_layoutMode, m_zoomFactor, and m_zoomMode.

Referenced by wxPdfDocument().

{
  // Set display mode in viewer
  switch (zoom)
  {
    case wxPDF_ZOOM_FULLPAGE:
    case wxPDF_ZOOM_FULLWIDTH:
    case wxPDF_ZOOM_REAL:
    case wxPDF_ZOOM_DEFAULT:
      m_zoomMode = zoom;
      break;
    case wxPDF_ZOOM_FACTOR:
      m_zoomMode = zoom;
      m_zoomFactor = (zoomFactor > 0) ? zoomFactor : 100.;
      break;
    default:
      m_zoomMode = wxPDF_ZOOM_FULLWIDTH;
      break;
  }

  switch (layout)
  {
    case wxPDF_LAYOUT_SINGLE:
    case wxPDF_LAYOUT_TWO:
    case wxPDF_LAYOUT_DEFAULT:
    case wxPDF_LAYOUT_CONTINUOUS:
      m_layoutMode = layout;
      break;
    default:
      m_layoutMode = wxPDF_LAYOUT_CONTINUOUS;
      break;
  }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index