EvinceDocument.Annotation

g EvinceDocument.Annotation EvinceDocument.Annotation GObject.Object GObject.Object GObject.Object->EvinceDocument.Annotation

Subclasses:

EvinceDocument.AnnotationAttachment, EvinceDocument.AnnotationText, EvinceDocument.AnnotationTextMarkup

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

equal (other)

get_annotation_type ()

get_area ()

get_color ()

get_contents ()

get_modified ()

get_name ()

get_page ()

get_page_index ()

get_rgba ()

set_area (area)

set_color (color)

set_contents (contents)

set_modified (modified)

set_modified_from_time (utime)

set_modified_from_time_t (utime)

set_name (name)

set_rgba (rgba)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

area

EvinceDocument.Rectangle

r/w

The area of the page where the annotation is placed

color

int

r/w

The annotation color deprecated

contents

str

r/w

The annotation contents

modified

str

r/w

Last modified date as string

name

str

r/w

The annotation unique name

page

EvinceDocument.Page

w/co

The page wehere the annotation is

rgba

Gdk.RGBA

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class EvinceDocument.Annotation(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

EvinceDocument.AnnotationClass

equal(other)
Parameters:

other (EvinceDocument.Annotation) – another EvinceDocument.Annotation

Returns:

True if self is equal to other, False otherwise

Return type:

bool

Compare self and other.

get_annotation_type()
Return type:

EvinceDocument.AnnotationType

get_area()
Returns:

a EvinceDocument.Rectangle to be filled with the annotation area

Return type:

area: EvinceDocument.Rectangle

Gets the area of self.

New in version 3.18.

get_color()
Returns:

a Gdk.Color to be filled with the Annotation color.

Return type:

color: Gdk.Color

Get the color of self.

Deprecated since version 3.6: Use EvinceDocument.Annotation.get_rgba() instead.

get_contents()
Returns:

a string with the contents of the annotation or None if self has no contents.

Return type:

str

Get the contents of self. The contents of self is the text that is displayed in the annotation, or an alternate description of the annotation’s content for non-text annotations

get_modified()
Returns:

A string containing the last modification date.

Return type:

str

Get the last modification date of self.

get_name()
Returns:

the string with the annotation’s name.

Return type:

str

Get the name of self. The name of the annotation is a string that uniquely indenftifies self amongs all the annotations in the same page.

get_page()
Returns:

the EvinceDocument.Page where self appears

Return type:

EvinceDocument.Page

Get the page where self appears.

get_page_index()
Returns:

the page index.

Return type:

int

Get the index of the page where self appears. Note that the index is 0 based.

get_rgba()
Returns:

a Gdk.RGBA to be filled with the annotation color

Return type:

rgba: Gdk.RGBA

Gets the color of self.

New in version 3.6.

set_area(area)
Parameters:

area (EvinceDocument.Rectangle) – a EvinceDocument.Rectangle

Returns:

True if the area has been changed, False otherwise

Return type:

bool

Set the area of the annotation to area.

New in version 3.18.

set_color(color)
Parameters:

color (Gdk.Color) – a Gdk.Color

Returns:

True when the color has been changed, False otherwise.

Return type:

bool

Set the color of the annotation to color. You can monitor changes to the annotation’s color by connecting to notify::color signal on self.

Deprecated since version 3.6: Use EvinceDocument.Annotation.set_rgba() instead.

set_contents(contents)
Parameters:

contents (str) –

Returns:

True if the contents have been changed, False otherwise.

Return type:

bool

Set the contents of self. You can monitor changes in the annotation’s contents by connecting to notify::contents signal of self.

set_modified(modified)
Parameters:

modified (str) – string with the last modification date.

Returns:

True if the last modification date has been updated, False otherwise.

Return type:

bool

Set the last modification date of self to modified. To set the last modification date using a #time_t, use EvinceDocument.Annotation.set_modified_from_time_t() instead. You can monitor changes to the last modification date by connecting to the notify::modified signal on self.

set_modified_from_time(utime)
Parameters:

utime (int) – a #GTime

Returns:

True if the last modified date has been updated, False otherwise.

Return type:

bool

Set the last modification date of self to utime. You can monitor changes to the last modification date by connecting to the notify::modified sinal on self. For the time-format used, see EvinceDocument.Document.misc_format_date().

Deprecated since version 3.42: use EvinceDocument.Annotation.set_modified_from_time_t instead as GTime is deprecated because it is not year-2038 safe

set_modified_from_time_t(utime)
Parameters:

utime (int) – a #time_t

Returns:

True if the last modified date has been updated, False otherwise.

Return type:

bool

Set the last modification date of self to utime. You can monitor changes to the last modification date by connecting to the notify::modified sinal on self. For the time-format used, see EvinceDocument.Document.misc_format_datetime().

set_name(name)
Parameters:

name (str) –

Returns:

True when the name has been changed, False otherwise.

Return type:

bool

Set the name of self. You can monitor changes of the annotation name by connecting to the notify::name signal on self.

set_rgba(rgba)
Parameters:

rgba (Gdk.RGBA) – a Gdk.RGBA

Returns:

True if the color has been changed, False otherwise

Return type:

bool

Set the color of the annotation to rgba.

New in version 3.6.

Property Details

EvinceDocument.Annotation.props.area
Name:

area

Type:

EvinceDocument.Rectangle

Default Value:

None

Flags:

READABLE, WRITABLE

The area of the page where the annotation is placed.

New in version 3.18.

EvinceDocument.Annotation.props.color
Name:

color

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE

The colour of the annotation as a Gdk.Color.

Deprecated since version 3.6: Use EvinceDocument.Annotation :rgba instead.

EvinceDocument.Annotation.props.contents
Name:

contents

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The annotation contents

EvinceDocument.Annotation.props.modified
Name:

modified

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Last modified date as string

EvinceDocument.Annotation.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The annotation unique name

EvinceDocument.Annotation.props.page
Name:

page

Type:

EvinceDocument.Page

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

The page wehere the annotation is

EvinceDocument.Annotation.props.rgba
Name:

rgba

Type:

Gdk.RGBA

Default Value:

None

Flags:

READABLE, WRITABLE

The colour of the annotation as a Gdk.RGBA.

New in version 3.6.