WebKit2.PrintCustomWidget¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|
||
r/w/co |
|
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted right before the printing will start. |
|
Emitted after change of selected printer in the dialog. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class WebKit2.PrintCustomWidget(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Allows to embed a custom widget in print dialog.
A
WebKit2.PrintCustomWidget
allows to embed a custom widget in the print dialog by connecting to theWebKit2.PrintOperation
::create-custom-widget
signal, creating a newWebKit2.PrintCustomWidget
withWebKit2.PrintCustomWidget.new
() and returning it from there. You can later useWebKit2.PrintOperation.run_dialog
() to display the dialog.Unfortunately, use of custom widgets is incompatible with modern containerized application frameworks like Flatpak. A print dialog constructed in the application process will not have access to host printers, so instead it must be constructed by a desktop portal service running on the host system. Because this print dialog runs in a separate process, it’s not possible to attach a custom widget.
New in version 2.16.
Deprecated since version 2.40.
- classmethod new(widget, title)¶
- Parameters:
widget (
Gtk.Widget
) – aGtk.Widget
title (
str
) – a widget's title
- Returns:
a new
WebKit2.PrintOperation
.- Return type:
Create a new
WebKit2.PrintCustomWidget
with given widget and title.The widget ownership is taken and it is destroyed together with the dialog even if this object could still be alive at that point. You typically want to pass a container widget with multiple widgets in it.
New in version 2.16.
Deprecated since version 2.40.
- get_title()¶
- Returns:
Title of the self.
- Return type:
Return the value of
WebKit2.PrintCustomWidget
:title
property.Return the value of
WebKit2.PrintCustomWidget
:title
property for the given self object.New in version 2.16.
Deprecated since version 2.40.
- get_widget()¶
- Returns:
a
Gtk.Widget
.- Return type:
Return the value of
WebKit2.PrintCustomWidget
:widget
property.Return the value of
WebKit2.PrintCustomWidget
:widget
property for the given self object. The returned value will always be valid if called fromWebKit2.PrintCustomWidget
::apply
orWebKit2.PrintCustomWidget
::update
callbacks, but it will beNone
if called after theWebKit2.PrintCustomWidget
::apply
signal is emitted.New in version 2.16.
Deprecated since version 2.40.
- do_apply(widget) virtual¶
- Parameters:
widget (
Gtk.Widget
) –
- do_update(widget, page_setup, print_settings) virtual¶
- Parameters:
widget (
Gtk.Widget
) –page_setup (
Gtk.PageSetup
) –print_settings (
Gtk.PrintSettings
) –
Signal Details¶
- WebKit2.PrintCustomWidget.signals.apply(print_custom_widget)¶
- Signal Name:
apply
- Flags:
- Parameters:
print_custom_widget (
WebKit2.PrintCustomWidget
) – The object which received the signal
Emitted right before the printing will start. You should read the information from the widget and update the content based on it if necessary. The widget is not guaranteed to be valid at a later time.
New in version 2.16.
Deprecated since version 2.40.
- WebKit2.PrintCustomWidget.signals.update(print_custom_widget, page_setup, print_settings)¶
- Signal Name:
update
- Flags:
- Parameters:
print_custom_widget (
WebKit2.PrintCustomWidget
) – The object which received the signalpage_setup (
Gtk.PageSetup
) – actual page setupprint_settings (
Gtk.PrintSettings
) – actual print settings
Emitted after change of selected printer in the dialog. The actual page setup and print settings are available and the custom widget can actualize itself according to their values.
New in version 2.16.
Deprecated since version 2.40.
Property Details¶
- WebKit2.PrintCustomWidget.props.title¶
- Name:
title
- Type:
- Default Value:
- Flags:
The title of the custom widget.
New in version 2.16.
Deprecated since version 2.40.
- WebKit2.PrintCustomWidget.props.widget¶
- Name:
widget
- Type:
- Default Value:
- Flags:
The custom
Gtk.Widget
that will be embedded in the dialog.New in version 2.16.
Deprecated since version 2.40.