PapersView.View

g 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 PapersView.View PapersView.View Gtk.Scrollable->PapersView.View Gtk.Widget->PapersView.View

Subclasses:

None

Methods

Inherited:

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

Structs:

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

class

get_resource ()

class

new ()

can_zoom_in ()

can_zoom_out ()

cancel_signature_rect ()

copy ()

copy_link_address (action)

current_event_is_type (type)

focus_annotation (annot_mapping)

get_allow_links_change_zoom ()

get_enable_spellchecking ()

get_mark_for_view_point (view_point_x, view_point_y)

get_selected_text ()

get_selections ()

handle_link (link)

has_selection ()

is_caret_navigation_enabled ()

is_loading ()

next_page ()

previous_page ()

reload ()

select_all ()

set_allow_links_change_zoom (allowed)

set_annotations_context (context)

set_caret_cursor_position (page, offset)

set_caret_navigation_enabled (enabled)

set_enable_spellchecking (spellcheck)

set_model (model)

set_page_cache_size (cache_size)

set_search_context (context)

start_signature_rect ()

supports_caret_navigation ()

zoom_in ()

zoom_out ()

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), 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

Signals

Inherited:

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

Name

Short Description

activate

cursor-moved

external-link

handle-link

layers-changed

move-cursor

popup

scroll

selection-changed

signature-rect

Fields

Inherited:

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

Name

Type

Access

Description

parent_instance

Gtk.Widget

r

Class Details

class PapersView.View(**kwargs)
Bases:

Gtk.Widget, Gtk.Scrollable

Abstract:

No

Structure:

PapersView.ViewClass

classmethod get_resource()
Return type:

Gio.Resource

classmethod new()
Return type:

PapersView.View

can_zoom_in()
Return type:

bool

can_zoom_out()
Return type:

bool

cancel_signature_rect()
copy()
Parameters:

action (PapersDocument.LinkAction) –

current_event_is_type(type)
Parameters:

type (Gdk.EventType) –

Return type:

bool

focus_annotation(annot_mapping)
Parameters:

annot_mapping (PapersDocument.Mapping) –

Return type:

bool

get_enable_spellchecking()
Return type:

bool

get_mark_for_view_point(view_point_x, view_point_y)
Parameters:
  • view_point_x (float) – the x coordinate over the view

  • view_point_y (float) – the y coordinate over the view

Returns:

a pointer to a PapersDocument.Mark that represents the location in the document for view_point_x and view_point_y. If the location is not in a page in the document, it returns None.

Return type:

PapersDocument.Mark or None

New in version 48.0.

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.

get_selections()
Returns:

a list with the current selections.

Return type:

[PapersView.ViewSelection]

New in version 48.0.

Parameters:

link (PapersDocument.Link) –

has_selection()
Return type:

bool

is_caret_navigation_enabled()
Return type:

bool

is_loading()
Return type:

bool

next_page()
Return type:

bool

previous_page()
Return type:

bool

reload()
select_all()
Parameters:

allowed (bool) –

set_annotations_context(context)
Parameters:

context (PapersView.AnnotationsContext) – the PapersView.AnnotationsContext to set

New in version 48.0.

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 (PapersView.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 PapersView.DocumentModel.set_max_scale() too.

set_search_context(context)
Parameters:

context (PapersView.SearchContext) –

start_signature_rect()
supports_caret_navigation()
Returns:

whether the document supports caret navigation

Return type:

bool

New in version 3.10.

zoom_in()
zoom_out()

Signal Details

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

activate

Flags:

RUN_FIRST, ACTION

Parameters:

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

PapersView.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:
PapersView.View.signals.layers_changed(view)
Signal Name:

layers-changed

Flags:

RUN_LAST, ACTION

Parameters:

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

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

move-cursor

Flags:

RUN_LAST, ACTION

Parameters:
Return type:

bool

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

popup

Flags:

RUN_LAST, ACTION

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

scroll

Flags:

RUN_LAST, ACTION

Parameters:
Return type:

bool

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

selection-changed

Flags:

RUN_LAST, ACTION

Parameters:

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

PapersView.View.signals.signature_rect(view, object, p0)
Signal Name:

signature-rect

Flags:

RUN_FIRST, ACTION

Parameters:

Property Details

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

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