/* 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 dnSpy.Contracts.Hex.Editor; using VSUTIL = Microsoft.VisualStudio.Utilities; namespace dnSpy.Contracts.Hex.Intellisense { /// /// Intellisense session /// public abstract class HexIntellisenseSession : VSUTIL.IPropertyOwner { /// /// Constructor /// protected HexIntellisenseSession() => Properties = new VSUTIL.PropertyCollection(); /// /// Gets all properties /// public VSUTIL.PropertyCollection Properties { get; } /// /// Gets the trigger point /// public abstract HexCellPosition TriggerPoint { get; } /// /// Gets the hex view /// public abstract HexView HexView { get; } /// /// Gets the presenter /// public abstract HexIntellisensePresenter? Presenter { get; } /// /// Raised after is changed /// public abstract event EventHandler? PresenterChanged; /// /// Starts the session /// public abstract void Start(); /// /// Dismisses the session /// public abstract void Dismiss(); /// /// Raised after is called /// public abstract event EventHandler? Dismissed; /// /// true if the session has been dismissed /// public abstract bool IsDismissed { get; } /// /// Recalculates the state /// public abstract void Recalculate(); /// /// Raised after is called /// public abstract event EventHandler? Recalculated; /// /// Tries to get a match /// /// public abstract bool Match(); /// /// Collapses the UI, or if it's not collapsible, closes the UI /// public abstract void Collapse(); } }