C# Класс GnomeSubtitles.Ui.View.SubtitleView

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Insert ( Subtitle subtitle, Gtk.TreePath path ) : void

Inserts a subtitle in the specified path.

Insert ( Subtitle subtitles, Gtk.TreePath paths, Gtk.TreePath focus ) : void

Inserts a collection of subtitles in the specified paths.

InsertNewAfter ( Gtk.TreePath path ) : bool

Inserts a new subtitle after the specified TreePath.

The new subtitle's timings are based on the subtitle at the specified path.

InsertNewAt ( Gtk.TreePath path ) : bool

Inserts a new subtitle at the specified TreePath.

InsertNewAt ( Gtk.TreePath path, System.TimeSpan start ) : bool

Inserts a new subtitle at the specified TreePath, with the specified start time.

InsertNewBefore ( Gtk.TreePath path ) : bool

Inserts a new subtitle before the specified TreePath.

The new subtitle's timings are based on the subtitle at the specified path.

RedrawPath ( Gtk.TreePath path ) : void

Instructs the TreeView to redraw a row.

This is useful when a row changes its width, for instance.

RedrawPaths ( Gtk.TreePath paths ) : void
Refresh ( ) : void

Refreshes the view.

This is currently limited to a TreeView.QueueDraw().

Remove ( Gtk.TreePath paths ) : bool

Removes the subtitles at the specified paths and selects the next subtitle afterwards.

Remove ( Gtk.TreePath path, bool selectNext ) : bool

Removes the subtitle at the specified path and selects the next or previous subtitle afterwards.

SelectNextSubtitle ( ) : bool

Selects the subtitle below of current selected

SetAutoSelectSubtitles ( bool active ) : void
SubtitleView ( ) : GnomeSubtitles.Core

Приватные методы

Метод Описание
CreateColumns ( ) : void
EmitSubtitleCountChangedEvent ( ) : void
FindNearIndex ( int removedIndex, bool findNext ) : int

Finds the index that's near a row that has been removed at the specified index.

GetStyleMarkup ( SubLib subtitleStyle, string &prefix, string &suffix ) : void
Load ( Subtitles subtitles ) : void

Loads the subtitles

OnBaseDocumentLoaded ( Document document ) : void
OnBaseDocumentUnloaded ( Document document ) : void
OnBaseInitFinished ( ) : void
OnBaseTimingModeChanged ( TimingMode timingMode ) : void
OnBaseTranslationLoaded ( ) : void
OnBaseTranslationUnloaded ( ) : void
OnCurrentSubtitleChanged ( int subtitleIndex ) : void
OnModelRowDeleted ( object o, Gtk.RowDeletedArgs args ) : void
OnModelRowInserted ( object o, Gtk.RowInsertedArgs args ) : void
OnViewLineLengthsToggled ( object o, EventArgs args ) : void
RenderDurationCell ( Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter ) : void
RenderEndCell ( Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter ) : void
RenderNumberCell ( Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel treeModel, Gtk.TreeIter iter ) : void
RenderStartCell ( Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter ) : void
RenderSubtitleTextCell ( Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel treeModel, Gtk.TreeIter iter ) : void
RenderTextCell ( Gtk.CellRendererText renderer, Gtk.TreeIter iter, SubtitleText subtitleText, SubLib subtitleStyle ) : void
RenderTranslationTextCell ( Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel treeModel, Gtk.TreeIter iter ) : void
SetEmptyModel ( ) : void
SetTranslationVisible ( bool visible ) : void

Описание методов

Insert() публичный Метод

Inserts a subtitle in the specified path.
public Insert ( Subtitle subtitle, Gtk.TreePath path ) : void
subtitle SubLib.Core.Domain.Subtitle
path Gtk.TreePath
Результат void

Insert() публичный Метод

Inserts a collection of subtitles in the specified paths.
public Insert ( Subtitle subtitles, Gtk.TreePath paths, Gtk.TreePath focus ) : void
subtitles SubLib.Core.Domain.Subtitle The subtitles to insert.
paths Gtk.TreePath The paths corresponding to each of the subtitles. There must be the same number of paths as there are for subtitles.
focus Gtk.TreePath The path that should be given the focus.
Результат void

InsertNewAfter() публичный Метод

Inserts a new subtitle after the specified TreePath.
The new subtitle's timings are based on the subtitle at the specified path.
public InsertNewAfter ( Gtk.TreePath path ) : bool
path Gtk.TreePath The path after which the new subtitle will be inserted.
Результат bool

InsertNewAt() публичный Метод

Inserts a new subtitle at the specified TreePath.
public InsertNewAt ( Gtk.TreePath path ) : bool
path Gtk.TreePath The path at which the new subtitle will be inserted.
Результат bool

InsertNewAt() публичный Метод

Inserts a new subtitle at the specified TreePath, with the specified start time.
public InsertNewAt ( Gtk.TreePath path, System.TimeSpan start ) : bool
path Gtk.TreePath The path at which the new subtitle will be inserted.
start System.TimeSpan
Результат bool

InsertNewBefore() публичный Метод

Inserts a new subtitle before the specified TreePath.
The new subtitle's timings are based on the subtitle at the specified path.
public InsertNewBefore ( Gtk.TreePath path ) : bool
path Gtk.TreePath The path before which the new subtitle will be inserted.
Результат bool

RedrawPath() публичный Метод

Instructs the TreeView to redraw a row.
This is useful when a row changes its width, for instance.
public RedrawPath ( Gtk.TreePath path ) : void
path Gtk.TreePath
Результат void

RedrawPaths() публичный Метод

public RedrawPaths ( Gtk.TreePath paths ) : void
paths Gtk.TreePath
Результат void

Refresh() публичный Метод

Refreshes the view.
This is currently limited to a TreeView.QueueDraw().
public Refresh ( ) : void
Результат void

Remove() публичный Метод

Removes the subtitles at the specified paths and selects the next subtitle afterwards.
public Remove ( Gtk.TreePath paths ) : bool
paths Gtk.TreePath The paths to remove.
Результат bool

Remove() публичный Метод

Removes the subtitle at the specified path and selects the next or previous subtitle afterwards.
public Remove ( Gtk.TreePath path, bool selectNext ) : bool
path Gtk.TreePath The path to remove.
selectNext bool Whether to select the next path after deletion, if possible. /// Otherwise, the previous will be selected, if possible.
Результат bool

SelectNextSubtitle() публичный Метод

Selects the subtitle below of current selected
public SelectNextSubtitle ( ) : bool
Результат bool

SetAutoSelectSubtitles() публичный Метод

public SetAutoSelectSubtitles ( bool active ) : void
active bool
Результат void

SubtitleView() публичный Метод

public SubtitleView ( ) : GnomeSubtitles.Core
Результат GnomeSubtitles.Core