// Don't modify, generated file from /build/libresprite/src/libresprite/data/pref.xml

#pragma once

#include <string>

namespace app {
namespace gen {

  enum class RightClickMode {
    DEFAULT = 0,
    PAINT_BGCOLOR = 0,
    PICK_FGCOLOR = 1,
    ERASE = 2,
    SCROLL = 3,
  };

  enum class OnionskinType {
    MERGE = 0,
    RED_BLUE_TINT = 1,
  };

  enum class BrushType {
    CIRCLE = 0,
    SQUARE = 1,
    LINE = 2,
  };

  enum class BrushPreview {
    NONE = 0,
    EDGES = 1,
    FULL = 2,
  };

  enum class BgType {
    CHECKED_16x16 = 0,
    CHECKED_8x8 = 1,
    CHECKED_4x4 = 2,
    CHECKED_2x2 = 3,
  };

  enum class StopAtGrid {
    NEVER = 0,
    IF_VISIBLE = 1,
    ALWAYS = 2,
  };

  enum class FillReferTo {
    ACTIVE_LAYER = 0,
    ALL_LAYERS = 1,
  };

  enum class EyedropperChannel {
    COLOR_ALPHA = 0,
    COLOR = 1,
    ALPHA = 2,
    RGBA = 3,
    RGB = 4,
    HSVA = 5,
    HSV = 6,
    GRAYA = 7,
    GRAY = 8,
    INDEX = 9,
  };

  enum class EyedropperSample {
    ALL_LAYERS = 0,
    CURRENT_LAYER = 1,
  };

  enum class SelectionMode {
    DEFAULT = 0,
    ADD = 1,
    SUBTRACT = 2,
  };

  enum class PivotPosition {
    NORTHWEST = 0,
    NORTH = 1,
    NORTHEAST = 2,
    WEST = 3,
    CENTER = 4,
    EAST = 5,
    SOUTHWEST = 6,
    SOUTH = 7,
    SOUTHEAST = 8,
  };

  enum class SymmetryMode {
    NONE = 0,
    HORIZONTAL = 1,
    VERTICAL = 2,
    BOTH = 3,
  };

  class GlobalPref : public Section {
  public:
    GlobalPref(const std::string& name);
    void load();
    void save();

    class General : public Section {
    public:
      General(const std::string& name);
      void load();
      void save();
      Option<std::string> language;
      Option<int> screenScale;
      Option<bool> gpuAcceleration;
      Option<bool> visibleTimeline;
      Option<bool> verticalTimeline;
      Option<bool> autoshowTimeline;
      Option<bool> leftToolBar;
      Option<bool> rewindOnStop;
      Option<bool> expandMenubarOnMouseover;
      Option<bool> dataRecovery;
      Option<int> dataRecoveryPeriod;
      Option<bool> showFullPath;
    };
    General general;

    class Undo : public Section {
    public:
      Undo(const std::string& name);
      void load();
      void save();
      Option<int> sizeLimit;
      Option<bool> gotoModified;
      Option<bool> allowNonlinearHistory;
    };
    Undo undo;

    class Editor : public Section {
    public:
      Editor(const std::string& name);
      void load();
      void save();
      Option<bool> zoomWithWheel;
      Option<bool> zoomWithSlide;
      Option<bool> zoomFromCenterWithWheel;
      Option<bool> zoomFromCenterWithKeys;
      Option<bool> showScrollbars;
      Option<RightClickMode> rightClickMode;
      Option<bool> autoSelectLayer;
      Option<app::Color> cursorColor;
      Option<BrushPreview> brushPreview;
      Option<bool> playOnce;
    };
    Editor editor;

    class Preview : public Section {
    public:
      Preview(const std::string& name);
      void load();
      void save();
      Option<bool> playOnce;
    };
    Preview preview;

    class Theme : public Section {
    public:
      Theme(const std::string& name);
      void load();
      void save();
      Option<std::string> selected;
      Option<std::string> font;
      Option<std::string> miniFont;
    };
    Theme theme;

    class Experimental : public Section {
    public:
      Experimental(const std::string& name);
      void load();
      void save();
      Option<int> uiScale;
      Option<bool> useNativeCursor;
      Option<bool> useNativeFileDialog;
      Option<bool> flashLayer;
    };
    Experimental experimental;

    class TouchBar : public Section {
    public:
      TouchBar(const std::string& name);
      void load();
      void save();
      Option<bool> visible;
      Option<bool> alternatePosition;
    };
    TouchBar touchBar;

    class StatusBar : public Section {
    public:
      StatusBar(const std::string& name);
      void load();
      void save();
      Option<bool> focusFrameFieldOnMouseover;
    };
    StatusBar statusBar;

    class ColorBar : public Section {
    public:
      ColorBar(const std::string& name);
      void load();
      void save();
      Option<int> boxSize;
      Option<app::Color> fgColor;
      Option<app::Color> bgColor;
      Option<app::ColorBar::ColorSelector> selector;
      Option<bool> discreteWheel;
      Option<int> wheelModel;
      Option<int> harmony;
    };
    ColorBar colorBar;

    class Brush : public Section {
    public:
      Brush(const std::string& name);
      void load();
      void save();
      Option<doc::BrushPattern> pattern;
    };
    Brush brush;

    class SaveBrush : public Section {
    public:
      SaveBrush(const std::string& name);
      void load();
      void save();
      Option<bool> brushType;
      Option<bool> brushSize;
      Option<bool> brushAngle;
      Option<bool> fgColor;
      Option<bool> bgColor;
      Option<bool> inkType;
      Option<bool> inkOpacity;
      Option<bool> shade;
      Option<bool> pixelPerfect;
    };
    SaveBrush saveBrush;

    class Selection : public Section {
    public:
      Selection(const std::string& name);
      void load();
      void save();
      Option<SelectionMode> mode;
      Option<bool> pivotVisibility;
      Option<PivotPosition> pivotPosition;
      Option<bool> opaque;
      Option<bool> autoOpaque;
      Option<bool> keepSelectionAfterClear;
      Option<app::Color> transparentColor;
      Option<app::tools::RotationAlgorithm> rotationAlgorithm;
      Option<int> modifySelectionQuantity;
      Option<BrushType> modifySelectionBrush;
    };
    Selection selection;

    class Quantization : public Section {
    public:
      Quantization(const std::string& name);
      void load();
      void save();
      Option<bool> withAlpha;
    };
    Quantization quantization;

    class Eyedropper : public Section {
    public:
      Eyedropper(const std::string& name);
      void load();
      void save();
      Option<EyedropperChannel> channel;
      Option<EyedropperSample> sample;
    };
    Eyedropper eyedropper;

    class Shared : public Section {
    public:
      Shared(const std::string& name);
      void load();
      void save();
      Option<bool> shareInk;
      Option<app::tools::InkType> ink;
    };
    Shared shared;

    class NewFile : public Section {
    public:
      NewFile(const std::string& name);
      void load();
      void save();
      Option<int> width;
      Option<int> height;
      Option<doc::PixelFormat> colorMode;
      Option<int> backgroundColor;
    };
    NewFile newFile;

    class TextTool : public Section {
    public:
      TextTool(const std::string& name);
      void load();
      void save();
      Option<std::string> fontFace;
      Option<int> fontSize;
      Option<bool> antialias;
    };
    TextTool textTool;

    class SymmetryMode : public Section {
    public:
      SymmetryMode(const std::string& name);
      void load();
      void save();
      Option<bool> enabled;
    };
    SymmetryMode symmetryMode;
  };

  class ToolPref : public Section {
  public:
    ToolPref(const std::string& name);
    void load();
    void save();
    Option<int> opacity;
    Option<int> tolerance;
    Option<bool> contiguous;
    Option<bool> filled;
    Option<bool> filledPreview;
    Option<app::tools::InkType> ink;
    Option<app::tools::FreehandAlgorithm> freehandAlgorithm;

    class Brush : public Section {
    public:
      Brush(const std::string& name);
      void load();
      void save();
      Option<BrushType> type;
      Option<int> size;
      Option<int> angle;
    };
    Brush brush;

    class Spray : public Section {
    public:
      Spray(const std::string& name);
      void load();
      void save();
      Option<int> width;
      Option<int> speed;
    };
    Spray spray;

    class Floodfill : public Section {
    public:
      Floodfill(const std::string& name);
      void load();
      void save();
      Option<StopAtGrid> stopAtGrid;
      Option<FillReferTo> referTo;
    };
    Floodfill floodfill;
  };

  class DocPref : public Section {
  public:
    DocPref(const std::string& name);
    void load();
    void save();

    class Site : public Section {
    public:
      Site(const std::string& name);
      void load();
      void save();
      Option<doc::frame_t> frame;
      Option<doc::LayerIndex> layer;
    };
    Site site;

    class Tiled : public Section {
    public:
      Tiled(const std::string& name);
      void load();
      void save();
      Option<filters::TiledMode> mode;
    };
    Tiled tiled;

    class Symmetry : public Section {
    public:
      Symmetry(const std::string& name);
      void load();
      void save();
      Option<SymmetryMode> mode;
      Option<int> xAxis;
      Option<int> yAxis;
    };
    Symmetry symmetry;

    class Grid : public Section {
    public:
      Grid(const std::string& name);
      void load();
      void save();
      Option<bool> snap;
      Option<gfx::Rect> bounds;
      Option<app::Color> color;
      Option<int> opacity;
      Option<bool> autoOpacity;
    };
    Grid grid;

    class PixelGrid : public Section {
    public:
      PixelGrid(const std::string& name);
      void load();
      void save();
      Option<app::Color> color;
      Option<int> opacity;
      Option<bool> autoOpacity;
    };
    PixelGrid pixelGrid;

    class Bg : public Section {
    public:
      Bg(const std::string& name);
      void load();
      void save();
      Option<BgType> type;
      Option<bool> zoom;
      Option<app::Color> color1;
      Option<app::Color> color2;
    };
    Bg bg;

    class Onionskin : public Section {
    public:
      Onionskin(const std::string& name);
      void load();
      void save();
      Option<bool> active;
      Option<int> prevFrames;
      Option<int> nextFrames;
      Option<int> opacityBase;
      Option<int> opacityStep;
      Option<OnionskinType> type;
      Option<bool> loopTag;
      Option<bool> currentLayer;
      Option<render::OnionskinPosition> position;
    };
    Onionskin onionskin;

    class SaveCopy : public Section {
    public:
      SaveCopy(const std::string& name);
      void load();
      void save();
      Option<std::string> filename;
      Option<double> resizeScale;
    };
    SaveCopy saveCopy;

    class SpriteSheet : public Section {
    public:
      SpriteSheet(const std::string& name);
      void load();
      void save();
      Option<app::SpriteSheetType> type;
      Option<int> columns;
      Option<int> rows;
      Option<int> width;
      Option<int> height;
      Option<bool> bestFit;
      Option<std::string> textureFilename;
      Option<std::string> dataFilename;
      Option<DocumentExporter::DataFormat> dataFormat;
      Option<int> borderPadding;
      Option<int> shapePadding;
      Option<int> innerPadding;
      Option<bool> openGenerated;
      Option<bool> pertagEnabled;
      Option<std::string> layer;
      Option<std::string> frameTag;
      Option<bool> listLayers;
      Option<bool> listFrameTags;
    };
    SpriteSheet spriteSheet;

    class ImportSpriteSheet : public Section {
    public:
      ImportSpriteSheet(const std::string& name);
      void load();
      void save();
      Option<app::SpriteSheetType> type;
      Option<gfx::Rect> bounds;
      Option<bool> partialTiles;
    };
    ImportSpriteSheet importSpriteSheet;

    class Preview : public Section {
    public:
      Preview(const std::string& name);
      void load();
      void save();
      Option<double> zoom;
      Option<gfx::Point> scroll;
      Option<bool> autoScroll;
    };
    Preview preview;

    class Show : public Section {
    public:
      Show(const std::string& name);
      void load();
      void save();
      Option<bool> layerEdges;
      Option<bool> selectionEdges;
      Option<bool> grid;
      Option<bool> pixelGrid;
      Option<bool> brushPreview;
    };
    Show show;
  };

} // namespace gen
} // namespace app
