Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- drawPage
- getBodyFontName
- getBottomMargin
- getBuffer
- getFooterFontName
- getHeaderFontName
- getHighlightSyntax
- getLeftMargin
- getLineNumbersFontName
- getNPages
- getPaginationProgress
- getPrintFooter
- getPrintHeader
- getPrintLineNumbers
- getRightMargin
- getTabWidth
- getTopMargin
- getWrapMode
- new
- newFromView
- paginate
- setBodyFontName
- setBottomMargin
- setFooterFontName
- setFooterFormat
- setHeaderFontName
- setHeaderFormat
- setHighlightSyntax
- setLeftMargin
- setLineNumbersFontName
- setPrintFooter
- setPrintHeader
- setPrintLineNumbers
- setRightMargin
- setTabWidth
- setTopMargin
- setWrapMode
- Properties
No description available in the introspection data.
Synopsis
- newtype PrintCompositor = PrintCompositor (ManagedPtr PrintCompositor)
- class (GObject o, IsDescendantOf PrintCompositor o) => IsPrintCompositor o
- toPrintCompositor :: (MonadIO m, IsPrintCompositor o) => o -> m PrintCompositor
- noPrintCompositor :: Maybe PrintCompositor
- printCompositorDrawPage :: (HasCallStack, MonadIO m, IsPrintCompositor a, IsPrintContext b) => a -> b -> Int32 -> m ()
- printCompositorGetBodyFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Text
- printCompositorGetBottomMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Unit -> m Double
- printCompositorGetBuffer :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Buffer
- printCompositorGetFooterFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Text
- printCompositorGetHeaderFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Text
- printCompositorGetHighlightSyntax :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Bool
- printCompositorGetLeftMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Unit -> m Double
- printCompositorGetLineNumbersFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Text
- printCompositorGetNPages :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Int32
- printCompositorGetPaginationProgress :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Double
- printCompositorGetPrintFooter :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Bool
- printCompositorGetPrintHeader :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Bool
- printCompositorGetPrintLineNumbers :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Word32
- printCompositorGetRightMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Unit -> m Double
- printCompositorGetTabWidth :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Word32
- printCompositorGetTopMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Unit -> m Double
- printCompositorGetWrapMode :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m WrapMode
- printCompositorNew :: (HasCallStack, MonadIO m, IsBuffer a) => a -> m PrintCompositor
- printCompositorNewFromView :: (HasCallStack, MonadIO m, IsView a) => a -> m PrintCompositor
- printCompositorPaginate :: (HasCallStack, MonadIO m, IsPrintCompositor a, IsPrintContext b) => a -> b -> m Bool
- printCompositorSetBodyFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Text -> m ()
- printCompositorSetBottomMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Double -> Unit -> m ()
- printCompositorSetFooterFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Maybe Text -> m ()
- printCompositorSetFooterFormat :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Bool -> Maybe Text -> Maybe Text -> Maybe Text -> m ()
- printCompositorSetHeaderFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Maybe Text -> m ()
- printCompositorSetHeaderFormat :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Bool -> Maybe Text -> Maybe Text -> Maybe Text -> m ()
- printCompositorSetHighlightSyntax :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Bool -> m ()
- printCompositorSetLeftMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Double -> Unit -> m ()
- printCompositorSetLineNumbersFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Maybe Text -> m ()
- printCompositorSetPrintFooter :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Bool -> m ()
- printCompositorSetPrintHeader :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Bool -> m ()
- printCompositorSetPrintLineNumbers :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Word32 -> m ()
- printCompositorSetRightMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Double -> Unit -> m ()
- printCompositorSetTabWidth :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Word32 -> m ()
- printCompositorSetTopMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Double -> Unit -> m ()
- printCompositorSetWrapMode :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> WrapMode -> m ()
- constructPrintCompositorBodyFontName :: IsPrintCompositor o => Text -> IO (GValueConstruct o)
- getPrintCompositorBodyFontName :: (MonadIO m, IsPrintCompositor o) => o -> m (Maybe Text)
- setPrintCompositorBodyFontName :: (MonadIO m, IsPrintCompositor o) => o -> Text -> m ()
- constructPrintCompositorBuffer :: (IsPrintCompositor o, IsBuffer a) => a -> IO (GValueConstruct o)
- getPrintCompositorBuffer :: (MonadIO m, IsPrintCompositor o) => o -> m Buffer
- clearPrintCompositorFooterFontName :: (MonadIO m, IsPrintCompositor o) => o -> m ()
- constructPrintCompositorFooterFontName :: IsPrintCompositor o => Text -> IO (GValueConstruct o)
- getPrintCompositorFooterFontName :: (MonadIO m, IsPrintCompositor o) => o -> m (Maybe Text)
- setPrintCompositorFooterFontName :: (MonadIO m, IsPrintCompositor o) => o -> Text -> m ()
- clearPrintCompositorHeaderFontName :: (MonadIO m, IsPrintCompositor o) => o -> m ()
- constructPrintCompositorHeaderFontName :: IsPrintCompositor o => Text -> IO (GValueConstruct o)
- getPrintCompositorHeaderFontName :: (MonadIO m, IsPrintCompositor o) => o -> m (Maybe Text)
- setPrintCompositorHeaderFontName :: (MonadIO m, IsPrintCompositor o) => o -> Text -> m ()
- constructPrintCompositorHighlightSyntax :: IsPrintCompositor o => Bool -> IO (GValueConstruct o)
- getPrintCompositorHighlightSyntax :: (MonadIO m, IsPrintCompositor o) => o -> m Bool
- setPrintCompositorHighlightSyntax :: (MonadIO m, IsPrintCompositor o) => o -> Bool -> m ()
- clearPrintCompositorLineNumbersFontName :: (MonadIO m, IsPrintCompositor o) => o -> m ()
- constructPrintCompositorLineNumbersFontName :: IsPrintCompositor o => Text -> IO (GValueConstruct o)
- getPrintCompositorLineNumbersFontName :: (MonadIO m, IsPrintCompositor o) => o -> m (Maybe Text)
- setPrintCompositorLineNumbersFontName :: (MonadIO m, IsPrintCompositor o) => o -> Text -> m ()
- getPrintCompositorNPages :: (MonadIO m, IsPrintCompositor o) => o -> m Int32
- constructPrintCompositorPrintFooter :: IsPrintCompositor o => Bool -> IO (GValueConstruct o)
- getPrintCompositorPrintFooter :: (MonadIO m, IsPrintCompositor o) => o -> m Bool
- setPrintCompositorPrintFooter :: (MonadIO m, IsPrintCompositor o) => o -> Bool -> m ()
- constructPrintCompositorPrintHeader :: IsPrintCompositor o => Bool -> IO (GValueConstruct o)
- getPrintCompositorPrintHeader :: (MonadIO m, IsPrintCompositor o) => o -> m Bool
- setPrintCompositorPrintHeader :: (MonadIO m, IsPrintCompositor o) => o -> Bool -> m ()
- constructPrintCompositorPrintLineNumbers :: IsPrintCompositor o => Word32 -> IO (GValueConstruct o)
- getPrintCompositorPrintLineNumbers :: (MonadIO m, IsPrintCompositor o) => o -> m Word32
- setPrintCompositorPrintLineNumbers :: (MonadIO m, IsPrintCompositor o) => o -> Word32 -> m ()
- constructPrintCompositorTabWidth :: IsPrintCompositor o => Word32 -> IO (GValueConstruct o)
- getPrintCompositorTabWidth :: (MonadIO m, IsPrintCompositor o) => o -> m Word32
- setPrintCompositorTabWidth :: (MonadIO m, IsPrintCompositor o) => o -> Word32 -> m ()
- constructPrintCompositorWrapMode :: IsPrintCompositor o => WrapMode -> IO (GValueConstruct o)
- getPrintCompositorWrapMode :: (MonadIO m, IsPrintCompositor o) => o -> m WrapMode
- setPrintCompositorWrapMode :: (MonadIO m, IsPrintCompositor o) => o -> WrapMode -> m ()
Exported types
newtype PrintCompositor Source #
Memory-managed wrapper type.
PrintCompositor (ManagedPtr PrintCompositor) |
Instances
GObject PrintCompositor Source # | |
Defined in GI.GtkSource.Objects.PrintCompositor gobjectType :: IO GType | |
HasParentTypes PrintCompositor Source # | |
Defined in GI.GtkSource.Objects.PrintCompositor | |
type ParentTypes PrintCompositor Source # | |
Defined in GI.GtkSource.Objects.PrintCompositor |
class (GObject o, IsDescendantOf PrintCompositor o) => IsPrintCompositor o Source #
Type class for types which can be safely cast to PrintCompositor
, for instance with toPrintCompositor
.
Instances
(GObject o, IsDescendantOf PrintCompositor o) => IsPrintCompositor o Source # | |
Defined in GI.GtkSource.Objects.PrintCompositor |
toPrintCompositor :: (MonadIO m, IsPrintCompositor o) => o -> m PrintCompositor Source #
Cast to PrintCompositor
, for types for which this is known to be safe. For general casts, use castTo
.
noPrintCompositor :: Maybe PrintCompositor Source #
A convenience alias for Nothing
:: Maybe
PrintCompositor
.
Methods
drawPage
printCompositorDrawPage Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a, IsPrintContext b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m () |
Draw page pageNr
for printing on the the Cairo context encapsuled in context
.
This method has been designed to be called in the handler of the PrintOperation
::draw_page
signal
as shown in the following example:
<informalexample><programlisting> // Signal handler for the GtkPrintOperation::draw_page signal
static void draw_page (GtkPrintOperation *operation, GtkPrintContext *context, gint page_nr, gpointer user_data) { GtkSourcePrintCompositor *compositor;
compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
gtk_source_print_compositor_draw_page (compositor, context, page_nr); } </programlisting></informalexample>
getBodyFontName
printCompositorGetBodyFontName Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Text | Returns: a new string containing the name of the font used to print the text body. |
Returns the name of the font used to print the text body. The returned string
must be freed with free
.
Since: 2.2
getBottomMargin
printCompositorGetBottomMargin Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Unit |
|
-> m Double | Returns: the bottom margin. |
Gets the bottom margin in units of unit
.
Since: 2.2
getBuffer
printCompositorGetBuffer Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Buffer | Returns: the |
Gets the Buffer
associated with the compositor. The returned
object reference is owned by the compositor object and
should not be unreferenced.
Since: 2.2
getFooterFontName
printCompositorGetFooterFontName Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Text | Returns: a new string containing the name of the font used to print the page footer. |
Returns the name of the font used to print the page footer.
The returned string must be freed with free
.
Since: 2.2
getHeaderFontName
printCompositorGetHeaderFontName Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Text | Returns: a new string containing the name of the font used to print the page header. |
Returns the name of the font used to print the page header.
The returned string must be freed with free
.
Since: 2.2
getHighlightSyntax
printCompositorGetHighlightSyntax Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Bool | Returns: |
Determines whether the printed text will be highlighted according to the buffer rules. Note that highlighting will happen only if the buffer to print has highlighting activated.
Since: 2.2
getLeftMargin
printCompositorGetLeftMargin Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Unit |
|
-> m Double | Returns: the left margin |
Gets the left margin in units of unit
.
Since: 2.2
getLineNumbersFontName
printCompositorGetLineNumbersFontName Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Text | Returns: a new string containing the name of the font used to print line numbers on the left margin. |
Returns the name of the font used to print line numbers on the left margin.
The returned string must be freed with free
.
Since: 2.2
getNPages
printCompositorGetNPages Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Int32 | Returns: the number of pages in the document or <code>-1</code> if the document has not been completely paginated. |
Returns the number of pages in the document or <code>-1</code> if the document has not been completely paginated.
Since: 2.2
getPaginationProgress
printCompositorGetPaginationProgress Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Double | Returns: a fraction from 0.0 to 1.0 inclusive. |
Returns the current fraction of the document pagination that has been completed.
Since: 2.2
getPrintFooter
printCompositorGetPrintFooter Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Bool | Returns: |
Determines if a footer is set to be printed for each page. A
footer will be printed if this function returns True
<emphasis>and</emphasis> some format strings have been specified
with printCompositorSetFooterFormat
.
Since: 2.2
getPrintHeader
printCompositorGetPrintHeader Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Bool | Returns: |
Determines if a header is set to be printed for each page. A
header will be printed if this function returns True
<emphasis>and</emphasis> some format strings have been specified
with printCompositorSetHeaderFormat
.
Since: 2.2
getPrintLineNumbers
printCompositorGetPrintLineNumbers Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Word32 | Returns: the interval of printed line numbers. |
Returns the interval used for line number printing. If the value is 0, no line numbers will be printed. The default value is 1 (i.e. numbers printed in all lines).
Since: 2.2
getRightMargin
printCompositorGetRightMargin Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Unit |
|
-> m Double | Returns: the right margin. |
Gets the right margin in units of unit
.
Since: 2.2
getTabWidth
printCompositorGetTabWidth Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m Word32 | Returns: width of tab. |
Returns the width of tabulation in characters for printed text.
Since: 2.2
getTopMargin
printCompositorGetTopMargin Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Unit |
|
-> m Double | Returns: the top margin. |
Gets the top margin in units of unit
.
Since: 2.2
getWrapMode
printCompositorGetWrapMode Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> m WrapMode | Returns: the line wrap mode. |
Gets the line wrapping mode for the printed text.
Since: 2.2
new
:: (HasCallStack, MonadIO m, IsBuffer a) | |
=> a |
|
-> m PrintCompositor | Returns: a new print compositor object. |
Creates a new print compositor that can be used to print buffer
.
Since: 2.2
newFromView
printCompositorNewFromView Source #
:: (HasCallStack, MonadIO m, IsView a) | |
=> a |
|
-> m PrintCompositor | Returns: a new print compositor object. |
Creates a new print compositor that can be used to print the buffer
associated with view
.
This constructor sets some configuration properties to make the
printed output match view
as much as possible. The properties set are
PrintCompositor
:tab-width
, PrintCompositor
:highlight-syntax
,
PrintCompositor
:wrap-mode
, PrintCompositor
:body-font-name
and
PrintCompositor
:print-line-numbers
.
Since: 2.2
paginate
printCompositorPaginate Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a, IsPrintContext b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Paginate the document associated with the compositor
.
In order to support non-blocking pagination, document is paginated in small chunks.
Each time printCompositorPaginate
is invoked, a chunk of the document
is paginated. To paginate the entire document, printCompositorPaginate
must be invoked multiple times.
It returns True
if the document has been completely paginated, otherwise it returns False
.
This method has been designed to be invoked in the handler of the PrintOperation
::paginate
signal,
as shown in the following example:
<informalexample><programlisting> // Signal handler for the GtkPrintOperation::paginate signal
static gboolean paginate (GtkPrintOperation *operation, GtkPrintContext *context, gpointer user_data) { GtkSourcePrintCompositor *compositor;
compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
if (gtk_source_print_compositor_paginate (compositor, context)) { gint n_pages;
n_pages = gtk_source_print_compositor_get_n_pages (compositor); gtk_print_operation_set_n_pages (operation, n_pages);
return TRUE; }
return FALSE; } </programlisting></informalexample>
If you don't need to do pagination in chunks, you can simply do it all in the
PrintOperation
::begin-print
handler, and set the number of pages from there, like
in the following example:
<informalexample><programlisting> // Signal handler for the GtkPrintOperation::begin-print signal
static void begin_print (GtkPrintOperation *operation, GtkPrintContext *context, gpointer user_data) { GtkSourcePrintCompositor *compositor; gint n_pages;
compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
while (!gtk_source_print_compositor_paginate (compositor, context));
n_pages = gtk_source_print_compositor_get_n_pages (compositor); gtk_print_operation_set_n_pages (operation, n_pages); } </programlisting></informalexample>
Since: 2.2
setBodyFontName
printCompositorSetBodyFontName Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the default font for the printed text.
fontName
should be a
string representation of a font description Pango can understand.
(e.g. "Monospace 10"). See fontDescriptionFromString
for a description of the format of the string representation.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setBottomMargin
printCompositorSetBottomMargin Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Double |
|
-> Unit |
|
-> m () |
Sets the bottom margin used by compositor
.
Since: 2.2
setFooterFontName
printCompositorSetFooterFontName Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the font for printing the page footer. If
Nothing
is supplied, the default font (i.e. the one being used for the
text) will be used instead.
fontName
should be a
string representation of a font description Pango can understand.
(e.g. "Monospace 10"). See fontDescriptionFromString
for a description of the format of the string representation.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setFooterFormat
printCompositorSetFooterFormat Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Bool |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m () |
See printCompositorSetHeaderFormat
for more information
about the parameters.
Since: 2.2
setHeaderFontName
printCompositorSetHeaderFontName Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the font for printing the page header. If
Nothing
is supplied, the default font (i.e. the one being used for the
text) will be used instead.
fontName
should be a
string representation of a font description Pango can understand.
(e.g. "Monospace 10"). See fontDescriptionFromString
for a description of the format of the string representation.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setHeaderFormat
printCompositorSetHeaderFormat Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Bool |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m () |
Sets strftime like header format strings, to be printed on the
left, center and right of the top of each page. The strings may
include strftime(3) codes which will be expanded at print time.
A subset of strftime()
codes are accepted, see dateTimeFormat
for more details on the accepted format specifiers.
Additionally the following format specifiers are accepted:
N
: the page numberQ
: the page count.
separator
specifies if a solid line should be drawn to separate
the header from the document text.
If Nothing
is given for any of the three arguments, that particular
string will not be printed.
For the header to be printed, in
addition to specifying format strings, you need to enable header
printing with printCompositorSetPrintHeader
.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setHighlightSyntax
printCompositorSetHighlightSyntax Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the printed text will be highlighted according to the buffer rules. Both color and font style are applied.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setLeftMargin
printCompositorSetLeftMargin Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Double |
|
-> Unit |
|
-> m () |
Sets the left margin used by compositor
.
Since: 2.2
setLineNumbersFontName
printCompositorSetLineNumbersFontName Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the font for printing line numbers on the left margin. If
Nothing
is supplied, the default font (i.e. the one being used for the
text) will be used instead.
fontName
should be a
string representation of a font description Pango can understand.
(e.g. "Monospace 10"). See fontDescriptionFromString
for a description of the format of the string representation.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setPrintFooter
printCompositorSetPrintFooter Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether you want to print a footer in each page. The
footer consists of three pieces of text and an optional line
separator, configurable with
printCompositorSetFooterFormat
.
Note that by default the footer format is unspecified, and if it's empty it will not be printed, regardless of this setting.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setPrintHeader
printCompositorSetPrintHeader Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether you want to print a header in each page. The
header consists of three pieces of text and an optional line
separator, configurable with
printCompositorSetHeaderFormat
.
Note that by default the header format is unspecified, and if it's empty it will not be printed, regardless of this setting.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setPrintLineNumbers
printCompositorSetPrintLineNumbers Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the interval for printed line numbers. If interval
is 0 no
numbers will be printed. If greater than 0, a number will be
printed every interval
lines (i.e. 1 will print all line numbers).
Maximum accepted value for interval
is 100.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setRightMargin
printCompositorSetRightMargin Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Double |
|
-> Unit |
|
-> m () |
Sets the right margin used by compositor
.
Since: 2.2
setTabWidth
printCompositorSetTabWidth Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the width of tabulation in characters for printed text.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
setTopMargin
printCompositorSetTopMargin Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> Double |
|
-> Unit |
|
-> m () |
Sets the top margin used by compositor
.
Since: 2.2
setWrapMode
printCompositorSetWrapMode Source #
:: (HasCallStack, MonadIO m, IsPrintCompositor a) | |
=> a |
|
-> WrapMode |
|
-> m () |
Sets the line wrapping mode for the printed text.
This function cannot be called anymore after the first call to the
printCompositorPaginate
function.
Since: 2.2
Properties
bodyFontName
Name of the font used for the text body.
Accepted values are strings representing a font description Pango can understand.
(e.g. "Monospace 10"). See fontDescriptionFromString
for a description of the format of the string representation.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
constructPrintCompositorBodyFontName :: IsPrintCompositor o => Text -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “body-font-name
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorBodyFontName :: (MonadIO m, IsPrintCompositor o) => o -> m (Maybe Text) Source #
Get the value of the “body-font-name
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #bodyFontName
setPrintCompositorBodyFontName :: (MonadIO m, IsPrintCompositor o) => o -> Text -> m () Source #
Set the value of the “body-font-name
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #bodyFontName:=
value ]
buffer
The GtkSourceBuffer object to print.
Since: 2.2
constructPrintCompositorBuffer :: (IsPrintCompositor o, IsBuffer a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “buffer
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorBuffer :: (MonadIO m, IsPrintCompositor o) => o -> m Buffer Source #
Get the value of the “buffer
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #buffer
footerFontName
Name of the font used to print page footer. If this property is unspecified, the text body font is used.
Accepted values are strings representing a font description Pango can understand.
(e.g. "Monospace 10"). See fontDescriptionFromString
for a description of the format of the string representation.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
clearPrintCompositorFooterFontName :: (MonadIO m, IsPrintCompositor o) => o -> m () Source #
Set the value of the “footer-font-name
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#footerFontName
constructPrintCompositorFooterFontName :: IsPrintCompositor o => Text -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “footer-font-name
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorFooterFontName :: (MonadIO m, IsPrintCompositor o) => o -> m (Maybe Text) Source #
Get the value of the “footer-font-name
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #footerFontName
setPrintCompositorFooterFontName :: (MonadIO m, IsPrintCompositor o) => o -> Text -> m () Source #
Set the value of the “footer-font-name
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #footerFontName:=
value ]
headerFontName
Name of the font used to print page header. If this property is unspecified, the text body font is used.
Accepted values are strings representing a font description Pango can understand.
(e.g. "Monospace 10"). See fontDescriptionFromString
for a description of the format of the string representation.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
clearPrintCompositorHeaderFontName :: (MonadIO m, IsPrintCompositor o) => o -> m () Source #
Set the value of the “header-font-name
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#headerFontName
constructPrintCompositorHeaderFontName :: IsPrintCompositor o => Text -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “header-font-name
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorHeaderFontName :: (MonadIO m, IsPrintCompositor o) => o -> m (Maybe Text) Source #
Get the value of the “header-font-name
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #headerFontName
setPrintCompositorHeaderFontName :: (MonadIO m, IsPrintCompositor o) => o -> Text -> m () Source #
Set the value of the “header-font-name
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #headerFontName:=
value ]
highlightSyntax
Whether to print the document with highlighted syntax.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
constructPrintCompositorHighlightSyntax :: IsPrintCompositor o => Bool -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “highlight-syntax
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorHighlightSyntax :: (MonadIO m, IsPrintCompositor o) => o -> m Bool Source #
Get the value of the “highlight-syntax
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #highlightSyntax
setPrintCompositorHighlightSyntax :: (MonadIO m, IsPrintCompositor o) => o -> Bool -> m () Source #
Set the value of the “highlight-syntax
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #highlightSyntax:=
value ]
lineNumbersFontName
Name of the font used to print line numbers on the left margin. If this property is unspecified, the text body font is used.
Accepted values are strings representing a font description Pango can understand.
(e.g. "Monospace 10"). See fontDescriptionFromString
for a description of the format of the string representation.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
clearPrintCompositorLineNumbersFontName :: (MonadIO m, IsPrintCompositor o) => o -> m () Source #
Set the value of the “line-numbers-font-name
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#lineNumbersFontName
constructPrintCompositorLineNumbersFontName :: IsPrintCompositor o => Text -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “line-numbers-font-name
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorLineNumbersFontName :: (MonadIO m, IsPrintCompositor o) => o -> m (Maybe Text) Source #
Get the value of the “line-numbers-font-name
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #lineNumbersFontName
setPrintCompositorLineNumbersFontName :: (MonadIO m, IsPrintCompositor o) => o -> Text -> m () Source #
Set the value of the “line-numbers-font-name
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #lineNumbersFontName:=
value ]
nPages
The number of pages in the document or <code>-1</code> if the document has not been completely paginated.
Since: 2.2
getPrintCompositorNPages :: (MonadIO m, IsPrintCompositor o) => o -> m Int32 Source #
Get the value of the “n-pages
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #nPages
printFooter
Whether to print a footer in each page.
Note that by default the footer format is unspecified, and if it is unspecified the footer will not be printed, regardless of the value of this property.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
constructPrintCompositorPrintFooter :: IsPrintCompositor o => Bool -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “print-footer
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorPrintFooter :: (MonadIO m, IsPrintCompositor o) => o -> m Bool Source #
Get the value of the “print-footer
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #printFooter
setPrintCompositorPrintFooter :: (MonadIO m, IsPrintCompositor o) => o -> Bool -> m () Source #
Set the value of the “print-footer
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #printFooter:=
value ]
printHeader
Whether to print a header in each page.
Note that by default the header format is unspecified, and if it is unspecified the header will not be printed, regardless of the value of this property.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
constructPrintCompositorPrintHeader :: IsPrintCompositor o => Bool -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “print-header
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorPrintHeader :: (MonadIO m, IsPrintCompositor o) => o -> m Bool Source #
Get the value of the “print-header
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #printHeader
setPrintCompositorPrintHeader :: (MonadIO m, IsPrintCompositor o) => o -> Bool -> m () Source #
Set the value of the “print-header
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #printHeader:=
value ]
printLineNumbers
Interval of printed line numbers. If this property is set to 0 no numbers will be printed. If greater than 0, a number will be printed every "print-line-numbers" lines (i.e. 1 will print all line numbers).
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
constructPrintCompositorPrintLineNumbers :: IsPrintCompositor o => Word32 -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “print-line-numbers
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorPrintLineNumbers :: (MonadIO m, IsPrintCompositor o) => o -> m Word32 Source #
Get the value of the “print-line-numbers
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #printLineNumbers
setPrintCompositorPrintLineNumbers :: (MonadIO m, IsPrintCompositor o) => o -> Word32 -> m () Source #
Set the value of the “print-line-numbers
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #printLineNumbers:=
value ]
tabWidth
Width of a tab character expressed in spaces.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
constructPrintCompositorTabWidth :: IsPrintCompositor o => Word32 -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tab-width
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorTabWidth :: (MonadIO m, IsPrintCompositor o) => o -> m Word32 Source #
Get the value of the “tab-width
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #tabWidth
setPrintCompositorTabWidth :: (MonadIO m, IsPrintCompositor o) => o -> Word32 -> m () Source #
Set the value of the “tab-width
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #tabWidth:=
value ]
wrapMode
Whether to wrap lines never, at word boundaries, or at character boundaries.
The value of this property cannot be changed anymore after the first
call to the printCompositorPaginate
function.
Since: 2.2
constructPrintCompositorWrapMode :: IsPrintCompositor o => WrapMode -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “wrap-mode
” property. This is rarely needed directly, but it is used by new
.
getPrintCompositorWrapMode :: (MonadIO m, IsPrintCompositor o) => o -> m WrapMode Source #
Get the value of the “wrap-mode
” property.
When overloading is enabled, this is equivalent to
get
printCompositor #wrapMode
setPrintCompositorWrapMode :: (MonadIO m, IsPrintCompositor o) => o -> WrapMode -> m () Source #
Set the value of the “wrap-mode
” property.
When overloading is enabled, this is equivalent to
set
printCompositor [ #wrapMode:=
value ]