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¶
Known Superclasses¶
wx.lib.agw.buttonpanel.ButtonPanel
Methods Summary¶
Default class constructor. |
|
Update viewer with new page number. |
|
Add the buttons and other controls to the panel. |
|
Return the buttons that should be displayed. A subclass can customize this |
|
The button handler to show the first page of the report. |
|
The button handler to fit display to page height. |
|
The button handler to show the last page of the report. |
|
The button handler to show the next page of the report. |
|
The handler to go to enter page number of the report, if a |
|
The button handler to show the previous page of the report. |
|
The button handler to print the PDF file. |
|
The button handler to save the PDF file. |
|
The button handler to fit display to page width. |
|
The button handler to zoom in. |
|
Decrease page magnification |
|
The zoom set handler, either a list selection or a value entered. |
|
Setup the buttonpanel colours, borders etc. |
|
Called from viewer to initialize and update controls. |
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.
- GetPanelItems(self)¶
Return the buttons that should be displayed. A subclass can customize this
- 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.