Phoenix Logo

phoenix_title wx.lib.pdfviewer.buttonpanel.pdfButtonPanel

pdfButtonPanel is derived from wx.lib.agw.buttonpanel and provides buttons to manipulate the viewed PDF, e.g. zoom, save, print etc.


class_hierarchy Class Hierarchy

Inheritance diagram for class pdfButtonPanel:


method_summary Methods Summary

__init__ Default class constructor.
ChangePage Update viewer with new page number.
CreateButtons Add the buttons and other controls to the panel.
OnFirst The button handler to show the first page of the report.
OnHeight The button handler to fit display to page height.
OnLast The button handler to show the last page of the report.
OnNext The button handler to show the next page of the report.
OnPage The handler to go to enter page number of the report, if a
OnPrev The button handler to show the previous page of the report.
OnPrint The button handler to print the PDF file.
OnSave The button handler to save the PDF file.
OnWidth The button handler to fit display to page width.
OnZoomIn The button handler to zoom in.
OnZoomOut Decrease page magnification
OnZoomSet The zoom set handler, either a list selection or a value entered.
SetProperties Setup the buttonpanel colours, borders etc.
Update Called from viewer to initialize and update controls.

api Class API



class pdfButtonPanel(bp.ButtonPanel)

pdfButtonPanel is derived from wx.lib.agw.buttonpanel and provides buttons to manipulate the viewed PDF, e.g. zoom, save, print etc.


Methods



__init__(self, parent, nid, pos, size, style)

Default class constructor.

Parameters:
  • parent (wx.Window) – parent window. Must not be None;
  • nid (integer) – window identifier. A value of -1 indicates a default value;
  • pos (tuple or wx.Point) – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;
  • size (tuple or wx.Size) – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform;
  • style (integer) – the button style (unused);


ChangePage(self)

Update viewer with new page number.



CreateButtons(self)

Add the buttons and other controls to the panel.



OnFirst(self, event)

The button handler to show the first page of the report.



OnHeight(self, event)

The button handler to fit display to page height.



OnLast(self, event)

The button handler to show the last page of the report.



OnNext(self, event)

The button handler to show the next page of the report.



OnPage(self, event)

The handler to go to enter page number of the report, if a valid number is entered.



OnPrev(self, event)

The button handler to show the previous page of the report.



OnPrint(self, event)

The button handler to print the PDF file.



OnSave(self, event)

The button handler to save the PDF file.



OnWidth(self, event)

The button handler to fit display to page width.



OnZoomIn(self, event)

The button handler to zoom in.



OnZoomOut(self, event)

Decrease page magnification



OnZoomSet(self, event)

The zoom set handler, either a list selection or a value entered.



SetProperties(self)

Setup the buttonpanel colours, borders etc.



Update(self, pagenum, numpages, zoomscale)

Called from viewer to initialize and update controls.

Parameters:
  • pagenum (integer) – the page to show
  • numpages (integer) – the total pages
  • zoomscale (integer) – the zoom factor

Note

In the viewer, page range is from 0 to numpages-1, in button controls it is from 1 to numpages.