PapersView.AnnotationsContext¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
w/co |
The document model |
||
w/co |
The undo context |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class PapersView.AnnotationsContext(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(model, undo_context)¶
- Parameters:
model (
PapersView.DocumentModel) –undo_context (
PapersView.UndoContext) –
- Return type:
- add_annotation_sync(page_index, type, start, end, color, user_data)¶
- Parameters:
page_index (
int) – the index of the page where the annotation will be addedtype (
PapersDocument.AnnotationType) – the type of annotation to addstart (
PapersDocument.Point) – point where to start creating an annotationend (
PapersDocument.Point) – point where to end creating the annotation. It is ignored for TEXT annotationscolor (
Gdk.RGBA) – the color to give to the annotationuser_data (
objectorNone) – a pointer with auxiliary data that is annotation-dependent
- Returns:
the newly created annotation
- Return type:
Add an annotation based on the provided information.
New in version 48.0.
- get_annot_at_doc_point(doc_point)¶
- Parameters:
doc_point (
PapersDocument.DocumentPoint) – the document point where to search for annotations- Returns:
the
PapersDocument.Annotation, if to be found- Return type:
New in version 49.0.
- get_annots_model()¶
- Returns:
the returned
Gio.ListModel. The model is owned but thePpsAnnotationsContextand shall not be modified outside of it.- Return type:
- remove_annotation(annot)¶
- Parameters:
annot (
PapersDocument.Annotation) –
Signal Details¶
- PapersView.AnnotationsContext.signals.annot_added(annotations_context, object)¶
- Signal Name:
annot-added- Flags:
- Parameters:
annotations_context (
PapersView.AnnotationsContext) – The object which received the signalobject (
PapersDocument.Annotation) –
- PapersView.AnnotationsContext.signals.annot_removed(annotations_context, object)¶
- Signal Name:
annot-removed- Flags:
- Parameters:
annotations_context (
PapersView.AnnotationsContext) – The object which received the signalobject (
PapersDocument.Annotation) –
- PapersView.AnnotationsContext.signals.annots_loaded(annotations_context)¶
- Signal Name:
annots-loaded- Flags:
- Parameters:
annotations_context (
PapersView.AnnotationsContext) – The object which received the signal
Property Details¶
- PapersView.AnnotationsContext.props.document_model¶
- Name:
document-model- Type:
- Default Value:
- Flags:
The document model
- PapersView.AnnotationsContext.props.undo_context¶
- Name:
undo-context- Type:
- Default Value:
- Flags:
The undo context