gi-gtk-4.0.8: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.PrintUnixDialog

Description

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 PrintOperation.

In order to print something with GtkPrintUnixDialog, you need to use printUnixDialogGetSelectedPrinter to obtain a Printer object and use it to construct a PrintJob using printJobNew.

GtkPrintUnixDialog uses the following response values:

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:

xml code

<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.

Synopsis

Exported types

newtype PrintUnixDialog Source #

Memory-managed wrapper type.

Constructors

PrintUnixDialog (ManagedPtr PrintUnixDialog) 

Instances

Instances details
Eq PrintUnixDialog Source # 
Instance details

Defined in GI.Gtk.Objects.PrintUnixDialog

GObject PrintUnixDialog Source # 
Instance details

Defined in GI.Gtk.Objects.PrintUnixDialog

ManagedPtrNewtype PrintUnixDialog Source # 
Instance details

Defined in GI.Gtk.Objects.PrintUnixDialog

TypedObject PrintUnixDialog Source # 
Instance details

Defined in GI.Gtk.Objects.PrintUnixDialog

Methods

glibType :: IO GType

HasParentTypes PrintUnixDialog Source # 
Instance details

Defined in GI.Gtk.Objects.PrintUnixDialog

IsGValue (Maybe PrintUnixDialog) Source #

Convert PrintUnixDialog to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.PrintUnixDialog

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe PrintUnixDialog -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe PrintUnixDialog)

type ParentTypes PrintUnixDialog Source # 
Instance details

Defined in GI.Gtk.Objects.PrintUnixDialog

class (GObject o, IsDescendantOf PrintUnixDialog o) => IsPrintUnixDialog o Source #

Type class for types which can be safely cast to PrintUnixDialog, for instance with toPrintUnixDialog.

Instances

Instances details
(GObject o, IsDescendantOf PrintUnixDialog o) => IsPrintUnixDialog o Source # 
Instance details

Defined in GI.Gtk.Objects.PrintUnixDialog

toPrintUnixDialog :: (MonadIO m, IsPrintUnixDialog o) => o -> m PrintUnixDialog Source #

Cast to PrintUnixDialog, 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

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addActionWidget, addButton, addController, addCssClass, addCustomTab, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, close, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, destroy, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, fullscreen, fullscreenOnMonitor, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasGroup, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isActive, isAncestor, isDrawable, isFloating, isFocus, isFullscreen, isMaximized, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, maximize, measure, minimize, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, present, presentWithTime, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, response, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unfullscreen, unmap, unmaximize, unminimize, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getApplication, getAtContext, getBounds, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getColor, getContentArea, getCssClasses, getCssName, getCurrentPage, getCursor, getData, getDecorated, getDefaultSize, getDefaultWidget, getDeletable, getDestroyWithParent, getDirection, getDisplay, getEmbedPageSetup, getFirstAccessibleChild, getFirstChild, getFocus, getFocusChild, getFocusOnClick, getFocusVisible, getFocusable, getFontMap, getFontOptions, getFrameClock, getGroup, getHalign, getHandleMenubarAccel, getHasSelection, getHasTooltip, getHeaderBar, getHeight, getHexpand, getHexpandSet, getHideOnClose, getIconName, getLastChild, getLayoutManager, getManualCapabilities, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMnemonicsVisible, getModal, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPageSetup, getPageSetupSet, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRenderer, getRequestMode, getResizable, getResponseForWidget, getRoot, getScaleFactor, getSelectedPrinter, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getSupportSelection, getSurface, getSurfaceTransform, getTemplateChild, getTitle, getTitlebar, getTooltipMarkup, getTooltipText, getTransientFor, getValign, getVexpand, getVexpandSet, getVisible, getWidgetForResponse, getWidth.

Setters

setAccessibleParent, setApplication, setCanFocus, setCanTarget, setChild, setChildVisible, setCssClasses, setCurrentPage, setCursor, setCursorFromName, setData, setDataFull, setDecorated, setDefaultResponse, setDefaultSize, setDefaultWidget, setDeletable, setDestroyWithParent, setDirection, setDisplay, setEmbedPageSetup, setFocus, setFocusChild, setFocusOnClick, setFocusVisible, setFocusable, setFontMap, setFontOptions, setHalign, setHandleMenubarAccel, setHasSelection, setHasTooltip, setHexpand, setHexpandSet, setHideOnClose, setIconName, setLayoutManager, setManualCapabilities, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMnemonicsVisible, setModal, setName, setOpacity, setOverflow, setPageSetup, setParent, setProperty, setReceivesDefault, setResizable, setResponseSensitive, setSensitive, setSettings, setSizeRequest, setStartupId, setStateFlags, setSupportSelection, setTitle, setTitlebar, setTooltipMarkup, setTooltipText, setTransientFor, setValign, setVexpand, setVexpandSet, setVisible.

addCustomTab

printUnixDialogAddCustomTab Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a, IsWidget b, IsWidget c) 
=> a

dialog: a GtkPrintUnixDialog

-> b

child: the widget to put in the custom tab

-> c

tabLabel: the widget to use as tab label

-> m () 

Adds a custom tab to the print dialog.

getCurrentPage

printUnixDialogGetCurrentPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m Int32

Returns: the current page of dialog

Gets the current page of the GtkPrintUnixDialog.

getEmbedPageSetup

printUnixDialogGetEmbedPageSetup Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m Bool

Returns: whether to embed the page setup

Gets whether to embed the page setup.

getHasSelection

printUnixDialogGetHasSelection Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m Bool

Returns: whether there is a selection

Gets whether there is a selection.

getManualCapabilities

printUnixDialogGetManualCapabilities Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m [PrintCapabilities]

Returns: the printing capabilities

Gets the capabilities that have been set on this GtkPrintUnixDialog.

getPageSetup

printUnixDialogGetPageSetup Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m PageSetup

Returns: the page setup of dialog.

Gets the page setup that is used by the GtkPrintUnixDialog.

getPageSetupSet

printUnixDialogGetPageSetupSet Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m Bool

Returns: whether a page setup was set by user.

Gets whether a page setup was set by the user.

getSelectedPrinter

printUnixDialogGetSelectedPrinter Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m (Maybe Printer)

Returns: the currently selected printer

Gets the currently selected printer.

getSettings

printUnixDialogGetSettings Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m PrintSettings

Returns: a new GtkPrintSettings object with the values from dialog

Gets a new GtkPrintSettings object that represents the current values in the print dialog.

Note that this creates a new object, and you need to unref it if don’t want to keep it.

getSupportSelection

printUnixDialogGetSupportSelection Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> m Bool

Returns: whether the application supports print of selection

Gets whether the print dialog allows user to print a selection.

new

printUnixDialogNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) 
=> Maybe Text

title: Title of the dialog

-> Maybe a

parent: Transient parent of the dialog

-> m PrintUnixDialog

Returns: a new GtkPrintUnixDialog

Creates a new GtkPrintUnixDialog.

setCurrentPage

printUnixDialogSetCurrentPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> Int32

currentPage: the current page number.

-> m () 

Sets the current page number.

If currentPage is not -1, this enables the current page choice for the range of pages to print.

setEmbedPageSetup

printUnixDialogSetEmbedPageSetup Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> Bool

embed: embed page setup selection

-> m () 

Embed page size combo box and orientation combo box into page setup page.

setHasSelection

printUnixDialogSetHasSelection Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> Bool

hasSelection: True indicates that a selection exists

-> m () 

Sets whether a selection exists.

setManualCapabilities

printUnixDialogSetManualCapabilities Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> [PrintCapabilities]

capabilities: the printing capabilities of your application

-> m () 

This lets you specify the printing capabilities your application supports.

For instance, if you can handle scaling the output then you pass PrintCapabilitiesScale. If you don’t pass that, then the dialog will only let you select the scale if the printing system automatically handles scaling.

setPageSetup

printUnixDialogSetPageSetup Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a, IsPageSetup b) 
=> a

dialog: a GtkPrintUnixDialog

-> b

pageSetup: a GtkPageSetup

-> m () 

Sets the page setup of the GtkPrintUnixDialog.

setSettings

printUnixDialogSetSettings Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a, IsPrintSettings b) 
=> a

dialog: a GtkPrintUnixDialog

-> Maybe b

settings: a GtkPrintSettings

-> m () 

Sets the GtkPrintSettings for the GtkPrintUnixDialog.

Typically, this is used to restore saved print settings from a previous print operation before the print dialog is shown.

setSupportSelection

printUnixDialogSetSupportSelection Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintUnixDialog a) 
=> a

dialog: a GtkPrintUnixDialog

-> Bool

supportSelection: True to allow print selection

-> m () 

Sets whether the print dialog allows user to print a selection.

Properties

currentPage

The current page in the document.

constructPrintUnixDialogCurrentPage :: (IsPrintUnixDialog o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “current-page” property. This is rarely needed directly, but it is used by new.

getPrintUnixDialogCurrentPage :: (MonadIO m, IsPrintUnixDialog o) => o -> m Int32 Source #

Get the value of the “current-page” property. When overloading is enabled, this is equivalent to

get printUnixDialog #currentPage

setPrintUnixDialogCurrentPage :: (MonadIO m, IsPrintUnixDialog o) => o -> Int32 -> m () Source #

Set the value of the “current-page” property. When overloading is enabled, this is equivalent to

set printUnixDialog [ #currentPage := value ]

embedPageSetup

True if the page setup controls are embedded.

constructPrintUnixDialogEmbedPageSetup :: (IsPrintUnixDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “embed-page-setup” property. This is rarely needed directly, but it is used by new.

getPrintUnixDialogEmbedPageSetup :: (MonadIO m, IsPrintUnixDialog o) => o -> m Bool Source #

Get the value of the “embed-page-setup” property. When overloading is enabled, this is equivalent to

get printUnixDialog #embedPageSetup

setPrintUnixDialogEmbedPageSetup :: (MonadIO m, IsPrintUnixDialog o) => o -> Bool -> m () Source #

Set the value of the “embed-page-setup” property. When overloading is enabled, this is equivalent to

set printUnixDialog [ #embedPageSetup := value ]

hasSelection

Whether the application has a selection.

constructPrintUnixDialogHasSelection :: (IsPrintUnixDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “has-selection” property. This is rarely needed directly, but it is used by new.

getPrintUnixDialogHasSelection :: (MonadIO m, IsPrintUnixDialog o) => o -> m Bool Source #

Get the value of the “has-selection” property. When overloading is enabled, this is equivalent to

get printUnixDialog #hasSelection

setPrintUnixDialogHasSelection :: (MonadIO m, IsPrintUnixDialog o) => o -> Bool -> m () Source #

Set the value of the “has-selection” property. When overloading is enabled, this is equivalent to

set printUnixDialog [ #hasSelection := value ]

manualCapabilities

Capabilities the application can handle.

constructPrintUnixDialogManualCapabilities :: (IsPrintUnixDialog o, MonadIO m) => [PrintCapabilities] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “manual-capabilities” property. This is rarely needed directly, but it is used by new.

getPrintUnixDialogManualCapabilities :: (MonadIO m, IsPrintUnixDialog o) => o -> m [PrintCapabilities] Source #

Get the value of the “manual-capabilities” property. When overloading is enabled, this is equivalent to

get printUnixDialog #manualCapabilities

setPrintUnixDialogManualCapabilities :: (MonadIO m, IsPrintUnixDialog o) => o -> [PrintCapabilities] -> m () Source #

Set the value of the “manual-capabilities” property. When overloading is enabled, this is equivalent to

set printUnixDialog [ #manualCapabilities := value ]

pageSetup

The GtkPageSetup object to use.

constructPrintUnixDialogPageSetup :: (IsPrintUnixDialog o, MonadIO m, IsPageSetup a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “page-setup” property. This is rarely needed directly, but it is used by new.

getPrintUnixDialogPageSetup :: (MonadIO m, IsPrintUnixDialog o) => o -> m PageSetup Source #

Get the value of the “page-setup” property. When overloading is enabled, this is equivalent to

get printUnixDialog #pageSetup

setPrintUnixDialogPageSetup :: (MonadIO m, IsPrintUnixDialog o, IsPageSetup a) => o -> a -> m () Source #

Set the value of the “page-setup” property. When overloading is enabled, this is equivalent to

set printUnixDialog [ #pageSetup := value ]

printSettings

The GtkPrintSettings object used for this dialog.

clearPrintUnixDialogPrintSettings :: (MonadIO m, IsPrintUnixDialog o) => o -> m () Source #

Set the value of the “print-settings” property to Nothing. When overloading is enabled, this is equivalent to

clear #printSettings

constructPrintUnixDialogPrintSettings :: (IsPrintUnixDialog o, MonadIO m, IsPrintSettings a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “print-settings” property. This is rarely needed directly, but it is used by new.

getPrintUnixDialogPrintSettings :: (MonadIO m, IsPrintUnixDialog o) => o -> m (Maybe PrintSettings) Source #

Get the value of the “print-settings” property. When overloading is enabled, this is equivalent to

get printUnixDialog #printSettings

setPrintUnixDialogPrintSettings :: (MonadIO m, IsPrintUnixDialog o, IsPrintSettings a) => o -> a -> m () Source #

Set the value of the “print-settings” property. When overloading is enabled, this is equivalent to

set printUnixDialog [ #printSettings := value ]

selectedPrinter

The GtkPrinter which is selected.

getPrintUnixDialogSelectedPrinter :: (MonadIO m, IsPrintUnixDialog o) => o -> m (Maybe Printer) Source #

Get the value of the “selected-printer” property. When overloading is enabled, this is equivalent to

get printUnixDialog #selectedPrinter

supportSelection

Whether the dialog supports selection.

constructPrintUnixDialogSupportSelection :: (IsPrintUnixDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “support-selection” property. This is rarely needed directly, but it is used by new.

getPrintUnixDialogSupportSelection :: (MonadIO m, IsPrintUnixDialog o) => o -> m Bool Source #

Get the value of the “support-selection” property. When overloading is enabled, this is equivalent to

get printUnixDialog #supportSelection

setPrintUnixDialogSupportSelection :: (MonadIO m, IsPrintUnixDialog o) => o -> Bool -> m () Source #

Set the value of the “support-selection” property. When overloading is enabled, this is equivalent to

set printUnixDialog [ #supportSelection := value ]