EomPrintPreview

EomPrintPreview

Functions

Properties

GObject * image Read / Write
float image-scale Read / Write
float image-x-align Read / Write
float image-y-align Read / Write
float page-bottom-margin Read / Write
float page-left-margin Read / Write
float page-right-margin Read / Write
float page-top-margin Read / Write
float paper-height Read / Write
float paper-width Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkFrame
                        ╰── GtkAspectFrame
                            ╰── EomPrintPreview

Implemented Interfaces

EomPrintPreview implements AtkImplementorIface and GtkBuildable.

Description

Functions

eom_print_preview_new ()

GtkWidget *
eom_print_preview_new (void);

Creates a new EomPrintPreview widget, setting it to the default values, and leaving the page empty. You still need to set the “image” property to make it useful.

Returns

A new and empty EomPrintPreview widget.


eom_print_preview_new_with_pixbuf ()

GtkWidget *
eom_print_preview_new_with_pixbuf (GdkPixbuf *pixbuf);

Creates a new EomPrintPreview widget, and sets the GdkPixbuf to preview on it.

Parameters

pixbuf

a GdkPixbuf

 

Returns

A new EomPrintPreview widget.


eom_print_preview_set_page_margins ()

void
eom_print_preview_set_page_margins (EomPrintPreview *preview,
                                    gfloat l_margin,
                                    gfloat r_margin,
                                    gfloat t_margin,
                                    gfloat b_margin);

Manually set the margins, in inches.

Parameters

preview

a EomPrintPreview

 

l_margin

Left margin.

 

r_margin

Right margin.

 

t_margin

Top margin.

 

b_margin

Bottom margin.

 

eom_print_preview_set_from_page_setup ()

void
eom_print_preview_set_from_page_setup (EomPrintPreview *preview,
                                       GtkPageSetup *setup);

Sets up the page properties from a GtkPageSetup. Useful when using the widget with the GtkPrint API.

Parameters

preview

a EomPrintPreview

 

setup

a GtkPageSetup to set the properties from

 

eom_print_preview_get_image_position ()

void
eom_print_preview_get_image_position (EomPrintPreview *preview,
                                      gdouble *x,
                                      gdouble *y);

Gets current image position in inches, relative to the margins. A (0, 0) position is the intersection between the left and top margins.

Parameters

preview

a EomPrintPreview

 

x

a pointer to a gdouble, or NULL to ignore it

 

y

a pointer to a gdouble, or NULL to ignore it

 

eom_print_preview_set_image_position ()

void
eom_print_preview_set_image_position (EomPrintPreview *preview,
                                      gdouble x,
                                      gdouble y);

Sets the image position. You can pass -1 to one of the coordinates if you only want to set the other.

Parameters

preview

a EomPrintPreview

 

x

The X coordinate, in inches, or -1 to ignore it.

 

y

The Y coordinate, in inches, or -1 to ignore it.

 

eom_print_preview_set_scale ()

void
eom_print_preview_set_scale (EomPrintPreview *preview,
                             gfloat scale);

Sets the scale for the image.

Parameters

preview

a EomPrintPreview

 

scale

a scale value, between 0 and 1.

 

Types and Values

struct EomPrintPreview

struct EomPrintPreview;

Property Details

The “image” property

  “image”                    GObject *

The "image" property defines the image that is previewed in the widget.

Owner: EomPrintPreview

Flags: Read / Write


The “image-scale” property

  “image-scale”              float

The "image-scale" property defines the scaling of the image that the user wants for the printing.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,1]

Default value: 1


The “image-x-align” property

  “image-x-align”            float

The "image-x-align" property defines the horizontal alignment of the image in the widget.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,1]

Default value: 0.5


The “image-y-align” property

  “image-y-align”            float

The "image-y-align" property defines the horizontal alignment of the image in the widget.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,1]

Default value: 0.5


The “page-bottom-margin” property

  “page-bottom-margin”       float

The size of the page's bottom margin, in inches.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,200]

Default value: 0.56


The “page-left-margin” property

  “page-left-margin”         float

The size of the page's left margin, in inches.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,100]

Default value: 0.25


The “page-right-margin” property

  “page-right-margin”        float

The size of the page's right margin, in inches.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,200]

Default value: 0.25


The “page-top-margin” property

  “page-top-margin”          float

The size of the page's top margin, in inches.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,100]

Default value: 0.25


The “paper-height” property

  “paper-height”             float

The height of the previewed paper, in inches.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,200]

Default value: 11


The “paper-width” property

  “paper-width”              float

The width of the previewed paper, in inches.

Owner: EomPrintPreview

Flags: Read / Write

Allowed values: [0,100]

Default value: 8.5

Signal Details

The “image-moved” signal

void
user_function (EomPrintPreview *preview,
               gpointer         user_data)

The “image-moved” signal is emitted when the position of the image is changed.

Parameters

preview

the object which received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First