Пример #1
0
 /// <summary>Creates a new instance of the <see cref="SubtitleSearchResults" /> class.</summary>
 /// <param name="subtitle">The zero-based number of the subtitle where the text was found.</param>
 /// <param name="textType">The type of text content where the text was found.</param>
 /// <param name="index">The zero-based position where the text was found, within a subtitle.</param>
 /// <param name="length">The length of the found text.</param>
 public SubtitleSearchResults(int subtitle, SubtitleTextType textType, int index, int length)
 {
     this.subtitle = subtitle;
     this.textType = textType;
     this.index    = index;
     this.length   = length;
 }
Пример #2
0
        public void SetActiveLanguageIndex(SubtitleTextType textType, int index)
        {
            bool isEmpty = ((index < 0) || (index >= languages.Length));

            SpellLanguage activeLanguage = null;

            if (isEmpty)
            {
                index = -1;
            }
            else
            {
                activeLanguage = languages[index] as SpellLanguage;
            }

            Logger.Info("[Spellcheck] Setting active {0} language: {1}", textType, (activeLanguage == null ? "none." : activeLanguage.ID));

            /* Set index variable */
            if (textType == SubtitleTextType.Text)
            {
                activeTextLanguageIndex = index;
            }
            else
            {
                activeTranslationLanguageIndex = index;
            }

            string activeLanguageID = (isEmpty ? String.Empty : activeLanguage.ID);

            SetActiveLanguageInConfig(textType, activeLanguageID);

            EmitLanguageChanged(textType);
        }
Пример #3
0
	protected SetLanguageDialog (SubtitleTextType textType) : base(gladeFilename) {
		this.textType = textType;

		SetDialogTitle(textType);
		SetIntroLabel(textType);
		FillAvailableLanguages();
		SelectActiveLanguage(textType);
	}
Пример #4
0
	private int GetActiveLanguageIndex (SubtitleTextType textType, int count) {
		int activeLanguageIndex = Base.SpellLanguages.GetActiveLanguageIndex(textType);
		/* Set active language to the first if invalid */
		if ((activeLanguageIndex == -1) || (activeLanguageIndex >= count))
			activeLanguageIndex = 0;

		return activeLanguageIndex;
	}
	/// <summary>Creates a new instance of the <see cref="SubtitleSearchOptions" /> class.</summary>
	/// <param name="regex">The regular expression to use when searching. It must be created with
	/// <see cref="RegexOptions.IgnoreCase" /> to perform a case-insensitive search.</param>
	/// <param name="textType">The type of text content the search is started at.</param>
	/// <param name="lineBreak">The line break to use between multiple lines of text in each subtitle.</param>
	/// <param name="startSubtitle">The zero-based number of the subtitle to start the search at.</param>
	/// <param name="startIndex">The zero-based position within the startSubtitle to start the search at.</param>
	/// <param name="wrap">Whether to continue the search from the beginning when it reaches the end of the subtitles.</param>
	/// <param name="backwards">Whether to search backwards. Note that regex must be constructed with the
	/// <see cref="RegexOptions.RightToLeft" /> option for backwards search to work.</param>
	public SubtitleSearchOptions (Regex regex, SubtitleTextType textType, string lineBreak, int startSubtitle, int startIndex, bool wrap, bool backwards) {
		this.regex = regex;
		this.textType = textType;
		this.lineBreak = lineBreak;
		this.startSubtitle = startSubtitle;
		this.startIndex = startIndex;
		this.wrap = wrap;
		this.backwards = backwards;
	}
Пример #6
0
	/* Public methods */

	/// <summary>Saves subtitles to the file with the specified properties.</summary>
	/// <param name="subtitles">The subtitles to save.</param>
	/// <param name="properties">The properties of the file to save the subtitles to. Its <see cref="TimingMode" /> property is used to
	/// choose the timing mode for subtitle formats that support both time and frame modes.</param>
	/// <param name="textType">The type of text content to save.</param>
	/// <remarks>An updated <see cref="SubLib.FileProperties" /> object can be accessed with <see cref="FileProperties" /> after saving.</remarks>
	public void Save (Subtitles subtitles, FileProperties properties, SubtitleTextType textType) {
		SubtitleFormat format = BuiltInSubtitleFormats.GetFormat(properties.SubtitleType);
		SubtitleOutput output = new SubtitleOutput(format, textType);

		string text = output.Build(subtitles.Collection, subtitles.Properties, properties);
		FileInputOutput.WriteFile(properties.Path, text, properties.Encoding);

		fileProperties = GetUpdatedFileProperties(properties);
		VerboseConsole.WriteLine("[*] Saved " + textType + " \"" + properties.Path + "\" with encoding \"" + properties.Encoding + "\", format \"" + format.Name + "\" and frame rate \"" + subtitles.Properties.CurrentFrameRate + "\"");
	}
Пример #7
0
 /// <summary>Creates a new instance of the <see cref="SubtitleSearchOptions" /> class.</summary>
 /// <param name="regex">The regular expression to use when searching. It must be created with
 /// <see cref="RegexOptions.IgnoreCase" /> to perform a case-insensitive search.</param>
 /// <param name="textType">The type of text content the search is started at.</param>
 /// <param name="lineBreak">The line break to use between multiple lines of text in each subtitle.</param>
 /// <param name="startSubtitle">The zero-based number of the subtitle to start the search at.</param>
 /// <param name="startIndex">The zero-based position within the startSubtitle to start the search at.</param>
 /// <param name="wrap">Whether to continue the search from the beginning when it reaches the end of the subtitles.</param>
 /// <param name="backwards">Whether to search backwards. Note that regex must be constructed with the
 /// <see cref="RegexOptions.RightToLeft" /> option for backwards search to work.</param>
 public SubtitleSearchOptions(Regex regex, SubtitleTextType textType, string lineBreak, int startSubtitle, int startIndex, bool wrap, bool backwards)
 {
     this.regex         = regex;
     this.textType      = textType;
     this.lineBreak     = lineBreak;
     this.startSubtitle = startSubtitle;
     this.startIndex    = startIndex;
     this.wrap          = wrap;
     this.backwards     = backwards;
 }
Пример #8
0
 public int GetActiveLanguageIndex(SubtitleTextType textType)
 {
     if (textType == SubtitleTextType.Text)
     {
         return(activeTextLanguageIndex);
     }
     else
     {
         return(activeTranslationLanguageIndex);
     }
 }
Пример #9
0
 private void SetActiveLanguageInConfig(SubtitleTextType textType, string activeLanguage)
 {
     if (textType == SubtitleTextType.Text)
     {
         Base.Config.SpellCheckTextLanguage = activeLanguage;
     }
     else
     {
         Base.Config.SpellCheckTranslationLanguage = activeLanguage;
     }
 }
Пример #10
0
	private void SelectActiveLanguage (SubtitleTextType textType) {
		int count = store.IterNChildren();
		if (count == 0)
			return;

		int activeLanguageIndex = GetActiveLanguageIndex(textType, count);

		TreePath path = Core.Util.IntToPath(activeLanguageIndex);
		languagesTreeView.ScrollToCell(path, null, true, 0.5f, 0.5f);
   		languagesTreeView.SetCursor(path, null, false);
	}
Пример #11
0
 private void EmitLanguageChanged(SubtitleTextType textType)
 {
     if (textType == SubtitleTextType.Text)
     {
         EmitTextLanguageChanged();
     }
     else
     {
         EmitTranslationLanguageChanged();
     }
 }
Пример #12
0
 private SubtitleSearchResults MatchValues(Match match, int subtitleNumber, SubtitleTextType textType, int charsBeforeMatchInput)
 {
     if (match.Success)
     {
         return(new SubtitleSearchResults(subtitleNumber, textType, match.Index + charsBeforeMatchInput, match.Length));
     }
     else
     {
         return(null);
     }
 }
Пример #13
0
 public void TextFocusOnSelection(int startIndex, int endIndex, SubtitleTextType textType)
 {
     if (textType == SubtitleTextType.Text)
     {
         textEdit.FocusOnSelection(startIndex, endIndex);
     }
     else
     {
         translationEdit.FocusOnSelection(startIndex, endIndex);
     }
 }
Пример #14
0
        private int GetActiveLanguageIndex(SubtitleTextType textType, int count)
        {
            int activeLanguageIndex = Base.SpellLanguages.GetActiveLanguageIndex(textType);

            /* Set active language to the first if invalid */
            if ((activeLanguageIndex == -1) || (activeLanguageIndex >= count))
            {
                activeLanguageIndex = 0;
            }

            return(activeLanguageIndex);
        }
Пример #15
0
        internal SubtitleText GetSubtitleText(int subtitleNumber, SubtitleTextType textType)
        {
            Subtitle subtitle = collection[subtitleNumber];

            if (textType == SubtitleTextType.Text)
            {
                return(subtitle.Text);
            }
            else
            {
                return(subtitle.Translation);
            }
        }
Пример #16
0
 /// <summary>Gets the indexes of the current text selection.</summary>
 /// <param name="start">The start of the selection.</param>
 /// <param name="end">The end of the selection.</param>
 /// <param name="textType">The type of text content selected.</param>
 /// <remarks>If no subtitle is being edited, both indexes are set to zero.
 /// If no text is selected, both indexes are set to the position of the cursor.</remarks>
 private void GetTextContentSelectionIndexes(out int start, out int end, out SubtitleTextType textType)
 {
     if (Base.Ui.Edit.Enabled && Base.Ui.Edit.TextOrTranslationIsFocus)
     {
         Base.Ui.Edit.GetTextSelectionBounds(out start, out end, out textType);
     }
     else
     {
         start    = 0;
         end      = 0;
         textType = SubtitleTextType.Text;
     }
 }
	protected SubtitleFileSaveAsDialog (SubtitleTextType textType) : base(gladeFilename) {
		dialog = GetDialog() as FileChooserDialog;

		this.textType = textType;
		SetTitle();

		InitEncodingComboBox();
		InitFormatComboBox();
		InitNewlineComboBox();

		SetDialogFromFileProperties();
		ConnectHandlers();
	}
Пример #18
0
        /* Public methods */

        /// <summary>Saves subtitles to the file with the specified properties.</summary>
        /// <param name="subtitles">The subtitles to save.</param>
        /// <param name="properties">The properties of the file to save the subtitles to. Its <see cref="TimingMode" /> property is used to
        /// choose the timing mode for subtitle formats that support both time and frame modes.</param>
        /// <param name="textType">The type of text content to save.</param>
        /// <remarks>An updated <see cref="SubLib.FileProperties" /> object can be accessed with <see cref="FileProperties" /> after saving.</remarks>
        public void Save(Subtitles subtitles, FileProperties properties, SubtitleTextType textType)
        {
            SubtitleFormat format = BuiltInSubtitleFormats.GetFormat(properties.SubtitleType);
            SubtitleOutput output = new SubtitleOutput(format, textType);

            string text = output.Build(subtitles.Collection, subtitles.Properties, properties);

            FileInputOutput.WriteFile(properties.Path, text, properties.Encoding);

            fileProperties = GetUpdatedFileProperties(properties);
            Logger.Info("[SubtitleSaver] Saved {0} \"{1}\" with encoding \"{2}\", format \"{3}\" and frame rate \"{4}\"",
                        textType, properties.Path, properties.Encoding, format.Name, subtitles.Properties.CurrentFrameRate);
        }
Пример #19
0
        public void SetPosition(SubtitleTextType textType, int lineNumber, int columnNumber)
        {
            //To translators: Trans corresponds to Translation (used here to denote whether text or translation is being edited).
            string type = (textType == SubtitleTextType.Text ? Catalog.GetString("Text") : Catalog.GetString("Trans"));
            //To translators: Ln corresponds to Line
            string line = Catalog.GetString("Ln");
            //To translators: Col corresponds to Column
            string column = Catalog.GetString("Col");

            string message = type + " " + line + " " + lineNumber + ", " + column + " " + columnNumber;

            ClearStatus(positionStatus);
            positionStatus.Push(0, message);
        }
Пример #20
0
        private void SelectActiveLanguage(TreeView treeView, SubtitleTextType textType)
        {
            int count = treeView.Model.IterNChildren();

            if (count == 0)
            {
                return;
            }

            int activeLanguageIndex = GetActiveLanguageIndex(textType, count);

            TreePath path = Core.Util.IntToPath(activeLanguageIndex);

            treeView.ScrollToCell(path, null, true, 0.5f, 0.5f);
            treeView.SetCursor(path, null, false);
        }
Пример #21
0
 public bool GetTextSelectionBounds(out int start, out int end, out SubtitleTextType textType)
 {
     if (textEdit.IsFocus)
     {
         textType = SubtitleTextType.Text;
         return(textEdit.GetTextSelectionBounds(out start, out end));
     }
     else if (translationEdit.IsFocus)
     {
         textType = SubtitleTextType.Translation;
         return(translationEdit.GetTextSelectionBounds(out start, out end));
     }
     else
     {
         textType = SubtitleTextType.Text;
         start    = -1;
         end      = -1;
         return(false);
     }
 }
Пример #22
0
        public SaveConfirmationDialog(string primaryText, SubtitleTextType textType) : base()
        {
            this.textType = textType;

            string filename = String.Empty;

            if (textType == SubtitleTextType.Text)
            {
                filename = Base.Document.TextFile.Filename;
            }
            else if (Base.Document.HasTranslationFileProperties)
            {
                filename = Base.Document.TranslationFile.Filename;
            }
            else
            {
                filename = Base.Document.UnsavedTranslationFilename;
            }

            SetText(primaryText, secondaryText, filename);
        }
Пример #23
0
 internal SubtitleOutput(SubtitleFormat format, SubtitleTextType textType)
 {
     this.format   = format;
     this.textType = textType;
 }
Пример #24
0
	private void SetIntroLabel (SubtitleTextType textType) {
		introLabel.TextWithMnemonic = (textType == SubtitleTextType.Text ? introLabelText : introLabelTranslation);
	}
Пример #25
0
	internal SubtitleOutput (SubtitleFormat format, SubtitleTextType textType) {
		this.format = format;
		this.textType = textType;
	}
Пример #26
0
        public SpellLanguage GetActiveLanguage(SubtitleTextType textType)
        {
            int index = GetActiveLanguageIndex(textType);

            return(GetLanguage(index));
        }
Пример #27
0
 /// <summary>Selects a <see cref="TreePath" />, activates it and selects text in the subtitle it refers to.</summary>
 /// <param name="path">The path to select. If it's null, all paths will be unselected.</param>
 /// <param name="align">Whether to align the selected path to the center if the path isn't visible and scrolling is needed.</param>
 /// <param name="reselect">Whether to reselect the path if it's already the only selected path.</param>
 /// <param name="start">The index to start the text selection with. This is also where the cursor is positioned.</param>
 /// <param name="end">The index to start the text selection with. This is also where the cursor is positioned.</param>
 /// <param name="textType">The type of text content to select.</param>
 public void Select(TreePath path, bool align, bool reselect, int start, int end, SubtitleTextType textType)
 {
     if (path == null)
     {
         UnselectAll();
         return;
     }
     Select(path, align, reselect);
     Core.Base.Ui.Edit.TextFocusOnSelection(start, end, textType);
 }
Пример #28
0
	private SubtitleSearchResults MatchValues (Match match, int subtitleNumber, SubtitleTextType textType, int charsBeforeMatchInput) {
		if (match.Success) {
			return new SubtitleSearchResults(subtitleNumber, textType, match.Index + charsBeforeMatchInput, match.Length);
		}
		else
			return null;
	}
Пример #29
0
	private SubtitleSearchResults FindInTextContentFromIndex (int subtitleNumber, string lineBreak, Regex regex, int startIndex, SubtitleTextType textType) {
		SubtitleText text = subtitles.GetSubtitleText(subtitleNumber, textType);
		return MatchValues(regex.Match(text.Get(lineBreak), startIndex), subtitleNumber, textType, 0);
	}
Пример #30
0
        /// <returns>The <see cref="SubtitleSearchResults" />, or null if the text was not found.</returns>
        private SubtitleSearchResults FindInSubtitleTillIndex(int subtitleNumber, string lineBreak, Regex regex, int endIndex, SubtitleTextType textType, bool backwards)
        {
            if (backwards)
            {
                if (textType == SubtitleTextType.Text)
                {
                    /* Find first in the translation */
                    SubtitleSearchResults results = FindInTextContent(subtitleNumber, lineBreak, regex, SubtitleTextType.Translation);
                    if (results != null)
                    {
                        return(results);
                    }

                    /* Not found in the text, finding in the text till the specified index */
                    return(FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, SubtitleTextType.Text, backwards));
                }
                else
                {
                    /* Find in the translation till specified index */
                    return(FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, SubtitleTextType.Translation, backwards));
                }
            }
            else
            {
                if (textType == SubtitleTextType.Text)
                {
                    /* Find in the text ending at the specified index */
                    return(FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, SubtitleTextType.Text, backwards));
                }
                else
                {
                    /* Find first in the text */
                    SubtitleSearchResults results = FindInTextContent(subtitleNumber, lineBreak, regex, SubtitleTextType.Text);
                    if (results != null)
                    {
                        return(results);
                    }

                    /* Not found in the text, finding in the translation till the specified index */
                    return(FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, SubtitleTextType.Translation, backwards));
                }
            }
        }
Пример #31
0
	private SubtitleSearchResults FindInTextContentTillIndex (int subtitleNumber, string lineBreak, Regex regex, int endIndex, SubtitleTextType textType, bool backwards) {
		SubtitleText text = subtitles.GetSubtitleText(subtitleNumber, textType);
		string subtitleText = text.Get(lineBreak);

		if (backwards) {
			string subtitleTextSubstring = subtitleText.Substring(endIndex);
			return MatchValues(regex.Match(subtitleTextSubstring), subtitleNumber, textType, endIndex);
		}
		else {
			string subtitleTextSubstring = subtitleText.Substring(0, endIndex);
			return MatchValues(regex.Match(subtitleTextSubstring), subtitleNumber, textType, 0);
		}
	}
Пример #32
0
	/// <returns>The <see cref="SubtitleSearchResults" />, or null if the text was not found.</returns>
	private SubtitleSearchResults FindInSubtitleTillIndex (int subtitleNumber, string lineBreak, Regex regex, int endIndex, SubtitleTextType textType, bool backwards) {
		if (backwards) {
			if (textType == SubtitleTextType.Text) {
				/* Find first in the translation */
				SubtitleSearchResults results = FindInTextContent(subtitleNumber, lineBreak, regex, SubtitleTextType.Translation);
				if (results != null)
					return results;

				/* Not found in the text, finding in the text till the specified index */
				return FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, SubtitleTextType.Text, backwards);
			}
			else {
				/* Find in the translation till specified index */
				return FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, SubtitleTextType.Translation, backwards);
			}
		}
		else {
			if (textType == SubtitleTextType.Text) {
				/* Find in the text ending at the specified index */
				return FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, SubtitleTextType.Text, backwards);
			}
			else {
				/* Find first in the text */
				SubtitleSearchResults results = FindInTextContent(subtitleNumber, lineBreak, regex, SubtitleTextType.Text);
				if (results != null)
					return results;

				/* Not found in the text, finding in the translation till the specified index */
				return FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, SubtitleTextType.Translation, backwards);
			}
		}
	}
Пример #33
0
        public void SetActiveLanguage(SubtitleTextType textType, string languageID)
        {
            int index = GetLanguageIndex(languageID);

            SetActiveLanguageIndex(textType, index);
        }
Пример #34
0
	private void SetDialogTitle (SubtitleTextType textType) {
		GetDialog().Title = (textType == SubtitleTextType.Text ? dialogTitleText : dialogTitleTranslation);
	}
Пример #35
0
	private bool SaveFile (SubLib.Core.Domain.Subtitles subtitles, FileProperties properties, SubtitleTextType textType) {
		try {
			SubtitleSaver saver = new SubtitleSaver();
			saver.Save(subtitles, properties, textType);
			return true;
		}
		catch (Exception e) {
			Console.Error.WriteLine("Caught exception saving backup file: " + e);
			return false;
		}
	}
Пример #36
0
 public SaveSubtitlesOnCloseFileConfirmationDialog(string primaryText, SubtitleTextType textType) : base(primaryText, textType)
 {
 }
Пример #37
0
        private SubtitleSearchResults FindInTextContentFromIndex(int subtitleNumber, string lineBreak, Regex regex, int startIndex, SubtitleTextType textType)
        {
            SubtitleText text = subtitles.GetSubtitleText(subtitleNumber, textType);

            return(MatchValues(regex.Match(text.Get(lineBreak), startIndex), subtitleNumber, textType, 0));
        }
Пример #38
0
 /// <summary>Creates a new instance of the <see cref="SubtitleSearchOptions" /> class.</summary>
 /// <param name="regex">The regular expression to use when searching. It must be created with
 /// <see cref="RegexOptions.IgnoreCase" /> to perform a case-insensitive search.</param>
 /// <param name="textType">The type of text content the search is started at.</param>
 /// <param name="startSubtitle">The zero-based number of the subtitle to start the search at.</param>
 /// <param name="startIndex">The zero-based position within the startSubtitle to start the search at.</param>
 /// <param name="wrap">Whether to continue the search from the beginning when it reaches the end of the subtitles.</param>
 /// <param name="backwards">Whether to search backwards. Note that regex must be constructed with the
 /// <see cref="RegexOptions.RightToLeft" /> option for backwards search to work.</param>
 /// <remarks>The newline character (\n) is used as lineBreak.</remarks>
 public SubtitleSearchOptions(Regex regex, SubtitleTextType textType, int startSubtitle, int startIndex, bool wrap, bool backwards)
     : this(regex, textType, "\n", startSubtitle, startIndex, wrap, backwards)
 {
 }
Пример #39
0
 private bool SaveFile(SubLib.Core.Domain.Subtitles subtitles, FileProperties properties, SubtitleTextType textType)
 {
     try {
         SubtitleSaver saver = new SubtitleSaver();
         saver.Save(subtitles, properties, textType);
         return(true);
     }
     catch (Exception e) {
         Logger.Error(e, "Caught an exception while saving backup file");
         return(false);
     }
 }
Пример #40
0
	/// <summary>Creates a new instance of the <see cref="SubtitleSearchOptions" /> class.</summary>
	/// <param name="regex">The regular expression to use when searching. It must be created with
	/// <see cref="RegexOptions.IgnoreCase" /> to perform a case-insensitive search.</param>
	/// <param name="textType">The type of text content the search is started at.</param>
	/// <param name="startSubtitle">The zero-based number of the subtitle to start the search at.</param>
	/// <param name="startIndex">The zero-based position within the startSubtitle to start the search at.</param>
	/// <param name="wrap">Whether to continue the search from the beginning when it reaches the end of the subtitles.</param>
	/// <param name="backwards">Whether to search backwards. Note that regex must be constructed with the
	/// <see cref="RegexOptions.RightToLeft" /> option for backwards search to work.</param>
	/// <remarks>The newline character (\n) is used as lineBreak.</remarks>
	public SubtitleSearchOptions (Regex regex, SubtitleTextType textType, int startSubtitle, int startIndex, bool wrap, bool backwards)
		: this(regex, textType, "\n", startSubtitle, startIndex, wrap, backwards) {
	}
Пример #41
0
        private SubtitleSearchResults FindInTextContentTillIndex(int subtitleNumber, string lineBreak, Regex regex, int endIndex, SubtitleTextType textType, bool backwards)
        {
            SubtitleText text         = subtitles.GetSubtitleText(subtitleNumber, textType);
            string       subtitleText = text.Get(lineBreak);

            if (backwards)
            {
                string subtitleTextSubstring = subtitleText.Substring(endIndex);
                return(MatchValues(regex.Match(subtitleTextSubstring), subtitleNumber, textType, endIndex));
            }
            else
            {
                string subtitleTextSubstring = subtitleText.Substring(0, endIndex);
                return(MatchValues(regex.Match(subtitleTextSubstring), subtitleNumber, textType, 0));
            }
        }
Пример #42
0
	internal SubtitleText GetSubtitleText (int subtitleNumber, SubtitleTextType textType) {
		Subtitle subtitle = collection[subtitleNumber];
		if (textType == SubtitleTextType.Text)
			return subtitle.Text;
		else
			return subtitle.Translation;
	}
Пример #43
0
	/// <summary>Creates a new instance of the <see cref="SubtitleSearchResults" /> class.</summary>
	/// <param name="subtitle">The zero-based number of the subtitle where the text was found.</param>
	/// <param name="textType">The type of text content where the text was found.</param>
	/// <param name="index">The zero-based position where the text was found, within a subtitle.</param>
	/// <param name="length">The length of the found text.</param>
	public SubtitleSearchResults (int subtitle, SubtitleTextType textType, int index, int length) {
		this.subtitle = subtitle;
		this.textType = textType;
		this.index = index;
		this.length = length;
	}