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
Application/AppLauncher.h
- Committer:
- embeddedartists
- Date:
- 2014-12-11
- Revision:
- 1:46c8df4608c8
- Parent:
- 0:4977187e90c7
- Child:
- 3:3fabfe3339b8
File content as of revision 1:46c8df4608c8:
/* * Copyright 2014 Embedded Artists AB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef APP_LAUNCHER_H #define APP_LAUNCHER_H #include "App.h" #include "DMBoard.h" #include "lpc_swim.h" #include "Button.h" /** * An App example. This uses a number of buttons to launch different Apps. * * The purpose of this example is to demonstrate how to manage a set of * Apps and launch them either as a result of clicked buttons or (in the * case of the TouchCalibrationApp) after an extended press of the USER * button on the back of the display module. */ 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