gnomeprint.ui.Dialog
gnomeprint.ui.Dialog — Dialog object for GnomePrintui
Synopsis
class gnomeprint.ui.Dialog(gtk.Dialog):
gnomeprint.ui.Dialog(job , title , flags =None)
def construct_range_any(flags , range_widget , currentlabel , rangelabel )
def construct_range_custom(custom )
def construct_range_page(flags , start , end , currentlabel , rangelabel )
def get_config()
def get_copies(copies , collate )
def get_range()
def get_range_page(start , end )
def set_copies(copies , collate )
|
Ancestry
+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Bin
+-- gtk.Window
+-- gtk.Dialog
+-- gnomeprint.ui.Dialog
Constructor
gnomeprint.ui.Dialog(job
, title
, flags
)
Creates a new gnomeprint.ui.Dialog
object, the following options flags
are available: gnomeprint.DIALOG_RANGE: A range widget container will be created. A range widget must be created separately,
using the constructor. gnomeprint.DIALOG_COPIES: A copies widget will be created.
Methods
gnomeprint.ui.Dialog.construct_range_any
def construct_range_any(flags
, range_widget
, currentlabel
, rangelabel
)
flags : | Options flags, which ranges are displayed. |
range_widget : | Widget to display for the range option. |
currentlabel : | Label to display next to the 'current page' button. |
rangelabel : | Label to display next to the 'range' button. |
The construct_range_any
() method create a generic range area within the print range dialogue.
The flags field contains a mask of which options you wish displayed: gnomeprint.RANGE_CURRENT: A label currentlabel will
be displayed. gnomeprint.RANGE_ALL: A label "All" will be displayed. gnomeprint.RANGE_RANGE: A label rangelabel will be displayed,
next to the range specification widget range_widget. gnomeprint.RANGE_SELECTION: A label "Selection" will be displayed.
gnomeprint.ui.Dialog.construct_range_custom
def construct_range_custom(custom
)
custom : | A widget which will be placed in a "Range" frame in the main display. |
The construct_range_custom
() method install a custom range specification widget.
gnomeprint.ui.Dialog.construct_range_page
def construct_range_page(flags
, start
, end
, currentlabel
, rangelabel
)
flags : | Options flags, see
construct_range_any .
|
start : | First page which may be printed. |
end : | Last page which may be printed. |
currentlabel : | Label text for current option. |
rangelabel : | Label text for range option. |
The construct_range_page
() method construct a generic page/sheet range area.
gnomeprint.ui.Dialog.get_config
def get_config()
The get_config
() method
gnomeprint.ui.Dialog.get_copies
def get_copies(copies
, collate
)
copies : | Return for the number of copies. |
collate : | Return for collation flag. |
The get_copies
() method retrieves the number of copies and collation indicator from the print dialogue.
If the print dialogue does not have a copies indicator, then a default of 1 copy is returned.
gnomeprint.ui.Dialog.get_range
def get_range()
Returns : | A bitmask with one option set. |
The get_range
() method return the range option selected by the user.
This is a bitmask with only 1 bit set, out of:
gnomeprint.RANGE_CURRENT: The current option selected. gnomeprint.RANGE_ALL: The all option selected.
gnomeprint.RANGE_RANGE The range option selected. gnomeprint.RANGE_SELECTION: The selection option selected.
gnomeprint.ui.Dialog.get_range_page
def get_range_page(start
, end
)
start : | Return for the user-specified start page. |
end : | Return for the user-specified end page. |
Returns : | A bitmask with the user-selection set. See
get_range |
The get_range_page
() method retrieves the user choice for range type and range,
if the user has requested a range of pages to print.
gnomeprint.ui.Dialog.set_copies
def set_copies(copies
, collate
)
copies : | New number of copies. |
collate : | New collation status. |
The set_copies
() method sets the print copies and collation status in the print dialogue.