PKHeX/PKHeX.Core/Editing/IPKMView.cs
Kurt d690f1c5d3 Check unsaved entity on sav export
Add setting to skip the unsaved entity check
Add setting to skip the overwrite? prompt and always call Save As

Change Overwrite prompt to have distinct buttons rather than rows that can be mis-clicked.

fix some comments/strings from Pokemon=>Pokémon

add some underline shortcut key for main menu for English translation
2026-02-22 11:11:16 -06:00

54 lines
1.9 KiB
C#

namespace PKHeX.Core;
/// <summary>
/// Simple interface representing a <see cref="PKM"/> viewer.
/// </summary>
public interface IPKMView
{
/// <summary>
/// Fetches the currently loaded <see cref="PKM"/> data from the viewer.
/// </summary>
PKM Data { get; }
/// <summary>
/// Indicates if the Viewer supports using Unicode characters or not.
/// </summary>
bool Unicode { get; }
/// <summary>
/// Indicates if the Viewer is providing extra flexibility or not.
/// </summary>
bool HaX { get; }
/// <summary>
/// Indicates if the Viewer's controls are changing their values and should avoid triggering other updates.
/// </summary>
bool ChangingFields { get; set; }
/// <summary>
/// Fetches the currently loaded <see cref="PKM"/> data from the viewer by finishing any pending changes or auto-modifications.
/// </summary>
/// <param name="click">Cause the viewer to do extra actions to force validation of its children.</param>
/// <returns>Prepared <see cref="PKM"/> data from the viewer.</returns>
PKM PreparePKM(bool click = true);
/// <summary>
/// Indicates if the currently loaded <see cref="PKM"/> data is ready for exporting.
/// </summary>
bool EditsComplete { get; }
/// <summary>
/// Loads a given <see cref="PKM"/> data to the viewer.
/// </summary>
/// <param name="pk">Pokémon data to load.</param>
/// <param name="focus">Cause the viewer to give focus to itself.</param>
/// <param name="skipConversionCheck">Cause the viewer to skip converting the data. Faster if it is known that the format is the same as the previous format.</param>
void PopulateFields(PKM pk, bool focus = true, bool skipConversionCheck = false);
/// <summary>
/// Messages back that the entity has been saved.
/// </summary>
/// <param name="pk">Pokémon data that was saved.</param>
void NotifyWasExported(PKM pk);
}