#ifndef SRCEDIT_STORYVOLUME_H
#define SRCEDIT_STORYVOLUME_H

#include "srcedit_defaulttext.h"
#include "keywordshighlighter.h"


namespace Components {
    class StoryvolumeSourceEdit : public Presents::ModeView, public MakeTools::CompileFeature,
            public MakeTools::FilePresent, public Enhancement::HighlightFeature
    {
    public:
        StoryvolumeSourceEdit();
        virtual ~StoryvolumeSourceEdit() = default;


        // ModeView interface
    public:
        virtual void modeReset(const QString &type) const override;
        virtual QList<QString> modes() const override;
        virtual QString currentMode() const override;


    private:
        QSyntaxHighlighter *const words_highlighter;
        QString name_store;
        QString filepath_store;
        Core::AppCore *core_ins;
        QTextEdit *edit_square;


        // HighlightDemand interface
    public:
      virtual void contexBinding(Core::AppCore *app) override;
      virtual void renderRepeat() const override;

      // ContentPresent interface
    public:
        virtual QList<QString> suffixes() const override;
        virtual std::tuple<bool, QString> create(const QDir &target, const QString &name, const QString &suffix) override;
        virtual MakeTools::FilePresent *newInst() const override;
        virtual QWidget *widget() const override;
        virtual QString name() const override;
        virtual void load(const QFileInfo &target_file) override;
        virtual void saveAs(const QString &path) override;
        virtual QString relativeTargetPath(const QDir &base) const override;
        virtual QString absoluteTargetPath() const override;
        virtual QString getText() const override;
        virtual bool isModified() const override;
        virtual void jumpTo(const QList<QString> &path) override;
        virtual void applySetting(const QString &name, Core::AppCore *core) override;
        virtual Features features() override;
    };

}
#endif // SRCEDIT_STORYVOLUME_H
