Evince View Library Reference Manual: ev-document-model

## ev-document-model ev-document-model |

## Synopsis

    enum                EvSizingMode;
    enum                EvPageLayout;
                        EvDocumentModel;
                        EvDocumentModelClass;
    EvDocumentModel *   ev_document_model_new               (void);
    EvDocumentModel *   ev_document_model_new_with_document (EvDocument *document);
    void                ev_document_model_set_document      (EvDocumentModel *model,
                                                             EvDocument *document);
    EvDocument *        ev_document_model_get_document      (EvDocumentModel *model);
    void                ev_document_model_set_page          (EvDocumentModel *model,
                                                             gint page);
    void                ev_document_model_set_page_by_label (EvDocumentModel *model,
                                                             const gchar *page_label);
    gint                ev_document_model_get_page          (EvDocumentModel *model);
    void                ev_document_model_set_scale         (EvDocumentModel *model,
                                                             gdouble scale);
    gdouble             ev_document_model_get_scale         (EvDocumentModel *model);
    void                ev_document_model_set_max_scale     (EvDocumentModel *model,
                                                             gdouble max_scale);
    gdouble             ev_document_model_get_max_scale     (EvDocumentModel *model);
    void                ev_document_model_set_min_scale     (EvDocumentModel *model,
                                                             gdouble min_scale);
    gdouble             ev_document_model_get_min_scale     (EvDocumentModel *model);
    void                ev_document_model_set_sizing_mode   (EvDocumentModel *model,
                                                             EvSizingMode mode);
    EvSizingMode        ev_document_model_get_sizing_mode   (EvDocumentModel *model);
    void                ev_document_model_set_rotation      (EvDocumentModel *model,
                                                             gint rotation);
    gint                ev_document_model_get_rotation      (EvDocumentModel *model);
    void                ev_document_model_set_inverted_colors
                                                            (EvDocumentModel *model,
                                                             gboolean inverted_colors);
    gboolean            ev_document_model_get_inverted_colors
                                                            (EvDocumentModel *model);
    void                ev_document_model_set_continuous    (EvDocumentModel *model,
                                                             gboolean continuous);
    gboolean            ev_document_model_get_continuous    (EvDocumentModel *model);
    void                ev_document_model_set_dual_page_odd_pages_left
                                                            (EvDocumentModel *model,
                                                             gboolean odd_left);
    gboolean            ev_document_model_get_dual_page_odd_pages_left
                                                            (EvDocumentModel *model);
    void                ev_document_model_set_page_layout   (EvDocumentModel *model,
                                                             EvPageLayout layout);
    EvPageLayout        ev_document_model_get_page_layout   (EvDocumentModel *model);
    void                ev_document_model_set_fullscreen    (EvDocumentModel *model,
                                                             gboolean fullscreen);
    gboolean            ev_document_model_get_fullscreen    (EvDocumentModel *model);

    void                ev_document_model_set_dual_page     (EvDocumentModel *model,
                                                             gboolean dual_page);
    gboolean            ev_document_model_get_dual_page     (EvDocumentModel *model);

## Object Hierarchy

      GEnum
       +----EvSizingMode

      GEnum
       +----EvPageLayout

      GObject
       +----EvDocumentModel

## Properties

      "continuous"               gboolean              : Read / Write
      "document"                 EvDocument*           : Read / Write
      "dual-odd-left"            gboolean              : Read / Write
      "dual-page"                gboolean              : Read / Write
      "fullscreen"               gboolean              : Read / Write
      "inverted-colors"          gboolean              : Read / Write
      "max-scale"                gdouble               : Read / Write
      "min-scale"                gdouble               : Read / Write
      "page"                     gint                  : Read / Write
      "page-layout"              EvPageLayout          : Read / Write
      "rotation"                 gint                  : Read / Write
      "scale"                    gdouble               : Read / Write
      "sizing-mode"              EvSizingMode          : Read / Write

## Signals

      "page-changed"                                   : Run Last

## Description

## Details

### enum EvSizingMode

    typedef enum {
            EV_SIZING_FIT_PAGE,
    	EV_SIZING_BEST_FIT = EV_SIZING_FIT_PAGE, /* Deprecated */
    	EV_SIZING_FIT_WIDTH,
    	EV_SIZING_FREE,
            EV_SIZING_AUTOMATIC,
    } EvSizingMode;

`EV_SIZING_FIT_PAGE` |
`EV_SIZING_BEST_FIT` |
`EV_SIZING_FIT_WIDTH` |
`EV_SIZING_FREE` |
`EV_SIZING_AUTOMATIC` |

### enum EvPageLayout

    typedef enum {
    	EV_PAGE_LAYOUT_SINGLE,
    	EV_PAGE_LAYOUT_DUAL,
    	EV_PAGE_LAYOUT_AUTOMATIC,
    } EvPageLayout;

`EV_PAGE_LAYOUT_SINGLE` |
`EV_PAGE_LAYOUT_DUAL` |
`EV_PAGE_LAYOUT_AUTOMATIC` |

### EvDocumentModel

    typedef struct _EvDocumentModel EvDocumentModel;

### EvDocumentModelClass

    typedef struct _EvDocumentModelClass EvDocumentModelClass;

### ev_document_model_new ()

    EvDocumentModel *   ev_document_model_new               (void);

### ev_document_model_new_with_document ()

    EvDocumentModel *   ev_document_model_new_with_document (EvDocument *document);

### ev_document_model_set_document ()

    void                ev_document_model_set_document      (EvDocumentModel *model,
                                                             EvDocument *document);

### ev_document_model_get_document ()

    EvDocument *        ev_document_model_get_document      (EvDocumentModel *model);

### ev_document_model_set_page ()

    void                ev_document_model_set_page          (EvDocumentModel *model,
                                                             gint page);

### ev_document_model_set_page_by_label ()

    void                ev_document_model_set_page_by_label (EvDocumentModel *model,
                                                             const gchar *page_label);

### ev_document_model_get_page ()

    gint                ev_document_model_get_page          (EvDocumentModel *model);

### ev_document_model_set_scale ()

    void                ev_document_model_set_scale         (EvDocumentModel *model,
                                                             gdouble scale);

### ev_document_model_get_scale ()

    gdouble             ev_document_model_get_scale         (EvDocumentModel *model);

### ev_document_model_set_max_scale ()

    void                ev_document_model_set_max_scale     (EvDocumentModel *model,
                                                             gdouble max_scale);

### ev_document_model_get_max_scale ()

    gdouble             ev_document_model_get_max_scale     (EvDocumentModel *model);

### ev_document_model_set_min_scale ()

    void                ev_document_model_set_min_scale     (EvDocumentModel *model,
                                                             gdouble min_scale);

### ev_document_model_get_min_scale ()

    gdouble             ev_document_model_get_min_scale     (EvDocumentModel *model);

### ev_document_model_set_sizing_mode ()

    void                ev_document_model_set_sizing_mode   (EvDocumentModel *model,
                                                             EvSizingMode mode);

### ev_document_model_get_sizing_mode ()

    EvSizingMode        ev_document_model_get_sizing_mode   (EvDocumentModel *model);

### ev_document_model_set_rotation ()

    void                ev_document_model_set_rotation      (EvDocumentModel *model,
                                                             gint rotation);

### ev_document_model_get_rotation ()

    gint                ev_document_model_get_rotation      (EvDocumentModel *model);

### ev_document_model_set_inverted_colors ()

    void                ev_document_model_set_inverted_colors
                                                            (EvDocumentModel *model,
                                                             gboolean inverted_colors);

### ev_document_model_get_inverted_colors ()

    gboolean            ev_document_model_get_inverted_colors
                                                            (EvDocumentModel *model);

### ev_document_model_set_continuous ()

    void                ev_document_model_set_continuous    (EvDocumentModel *model,
                                                             gboolean continuous);

### ev_document_model_get_continuous ()

    gboolean            ev_document_model_get_continuous    (EvDocumentModel *model);

### ev_document_model_set_dual_page_odd_pages_left ()

    void                ev_document_model_set_dual_page_odd_pages_left
                                                            (EvDocumentModel *model,
                                                             gboolean odd_left);

### ev_document_model_get_dual_page_odd_pages_left ()

    gboolean            ev_document_model_get_dual_page_odd_pages_left
                                                            (EvDocumentModel *model);

### ev_document_model_set_page_layout ()

    void                ev_document_model_set_page_layout   (EvDocumentModel *model,
                                                             EvPageLayout layout);

Since 3.8

### ev_document_model_get_page_layout ()

    EvPageLayout        ev_document_model_get_page_layout   (EvDocumentModel *model);

Since 3.8

### ev_document_model_set_fullscreen ()

    void                ev_document_model_set_fullscreen    (EvDocumentModel *model,
                                                             gboolean fullscreen);

### ev_document_model_get_fullscreen ()

    gboolean            ev_document_model_get_fullscreen    (EvDocumentModel *model);

### ev_document_model_set_dual_page ()

    void                ev_document_model_set_dual_page     (EvDocumentModel *model,
                                                             gboolean dual_page);

### Warning

`ev_document_model_set_dual_page` has been deprecated since version 3.8 and should not be used in newly-written code. Use `ev_document_model_set_page_layout()` instead

### ev_document_model_get_dual_page ()

    gboolean            ev_document_model_get_dual_page     (EvDocumentModel *model);

### Warning

`ev_document_model_get_dual_page` has been deprecated since version 3.8 and should not be used in newly-written code. Use `ev_document_model_get_page_layout()` instead

## Property Details

### The `"continuous"` property

      "continuous"               gboolean              : Read / Write

Whether document is displayed in continuous mode.

Default value: TRUE

### The `"document"` property

      "document"                 EvDocument*           : Read / Write

The current document.

### The `"dual-odd-left"` property

      "dual-odd-left"            gboolean              : Read / Write

Whether odd pages are displayed on left side in dual mode.

Default value: FALSE

### The `"dual-page"` property

      "dual-page"                gboolean              : Read / Write

Whether document is displayed in dual page mode.

Default value: FALSE

### The `"fullscreen"` property

      "fullscreen"               gboolean              : Read / Write

Whether document is displayed in fullscreen mode.

Default value: FALSE

### The `"inverted-colors"` property

      "inverted-colors"          gboolean              : Read / Write

Whether document is displayed with inverted colors.

Default value: FALSE

### The `"max-scale"` property

      "max-scale"                gdouble               : Read / Write

Maximum scale factor.

Allowed values: >= 0

Default value: 5

### The `"min-scale"` property

      "min-scale"                gdouble               : Read / Write

Minium scale factor.

Allowed values: >= 0

Default value: 0.25

### The `"page"` property

      "page"                     gint                  : Read / Write

Current page.

Allowed values: >= -1

Default value: -1

### The `"page-layout"` property

      "page-layout"              EvPageLayout          : Read / Write

Current page layout.

Default value: EV_PAGE_LAYOUT_SINGLE

### The `"rotation"` property

      "rotation"                 gint                  : Read / Write

Current rotation angle.

Allowed values: [0,360]

Default value: 0

### The `"scale"` property

      "scale"                    gdouble               : Read / Write

Current scale factor.

Allowed values: >= 0

Default value: 1

### The `"sizing-mode"` property

      "sizing-mode"              EvSizingMode          : Read / Write

Current sizing mode.

Default value: EV_SIZING_FIT_WIDTH

## Signal Details

### The `"page-changed"` signal

    void                user_function                      (EvDocumentModel *evdocumentmodel,
                                                            gint             arg1,
                                                            gint             arg2,
                                                            gpointer         user_data)            : Run Last