C# Class GnomeSubtitles.Ui.View.SubtitleView

显示文件 Open project: GNOME/gnome-subtitles Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

Insert() public method

Inserts a subtitle in the specified path.
public Insert ( Subtitle subtitle, Gtk.TreePath path ) : void
subtitle SubLib.Core.Domain.Subtitle
path Gtk.TreePath
return void

Insert() public method

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.
return void

InsertNewAfter() public method

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.
return bool

InsertNewAt() public method

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.
return bool

InsertNewAt() public method

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
return bool

InsertNewBefore() public method

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.
return bool

RedrawPath() public method

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
return void

RedrawPaths() public method

public RedrawPaths ( Gtk.TreePath paths ) : void
paths Gtk.TreePath
return void

Refresh() public method

Refreshes the view.
This is currently limited to a TreeView.QueueDraw().
public Refresh ( ) : void
return void

Remove() public method

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.
return bool

Remove() public method

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.
return bool

SelectNextSubtitle() public method

Selects the subtitle below of current selected
public SelectNextSubtitle ( ) : bool
return bool

SetAutoSelectSubtitles() public method

public SetAutoSelectSubtitles ( bool active ) : void
active bool
return void

SubtitleView() public method

public SubtitleView ( ) : GnomeSubtitles.Core
return GnomeSubtitles.Core