PKHeX/PKHeX.Core/Editing/IPKMView.cs
Kurt b81a1e1e29 Refactoring
Increase abstraction for arbitrary slot get/set operations, and fracture
SAV4 behavior for each game type.

Adds: Undo/Redo of party slot changes
Fixes: Fixed Gen5 daycare slot 2 reading, and EXP reading
Fixes: Some slot color glitchiness
Fixed: Box layout editor now hides the flag label if no flags are
present
Fixed: Gen7 box flags are now shown (unknown purpose lol)
Changed: savefile objects are generally smaller (removed a few shared
offset fields)
2019-09-02 19:30:58 -07:00

48 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);
}
}