ClapperGtk.TitleLabel

g ClapperGtk.TitleLabel ClapperGtk.TitleLabel 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 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.Widget->ClapperGtk.TitleLabel

Subclasses:

None

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)

Structs:

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

class

new ()

get_current_title ()

get_fallback_to_uri ()

get_media_item ()

set_fallback_to_uri (enabled)

set_media_item (item)

Virtual Methods

Inherited:

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

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

current-title

str

r/en

fallback-to-uri

bool

r/w/en

media-item

Clapper.MediaItem

r/w/en

Signals

Inherited:

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

Fields

Inherited:

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

Class Details

class ClapperGtk.TitleLabel(**kwargs)
Bases:

Gtk.Widget

Abstract:

No

Structure:

ClapperGtk.TitleLabelClass

A label showing an up to date title of media item.

By default ClapperGtk.TitleLabel will automatically show title of [property`Clapper`.Queue:current-item] when placed within [class`ClapperGtk`.Video] widget hierarchy.

Setting [property`ClapperGtk`.TitleLabel:media-item] property will make it show title of that particular [class`Clapper`.MediaItem] instead. Providing an item to read title from also allows using this [class`Gtk`.Widget] outside of [class`ClapperGtk`.Video].

classmethod new()
Returns:

a new title label Gtk.Widget.

Return type:

Gtk.Widget

Creates a new ClapperGtk.TitleLabel instance.

get_current_title()
Returns:

text of title label.

Return type:

str

Get currently displayed title by self.

get_fallback_to_uri()
Returns:

True when item URI will be used as fallback, False otherwise.

Return type:

bool

Get whether a [property`Clapper`.MediaItem:uri] property is going be displayed as a label text when no other title could be determined.

get_media_item()
Returns:

currently set media item.

Return type:

Clapper.MediaItem or None

Get currently set media item to display title of.

set_fallback_to_uri(enabled)
Parameters:

enabled (bool) – whether enabled

Set whether a [property`Clapper`.MediaItem:uri] property should be displayed as a label text when no other title could be determined.

set_media_item(item)
Parameters:

item (Clapper.MediaItem or None) – a Clapper.MediaItem

Set a media item to display title of as label. When set to None, self will use default behavior (showing title of current queue item).

Property Details

ClapperGtk.TitleLabel.props.current_title
Name:

current-title

Type:

str

Default Value:

None

Flags:

READABLE, EXPLICIT_NOTIFY

Currently displayed title.

ClapperGtk.TitleLabel.props.fallback_to_uri
Name:

fallback-to-uri

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

When title cannot be determined, show URI instead.

ClapperGtk.TitleLabel.props.media_item
Name:

media-item

Type:

Clapper.MediaItem

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Currently set media item to display title of.