PrintUnixDialogRef
public struct PrintUnixDialogRef : PrintUnixDialogProtocol, GWeakCapturing
GtkPrintUnixDialog
implements a print dialog for platforms
which don’t provide a native print dialog, like Unix.
It can be used very much like any other GTK dialog, at the cost of
the portability offered by the high-level printing API with
[classGtk.PrintOperation
].
In order to print something with GtkPrintUnixDialog
, you need to
use [methodGtk.PrintUnixDialog.get_selected_printer
] to obtain a
[classGtk.Printer
] object and use it to construct a [classGtk.PrintJob
]
using [ctorGtk.PrintJob.new
].
GtkPrintUnixDialog
uses the following response values:
GTK_RESPONSE_OK:
for the “Print” buttonGTK_RESPONSE_APPLY:
for the “Preview” buttonGTK_RESPONSE_CANCEL:
for the “Cancel” button
GtkPrintUnixDialog as GtkBuildable
The GtkPrintUnixDialog
implementation of the GtkBuildable
interface
exposes its notebook
internal children with the name “notebook”.
An example of a GtkPrintUnixDialog
UI definition fragment:
<object class="GtkPrintUnixDialog" id="dialog1">
<child internal-child="notebook">
<object class="GtkNotebook" id="notebook">
<child>
<object type="GtkNotebookPage">
<property name="tab_expand">False</property>
<property name="tab_fill">False</property>
<property name="tab">
<object class="GtkLabel" id="tablabel">
<property name="label">Tab label</property>
</object>
</property>
<property name="child">
<object class="GtkLabel" id="tabcontent">
<property name="label">Content on notebook tab</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
CSS nodes
GtkPrintUnixDialog
has a single CSS node with name window. The style classes
dialog and print are added.
The PrintUnixDialogRef
type acts as a lightweight Swift reference to an underlying GtkPrintUnixDialog
instance.
It exposes methods that can operate on this data type through PrintUnixDialogProtocol
conformance.
Use PrintUnixDialogRef
only as an unowned
reference to an existing GtkPrintUnixDialog
instance.
-
Untyped pointer to the underlying `GtkPrintUnixDialog` instance.
For type-safe access, use the generated, typed pointer
print_unix_dialog_ptr
property instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkPrintUnixDialog>)
-
Designated initialiser from a constant pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkPrintUnixDialog>)
-
Conditional initialiser from an optional pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkPrintUnixDialog>?)
-
Conditional initialiser from an optional, non-mutable pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkPrintUnixDialog>?)
-
Conditional initialiser from an optional
gpointer
Declaration
Swift
@inlinable init!(gpointer g: gpointer?)
-
Conditional initialiser from an optional, non-mutable
gconstpointer
Declaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?)
-
Reference intialiser for a related type that implements
PrintUnixDialogProtocol
Declaration
Swift
@inlinable init<T>(_ other: T) where T : PrintUnixDialogProtocol
-
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>
Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> PrintUnixDialogRef where T : PrintUnixDialogProtocol
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintUnixDialogProtocol
.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>)
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintUnixDialogProtocol
.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintUnixDialogProtocol
.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintUnixDialogProtocol
.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
PrintUnixDialogProtocol
.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer)
-
Creates a new
GtkPrintUnixDialog
.Declaration
Swift
@inlinable init<WindowT>(title: UnsafePointer<CChar>? = nil, parent: WindowT?) where WindowT : WindowProtocol