/*
Copyright (C) 2014-2019 de4dot@gmail.com
This file is part of dnSpy
dnSpy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
dnSpy is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with dnSpy. If not, see .
*/
using System;
using System.Collections.Generic;
using dnSpy.Contracts.Text;
using Microsoft.VisualStudio.Text.Editor;
namespace dnSpy.Contracts.Settings.Groups {
///
/// Contains a group of s that share a subset of all options
///
public interface ITextViewOptionsGroup {
///
/// Gets all text views in this group
///
IEnumerable TextViews { get; }
///
/// Raised when an option has changed
///
event EventHandler? TextViewOptionChanged;
///
/// Returns true if the option is shared by all text views in this group
///
/// Content type, eg.
/// Option name
///
bool HasOption(string contentType, string optionId);
///
/// Returns true if the option is shared by all text views in this group
///
/// Value type
/// Content type, eg.
/// Option
///
bool HasOption(string contentType, EditorOptionKey option);
///
/// Gets the current value
///
/// Content type, eg.
/// Option name
///
object? GetOptionValue(string contentType, string optionId);
///
/// Gets the current value
///
/// Value type
/// Content type, eg.
/// Option
///
T GetOptionValue(string contentType, EditorOptionKey option);
///
/// Writes a new value
///
/// Content type, eg.
/// Option name
/// New value
void SetOptionValue(string contentType, string optionId, object? value);
///
/// Writes a new value
///
/// Value type
/// Content type, eg.
/// Option
/// New value
void SetOptionValue(string contentType, EditorOptionKey option, T value);
}
}