Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GtkPrintOperationPreview
is the interface that is used to
implement print preview.
A GtkPrintOperationPreview
object is passed to the
PrintOperation::preview signal by
PrintOperation
.
Synopsis
- newtype PrintOperationPreview = PrintOperationPreview (ManagedPtr PrintOperationPreview)
- class (GObject o, IsDescendantOf PrintOperationPreview o) => IsPrintOperationPreview o
- toPrintOperationPreview :: (MonadIO m, IsPrintOperationPreview o) => o -> m PrintOperationPreview
- printOperationPreviewEndPreview :: (HasCallStack, MonadIO m, IsPrintOperationPreview a) => a -> m ()
- printOperationPreviewIsSelected :: (HasCallStack, MonadIO m, IsPrintOperationPreview a) => a -> Int32 -> m Bool
- printOperationPreviewRenderPage :: (HasCallStack, MonadIO m, IsPrintOperationPreview a) => a -> Int32 -> m ()
- type PrintOperationPreviewGotPageSizeCallback = PrintContext -> PageSetup -> IO ()
- afterPrintOperationPreviewGotPageSize :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewGotPageSizeCallback) -> m SignalHandlerId
- onPrintOperationPreviewGotPageSize :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewGotPageSizeCallback) -> m SignalHandlerId
- type PrintOperationPreviewReadyCallback = PrintContext -> IO ()
- afterPrintOperationPreviewReady :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewReadyCallback) -> m SignalHandlerId
- onPrintOperationPreviewReady :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewReadyCallback) -> m SignalHandlerId
Exported types
newtype PrintOperationPreview Source #
Memory-managed wrapper type.
Instances
Eq PrintOperationPreview Source # | |
Defined in GI.Gtk.Interfaces.PrintOperationPreview (==) :: PrintOperationPreview -> PrintOperationPreview -> Bool # (/=) :: PrintOperationPreview -> PrintOperationPreview -> Bool # | |
GObject PrintOperationPreview Source # | |
Defined in GI.Gtk.Interfaces.PrintOperationPreview | |
ManagedPtrNewtype PrintOperationPreview Source # | |
TypedObject PrintOperationPreview Source # | |
Defined in GI.Gtk.Interfaces.PrintOperationPreview | |
HasParentTypes PrintOperationPreview Source # | |
Defined in GI.Gtk.Interfaces.PrintOperationPreview | |
IsGValue (Maybe PrintOperationPreview) Source # | Convert |
Defined in GI.Gtk.Interfaces.PrintOperationPreview gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe PrintOperationPreview -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe PrintOperationPreview) # | |
type ParentTypes PrintOperationPreview Source # | |
Defined in GI.Gtk.Interfaces.PrintOperationPreview |
class (GObject o, IsDescendantOf PrintOperationPreview o) => IsPrintOperationPreview o Source #
Type class for types which can be safely cast to PrintOperationPreview
, for instance with toPrintOperationPreview
.
Instances
(GObject o, IsDescendantOf PrintOperationPreview o) => IsPrintOperationPreview o Source # | |
Defined in GI.Gtk.Interfaces.PrintOperationPreview |
toPrintOperationPreview :: (MonadIO m, IsPrintOperationPreview o) => o -> m PrintOperationPreview Source #
Cast to PrintOperationPreview
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, endPreview, forceFloating, freezeNotify, getv, isFloating, isSelected, notify, notifyByPspec, ref, refSink, renderPage, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getProperty, getQdata.
Setters
endPreview
printOperationPreviewEndPreview Source #
:: (HasCallStack, MonadIO m, IsPrintOperationPreview a) | |
=> a |
|
-> m () |
Ends a preview.
This function must be called to finish a custom print preview.
isSelected
printOperationPreviewIsSelected Source #
:: (HasCallStack, MonadIO m, IsPrintOperationPreview a) | |
=> a |
|
-> Int32 |
|
-> m Bool | Returns: |
Returns whether the given page is included in the set of pages that have been selected for printing.
renderPage
printOperationPreviewRenderPage Source #
:: (HasCallStack, MonadIO m, IsPrintOperationPreview a) | |
=> a |
|
-> Int32 |
|
-> m () |
Renders a page to the preview.
This is using the print context that was passed to the
PrintOperation::preview handler together
with preview
.
A custom print preview should use this function to render the currently selected page.
Note that this function requires a suitable cairo context to be associated with the print context.
Signals
gotPageSize
type PrintOperationPreviewGotPageSizeCallback Source #
= PrintContext |
|
-> PageSetup |
|
-> IO () |
Emitted once for each page that gets rendered to the preview.
A handler for this signal should update the context
according to pageSetup
and set up a suitable cairo
context, using printContextSetCairoContext
.
afterPrintOperationPreviewGotPageSize :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewGotPageSizeCallback) -> m SignalHandlerId Source #
Connect a signal handler for the gotPageSize signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
printOperationPreview #gotPageSize callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onPrintOperationPreviewGotPageSize :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewGotPageSizeCallback) -> m SignalHandlerId Source #
Connect a signal handler for the gotPageSize signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
printOperationPreview #gotPageSize callback
ready
type PrintOperationPreviewReadyCallback Source #
= PrintContext |
|
-> IO () |
The ready signal gets emitted once per preview operation, before the first page is rendered.
A handler for this signal can be used for setup tasks.
afterPrintOperationPreviewReady :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewReadyCallback) -> m SignalHandlerId Source #
Connect a signal handler for the ready signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
printOperationPreview #ready callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onPrintOperationPreviewReady :: (IsPrintOperationPreview a, MonadIO m) => a -> ((?self :: a) => PrintOperationPreviewReadyCallback) -> m SignalHandlerId Source #
Connect a signal handler for the ready signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
printOperationPreview #ready callback