/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef TERMINALVIEWBASE_HPP
#define TERMINALVIEWBASE_HPP

#include <gui/common/FrontendApplication.hpp>
#include <mvp/View.hpp>
#include <gui/terminal_screen/TerminalPresenter.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/widgets/ButtonWithIcon.hpp>
#include <touchgfx/containers/ScrollableContainer.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
#include <touchgfx/EasingEquations.hpp>
#include <touchgfx/mixins/MoveAnimator.hpp>

class TerminalViewBase : public touchgfx::View<TerminalPresenter>
{
public:
    TerminalViewBase();
    virtual ~TerminalViewBase() {}
    virtual void setupScreen();
    virtual void handleKeyEvent(uint8_t key);

    /*
     * Virtual Action Handlers
     */
    virtual void onButtonClearLogTextClicked()
    {
        // Override and implement this function in Terminal
    }

protected:
    FrontendApplication& application() {
        return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
    }

    /*
     * Member Declarations
     */
    touchgfx::Box __background;
    touchgfx::ButtonWithIcon buttonClearLogText_;
    touchgfx::ScrollableContainer scrollableTextArea_;
    touchgfx::MoveAnimator< touchgfx::TextAreaWithOneWildcard > logText_;

    /*
     * Wildcard Buffers
     */
    static const uint16_t LOGTEXT__SIZE = 2048;
    touchgfx::Unicode::UnicodeChar logText_Buffer[LOGTEXT__SIZE];

private:

    /*
     * Callback Declarations
     */
    touchgfx::Callback<TerminalViewBase, const touchgfx::AbstractButton&> buttonCallback;

    /*
     * Callback Handler Declarations
     */
    void buttonCallbackHandler(const touchgfx::AbstractButton& src);

};

#endif // TERMINALVIEWBASE_HPP
