A basic graphics package for the LPC4088 Display Module.
Dependents: lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more
Fork of DMBasicGUI by
Diff: Application/AppLauncher.h
- Revision:
- 0:4977187e90c7
- Child:
- 1:46c8df4608c8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Application/AppLauncher.h Thu Dec 11 11:03:57 2014 +0000 @@ -0,0 +1,80 @@ + +#ifndef APP_LAUNCHER_H +#define APP_LAUNCHER_H + +#include "App.h" +#include "DMBoard.h" +#include "lpc_swim.h" +#include "Button.h" + +/** + * LcdController example + * + * @code + * #include "mbed.h" + * #include "LcdController.h" + * + * LcdController::Config innolux( + * 45, + * 17, + * 2, + * 800, + * 22, + * 22, + * 2, + * 480, + * false, + * false, + * true, + * true, + * true, + * LcdController::Bpp_16_565, + * 36000000, + * LcdController::Tft, + * false); + * + * int main(void) { + * LcdController lcd; + * + * lcd.open(&innolux); + * lcd.setFrameBuffer(frameBuffer); + * lcd.setPower(true); + * + * // draw on the frame buffer + * ... + * } + * @endcode + */ +class AppLauncher : public App { +public: + + AppLauncher(); + ~AppLauncher(); + + virtual bool setup(); + virtual void runToCompletion(); + virtual bool teardown(); + +private: + enum Constants { + TitleHeight = 20, + ButtonWidth = 75, + ButtonHeight = 75, + ButtonRows = 2, + ButtonColumns = 5, + NumberOfButtons = ButtonRows*ButtonColumns, + }; + + Display* _disp; + SWIM_WINDOW_T* _win; + void* _fb; + Button* _buttons[NumberOfButtons]; + int _usedButtons; + + void draw(); + void addButton(uint32_t buttonID, const char* caption); +}; + +#endif + +