add screen library
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef FRONTENDAPPLICATIONBASE_HPP
|
||||
#define FRONTENDAPPLICATIONBASE_HPP
|
||||
|
||||
#include <mvp/MVPApplication.hpp>
|
||||
#include <gui/model/Model.hpp>
|
||||
|
||||
class FrontendHeap;
|
||||
|
||||
class FrontendApplicationBase : public touchgfx::MVPApplication
|
||||
{
|
||||
public:
|
||||
FrontendApplicationBase(Model& m, FrontendHeap& heap);
|
||||
virtual ~FrontendApplicationBase() { }
|
||||
|
||||
// MainView
|
||||
void gotoMainViewScreenNoTransition();
|
||||
|
||||
protected:
|
||||
touchgfx::Callback<FrontendApplicationBase> transitionCallback;
|
||||
FrontendHeap& frontendHeap;
|
||||
Model& model;
|
||||
|
||||
// MainView
|
||||
void gotoMainViewScreenNoTransitionImpl();
|
||||
};
|
||||
|
||||
#endif // FRONTENDAPPLICATIONBASE_HPP
|
@ -0,0 +1,87 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef FRONTENDHEAPBASE_HPP
|
||||
#define FRONTENDHEAPBASE_HPP
|
||||
|
||||
#include <common/Meta.hpp>
|
||||
#include <common/Partition.hpp>
|
||||
#include <mvp/MVPHeap.hpp>
|
||||
|
||||
#include <touchgfx/transitions/NoTransition.hpp>
|
||||
#include <gui/common/FrontendApplication.hpp>
|
||||
#include <gui/model/Model.hpp>
|
||||
|
||||
#include <gui/mainview_screen/MainViewView.hpp>
|
||||
#include <gui/mainview_screen/MainViewPresenter.hpp>
|
||||
|
||||
|
||||
/**
|
||||
* This class provides the memory that shall be used for memory allocations
|
||||
* in the frontend. A single instance of the FrontendHeap is allocated once (in heap
|
||||
* memory), and all other frontend objects such as views, presenters and data model are
|
||||
* allocated within the scope of this FrontendHeap. As such, the RAM usage of the entire
|
||||
* user interface is sizeof(FrontendHeap).
|
||||
*
|
||||
* @note The FrontendHeap reserves memory for the most memory-consuming presenter and
|
||||
* view only. The largest of these classes are determined at compile-time using template
|
||||
* magic. As such, it is important to add all presenters, views and transitions to the
|
||||
* type lists in this class.
|
||||
*
|
||||
*/
|
||||
class FrontendHeapBase : public touchgfx::MVPHeap
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* A list of all view types. Must end with meta::Nil.
|
||||
* @note All view types used in the application MUST be added to this list!
|
||||
*/
|
||||
typedef touchgfx::meta::TypeList< MainViewView,
|
||||
touchgfx::meta::Nil
|
||||
> GeneratedViewTypes;
|
||||
|
||||
/**
|
||||
* Determine (compile time) the View type of largest size.
|
||||
*/
|
||||
typedef touchgfx::meta::select_type_maxsize< GeneratedViewTypes >::type MaxGeneratedViewType;
|
||||
|
||||
/**
|
||||
* A list of all presenter types. Must end with meta::Nil.
|
||||
* @note All presenter types used in the application MUST be added to this list!
|
||||
*/
|
||||
typedef touchgfx::meta::TypeList< MainViewPresenter,
|
||||
touchgfx::meta::Nil
|
||||
> GeneratedPresenterTypes;
|
||||
|
||||
/**
|
||||
* Determine (compile time) the Presenter type of largest size.
|
||||
*/
|
||||
typedef touchgfx::meta::select_type_maxsize< GeneratedPresenterTypes >::type MaxGeneratedPresenterType;
|
||||
|
||||
/**
|
||||
* A list of all transition types. Must end with meta::Nil.
|
||||
* @note All transition types used in the application MUST be added to this list!
|
||||
*/
|
||||
typedef touchgfx::meta::TypeList< touchgfx::NoTransition,
|
||||
touchgfx::meta::Nil
|
||||
> GeneratedTransitionTypes;
|
||||
|
||||
/**
|
||||
* Determine (compile time) the Transition type of largest size.
|
||||
*/
|
||||
typedef touchgfx::meta::select_type_maxsize< GeneratedTransitionTypes >::type MaxGeneratedTransitionType;
|
||||
|
||||
virtual void gotoStartScreen(FrontendApplication& app)
|
||||
{
|
||||
app.gotoMainViewScreenNoTransition();
|
||||
}
|
||||
protected:
|
||||
FrontendHeapBase(touchgfx::AbstractPartition& presenters, touchgfx::AbstractPartition& views, touchgfx::AbstractPartition& transitions, FrontendApplication& app)
|
||||
: MVPHeap(presenters, views, transitions, app)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // FRONTENDHEAPBASE_HPP
|
@ -0,0 +1,11 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef SIMCONSTANTS_HPP
|
||||
#define SIMCONSTANTS_HPP
|
||||
|
||||
static unsigned short SIM_WIDTH = 480;
|
||||
static unsigned short SIM_HEIGHT = 272;
|
||||
#define SIM_TITLE "STM32F746G_DISCO"
|
||||
|
||||
#endif // SIMCONSTANTS_HPP
|
@ -0,0 +1,101 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef MAINVIEWVIEWBASE_HPP
|
||||
#define MAINVIEWVIEWBASE_HPP
|
||||
|
||||
#include <gui/common/FrontendApplication.hpp>
|
||||
#include <mvp/View.hpp>
|
||||
#include <gui/mainview_screen/MainViewPresenter.hpp>
|
||||
#include <touchgfx/widgets/Box.hpp>
|
||||
#include <touchgfx/widgets/TextArea.hpp>
|
||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
|
||||
#include <touchgfx/widgets/graph/GraphWrapAndClear.hpp>
|
||||
#include <touchgfx/widgets/graph/GraphElements.hpp>
|
||||
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
|
||||
#include <touchgfx/widgets/Button.hpp>
|
||||
#include <touchgfx/widgets/Image.hpp>
|
||||
|
||||
class MainViewViewBase : public touchgfx::View<MainViewPresenter>
|
||||
{
|
||||
public:
|
||||
MainViewViewBase();
|
||||
virtual ~MainViewViewBase() {}
|
||||
virtual void setupScreen();
|
||||
|
||||
/*
|
||||
* Virtual Action Handlers
|
||||
*/
|
||||
virtual void onBtnMinusPressed()
|
||||
{
|
||||
// Override and implement this function in MainView
|
||||
}
|
||||
|
||||
virtual void onBtnPlusPressed()
|
||||
{
|
||||
// Override and implement this function in MainView
|
||||
}
|
||||
|
||||
virtual void onCheckBoxTriggerPressed()
|
||||
{
|
||||
// Override and implement this function in MainView
|
||||
}
|
||||
|
||||
protected:
|
||||
FrontendApplication& application() {
|
||||
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
|
||||
}
|
||||
|
||||
/*
|
||||
* Member Declarations
|
||||
*/
|
||||
touchgfx::Box __background;
|
||||
touchgfx::Box bgView;
|
||||
touchgfx::TextArea labelTitle;
|
||||
touchgfx::Box bgSignal;
|
||||
touchgfx::TextAreaWithTwoWildcards labelSignal;
|
||||
touchgfx::TextAreaWithOneWildcard labelDivTime;
|
||||
touchgfx::Box chartBG;
|
||||
touchgfx::GraphWrapAndClear<460> chart;
|
||||
touchgfx::GraphElementDiamonds chartDiamonds1;
|
||||
touchgfx::PainterRGB565 chartDiamonds1Painter;
|
||||
touchgfx::GraphElementGridX chartMajorXAxisGrid;
|
||||
touchgfx::Button btnPlus;
|
||||
touchgfx::Button btnMinus;
|
||||
touchgfx::Button btnTrigger;
|
||||
touchgfx::TextArea labelTrigger;
|
||||
touchgfx::TextArea labelPlus;
|
||||
touchgfx::TextArea labelMinus;
|
||||
touchgfx::Image redLedEnable;
|
||||
touchgfx::Image redLedDisable;
|
||||
|
||||
/*
|
||||
* Wildcard Buffers
|
||||
*/
|
||||
static const uint16_t LABELSIGNALBUFFER1_SIZE = 20;
|
||||
touchgfx::Unicode::UnicodeChar labelSignalBuffer1[LABELSIGNALBUFFER1_SIZE];
|
||||
static const uint16_t LABELSIGNALBUFFER2_SIZE = 20;
|
||||
touchgfx::Unicode::UnicodeChar labelSignalBuffer2[LABELSIGNALBUFFER2_SIZE];
|
||||
static const uint16_t LABELDIVTIME_SIZE = 20;
|
||||
touchgfx::Unicode::UnicodeChar labelDivTimeBuffer[LABELDIVTIME_SIZE];
|
||||
|
||||
private:
|
||||
|
||||
/*
|
||||
* Callback Declarations
|
||||
*/
|
||||
touchgfx::Callback<MainViewViewBase, const touchgfx::AbstractButton&> buttonCallback;
|
||||
|
||||
/*
|
||||
* Callback Handler Declarations
|
||||
*/
|
||||
void buttonCallbackHandler(const touchgfx::AbstractButton& src);
|
||||
|
||||
/*
|
||||
* Canvas Buffer Size
|
||||
*/
|
||||
static const uint16_t CANVAS_BUFFER_SIZE = 7200;
|
||||
uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
|
||||
};
|
||||
|
||||
#endif // MAINVIEWVIEWBASE_HPP
|
Reference in New Issue
Block a user