C# Class GnomeSubtitles.Ui.Edit.SubtitleEditTextView

Show file Open project: GNOME/gnome-subtitles

Public Methods

Method Description
DeleteText ( int startIndex, int endIndex ) : void
FocusOnSelection ( int startIndex, int endIndex ) : void
GetTextSelectionBounds ( int &start, int &end ) : bool

Gets the bounds of the current selection, if text is selected.

If no text is selected, both start and end will contain the index of the cursor position.

InsertText ( int startIndex, string text ) : void
LoadSubtitle ( Subtitle subtitle ) : void
ReplaceSelection ( string replacement ) : void
SubtitleEditTextView ( Gtk.TextView textView ) : GnomeSubtitles.Core

Protected Methods

Method Description
ChangeSubtitleTextContent ( Subtitle subtitle, string text ) : void
ClearFields ( ) : void
ExecuteDeleteCommand ( int index, string deletion, int cursor ) : void
ExecuteInsertCommand ( int index, string insertion ) : void
GetSpellActiveLanguage ( ) : SpellLanguage
GetSubtitleTextContent ( Subtitle subtitle ) : string
GetTextType ( ) : SubtitleTextType
OnSpellLanguageChanged ( ) : void
OnSpellToggleEnabled ( ) : void
OnSubtitleSelectionChanged ( Gtk.TreePath paths, Subtitle subtitle ) : void
SetVisibility ( bool visible ) : void
ToggleOverwriteSilent ( ) : void

Toggles the overwrite status without emitting its event.

Private Methods

Method Description
ApplyTag ( Gtk.TextTag tag, Gtk.TextIter start, Gtk.TextIter end, bool activate ) : void
ApplyTags ( ) : void
EmitToggleOverwrite ( ) : void
GetCursorIndex ( ) : int

Returns the cursor index, or -1 if the text view is not enabled.

GetIterAtInsertMark ( ) : Gtk.TextIter
GetLineColumn ( int &line, int &column ) : void
GetScrolledWindow ( ) : Gtk.ScrolledWindow
GrabFocus ( ) : void
GtkSpellAttach ( ) : void
GtkSpellDetach ( ) : void
GtkSpellSetLanguage ( SpellLanguage language ) : bool
IsGtkSpellAttached ( ) : bool
OnBaseInitFinished ( ) : void
OnBufferChanged ( object o, EventArgs args ) : void
OnBufferDeleteRange ( object o, Gtk.DeleteRangeArgs args ) : void
OnBufferInsertText ( object o, Gtk.InsertTextArgs args ) : void
OnBufferMarkSet ( object o, Gtk.MarkSetArgs args ) : void
OnDestroyed ( object o, EventArgs args ) : void
OnFocusIn ( object o, Gtk.FocusInEventArgs args ) : void
OnFocusOut ( object o, Gtk.FocusOutEventArgs args ) : void
OnKeyPressed ( object o, Gtk.KeyPressEventArgs args ) : void
OnToggleOverwrite ( object o, EventArgs args ) : void
PlaceCursor ( int index ) : void
SetFont ( SubLib style ) : void

Sets font with bold and italic if applicable.

SetText ( string text ) : void
UpdateLineColStatus ( ) : void
UpdateOverwriteStatus ( ) : void
gtkspell_detach ( IntPtr obj ) : void
gtkspell_new_attach ( IntPtr textView, string locale, IntPtr error ) : IntPtr
gtkspell_set_language ( IntPtr textView, string lang, IntPtr error ) : bool

Method Details

ChangeSubtitleTextContent() protected abstract method

protected abstract ChangeSubtitleTextContent ( Subtitle subtitle, string text ) : void
subtitle SubLib.Core.Domain.Subtitle
text string
return void

ClearFields() protected method

protected ClearFields ( ) : void
return void

DeleteText() public method

public DeleteText ( int startIndex, int endIndex ) : void
startIndex int
endIndex int
return void

ExecuteDeleteCommand() protected abstract method

protected abstract ExecuteDeleteCommand ( int index, string deletion, int cursor ) : void
index int
deletion string
cursor int
return void

ExecuteInsertCommand() protected abstract method

protected abstract ExecuteInsertCommand ( int index, string insertion ) : void
index int
insertion string
return void

FocusOnSelection() public method

public FocusOnSelection ( int startIndex, int endIndex ) : void
startIndex int
endIndex int
return void

GetSpellActiveLanguage() protected abstract method

protected abstract GetSpellActiveLanguage ( ) : SpellLanguage
return GnomeSubtitles.Core.SpellLanguage

GetSubtitleTextContent() protected abstract method

protected abstract GetSubtitleTextContent ( Subtitle subtitle ) : string
subtitle SubLib.Core.Domain.Subtitle
return string

GetTextSelectionBounds() public method

Gets the bounds of the current selection, if text is selected.
If no text is selected, both start and end will contain the index of the cursor position.
public GetTextSelectionBounds ( int &start, int &end ) : bool
start int The start index of the selection.
end int The end index of the selection.
return bool

GetTextType() protected abstract method

protected abstract GetTextType ( ) : SubtitleTextType
return SubtitleTextType

InsertText() public method

public InsertText ( int startIndex, string text ) : void
startIndex int
text string
return void

LoadSubtitle() public method

public LoadSubtitle ( Subtitle subtitle ) : void
subtitle SubLib.Core.Domain.Subtitle
return void

OnSpellLanguageChanged() protected method

protected OnSpellLanguageChanged ( ) : void
return void

OnSpellToggleEnabled() protected method

protected OnSpellToggleEnabled ( ) : void
return void

OnSubtitleSelectionChanged() protected method

protected OnSubtitleSelectionChanged ( Gtk.TreePath paths, Subtitle subtitle ) : void
paths Gtk.TreePath
subtitle SubLib.Core.Domain.Subtitle
return void

ReplaceSelection() public method

public ReplaceSelection ( string replacement ) : void
replacement string
return void

SetVisibility() protected method

protected SetVisibility ( bool visible ) : void
visible bool
return void

SubtitleEditTextView() public method

public SubtitleEditTextView ( Gtk.TextView textView ) : GnomeSubtitles.Core
textView Gtk.TextView
return GnomeSubtitles.Core

ToggleOverwriteSilent() protected method

Toggles the overwrite status without emitting its event.
protected ToggleOverwriteSilent ( ) : void
return void