EvinceView.View

g EvinceView.View EvinceView.View GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget Gtk.Scrollable Gtk.Scrollable GObject.GInterface->Gtk.Scrollable GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Scrollable->EvinceView.View Gtk.Widget->EvinceView.View

Subclasses:

None

Methods

Inherited:

Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (18), Gtk.Buildable (1), Gtk.Scrollable (9)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

get_resource ()

class

new ()

add_text_markup_annotation_for_selected_text ()

autoscroll_start ()

autoscroll_stop ()

begin_add_annotation (annot_type)

can_zoom_in ()

can_zoom_out ()

cancel_add_annotation ()

copy ()

copy_link_address (action)

current_event_is_type (type)

find_cancel ()

find_next ()

find_previous ()

find_restart (page)

find_search_changed ()

find_set_highlight_search (value)

find_set_result (page, result)

find_started (job)

focus_annotation (annot_mapping)

get_allow_links_change_zoom ()

get_enable_spellchecking ()

get_page_extents (page, page_area, border)

get_page_extents_for_border (page, border, page_area)

get_selected_text ()

handle_link (link)

has_selection ()

hide_cursor ()

highlight_forward_search (link)

is_caret_navigation_enabled ()

is_loading ()

next_page ()

previous_page ()

reload ()

remove_annotation (annot)

select_all ()

set_allow_links_change_zoom (allowed)

set_caret_cursor_position (page, offset)

set_caret_navigation_enabled (enabled)

set_enable_spellchecking (spellcheck)

set_model (model)

set_page_cache_size (cache_size)

show_cursor ()

supports_caret_navigation ()

zoom_in ()

zoom_out ()

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (7), Gtk.Buildable (9), Gtk.Scrollable (1)

Properties

Inherited:

Gtk.Widget (35), Gtk.Accessible (1), Gtk.Scrollable (4)

Name

Type

Flags

Short Description

can-zoom-in

bool

r

Whether the view can be zoomed in further

can-zoom-out

bool

r

Whether the view can be zoomed out further

is-loading

bool

r

Whether the view is loading

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Short Description

activate

annot-added

annot-cancel-add

annot-changed

annot-removed

cursor-moved

external-link

handle-link

layers-changed

move-cursor

popup

scroll

selection-changed

sync-source

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Widget

r

Class Details

class EvinceView.View(**kwargs)
Bases:

Gtk.Widget, Gtk.Scrollable

Abstract:

No

Structure:

EvinceView.ViewClass

classmethod get_resource()
Return type:

Gio.Resource

classmethod new()
Return type:

EvinceView.View

add_text_markup_annotation_for_selected_text()
Returns:

True if annotations were added successfully, False otherwise.

Return type:

bool

Adds a Text Markup annotation (defaulting to a ‘highlight’ one) to the currently selected text on the document.

When the selected text spans more than one page, it will add a corresponding annotation for each page that contains selected text.

New in version 3.30.

autoscroll_start()
autoscroll_stop()
begin_add_annotation(annot_type)
Parameters:

annot_type (EvinceDocument.AnnotationType) –

can_zoom_in()
Return type:

bool

can_zoom_out()
Return type:

bool

cancel_add_annotation()
copy()
Parameters:

action (EvinceDocument.LinkAction) –

current_event_is_type(type)
Parameters:

type (Gdk.EventType) –

Return type:

bool

find_cancel()
find_next()
find_previous()
find_restart(page)
Parameters:

page (int) – a page index

Restart the current search operation from the given page.

New in version 3.12.

find_search_changed()
Parameters:

value (bool) –

find_set_result(page, result)
Parameters:
  • page (int) –

  • result (int) –

FIXME

New in version 3.10.

find_started(job)
Parameters:

job (EvinceView.JobFind) –

New in version 3.6.

focus_annotation(annot_mapping)
Parameters:

annot_mapping (EvinceDocument.Mapping) –

Return type:

bool

get_enable_spellchecking()
Return type:

bool

get_page_extents(page, page_area, border)
Parameters:
Return type:

bool

get_page_extents_for_border(page, border, page_area)
Parameters:
Return type:

bool

get_selected_text()
Returns:

The string representing selected text.

Return type:

str

Returns a pointer to a constant string containing the selected text in the view.

The value returned may be None if there is no selected text.

New in version 3.30.

Parameters:

link (EvinceDocument.Link) –

has_selection()
Return type:

bool

hide_cursor()
Parameters:

link (EvinceDocument.SourceLink) –

is_caret_navigation_enabled()
Return type:

bool

is_loading()
Returns:

True iff the view is currently loading a document

Return type:

bool

New in version 3.8.

next_page()
Return type:

bool

previous_page()
Return type:

bool

reload()
remove_annotation(annot)
Parameters:

annot (EvinceDocument.Annotation) –

select_all()
Parameters:

allowed (bool) –

set_caret_cursor_position(page, offset)
Parameters:
  • page (int) –

  • offset (int) –

New in version 3.10.

set_caret_navigation_enabled(enabled)
Parameters:

enabled (bool) – whether to enable caret navigation mode

Enables or disables caret navigation mode for the document.

New in version 3.10.

set_enable_spellchecking(spellcheck)
Parameters:

spellcheck (bool) –

set_model(model)
Parameters:

model (EvinceView.DocumentModel) –

set_page_cache_size(cache_size)
Parameters:

cache_size (int) – size in bytes

Sets the maximum size in bytes that will be used to cache rendered pages. Use 0 to disable caching rendered pages.

Note that this limit doesn’t affect the current visible page range, which will always be rendered. In order to limit the total memory used you have to use EvinceView.DocumentModel.set_max_scale() too.

show_cursor()
supports_caret_navigation()
Returns:

whether the document supports caret navigation

Return type:

bool

New in version 3.10.

zoom_in()
zoom_out()

Signal Details

EvinceView.View.signals.activate(view)
Signal Name:

activate

Flags:

RUN_FIRST, ACTION

Parameters:

view (EvinceView.View) – The object which received the signal

EvinceView.View.signals.annot_added(view, object)
Signal Name:

annot-added

Flags:

RUN_LAST, ACTION

Parameters:
EvinceView.View.signals.annot_cancel_add(view)
Signal Name:

annot-cancel-add

Flags:

RUN_LAST, ACTION

Parameters:

view (EvinceView.View) – The object which received the signal

EvinceView.View.signals.annot_changed(view, object)
Signal Name:

annot-changed

Flags:

RUN_LAST, ACTION

Parameters:
EvinceView.View.signals.annot_removed(view, object)
Signal Name:

annot-removed

Flags:

RUN_LAST, ACTION

Parameters:
EvinceView.View.signals.cursor_moved(view, object, p0)
Signal Name:

cursor-moved

Flags:

RUN_LAST

Parameters:
Signal Name:

external-link

Flags:

RUN_LAST, ACTION

Parameters:
Signal Name:

handle-link

Flags:

RUN_LAST, ACTION

Parameters:
EvinceView.View.signals.layers_changed(view)
Signal Name:

layers-changed

Flags:

RUN_LAST, ACTION

Parameters:

view (EvinceView.View) – The object which received the signal

EvinceView.View.signals.move_cursor(view, object, p0, p1)
Signal Name:

move-cursor

Flags:

RUN_LAST, ACTION

Parameters:
Return type:

bool

EvinceView.View.signals.popup(view, object, p0, p1)
Signal Name:

popup

Flags:

RUN_LAST, ACTION

Parameters:
EvinceView.View.signals.scroll(view, object, p0)
Signal Name:

scroll

Flags:

RUN_LAST, ACTION

Parameters:
Return type:

bool

EvinceView.View.signals.selection_changed(view)
Signal Name:

selection-changed

Flags:

RUN_LAST, ACTION

Parameters:

view (EvinceView.View) – The object which received the signal

EvinceView.View.signals.sync_source(view, object)
Signal Name:

sync-source

Flags:

RUN_LAST, ACTION

Parameters:

Property Details

EvinceView.View.props.can_zoom_in
Name:

can-zoom-in

Type:

bool

Default Value:

True

Flags:

READABLE

Whether the view can be zoomed in further

New in version 3.8.

EvinceView.View.props.can_zoom_out
Name:

can-zoom-out

Type:

bool

Default Value:

True

Flags:

READABLE

Whether the view can be zoomed out further

New in version 3.8.

EvinceView.View.props.is_loading
Name:

is-loading

Type:

bool

Default Value:

False

Flags:

READABLE

Allows to implement a custom notification system.

New in version 3.8.