Example using the application launcher.
Dependencies: DMBasicGUI DMSupport
Example use of the AppLauncher class in the DMBasicGUI library.
This project is used in the TBD
guide as a starting point when creating your own menu system. It can also be selected as a template when creating a new project based on the LPC4088 Display Module.
Information
This project works on both the 4.3" and 5" display modules.
This is what it looks like:
If you click on the Something button:
AppTemplate.h@1:2b9c48157f2d, 2015-03-09 (annotated)
- Committer:
- alindvall
- Date:
- Mon Mar 09 15:32:10 2015 +0000
- Revision:
- 1:2b9c48157f2d
- Parent:
- 0:71e474187082
Updated versions of DMSupport and DMBasicGUI libraries
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alindvall | 0:71e474187082 | 1 | /* |
alindvall | 0:71e474187082 | 2 | * Copyright 2014 Embedded Artists AB |
alindvall | 0:71e474187082 | 3 | * |
alindvall | 0:71e474187082 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
alindvall | 0:71e474187082 | 5 | * you may not use this file except in compliance with the License. |
alindvall | 0:71e474187082 | 6 | * You may obtain a copy of the License at |
alindvall | 0:71e474187082 | 7 | * |
alindvall | 0:71e474187082 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
alindvall | 0:71e474187082 | 9 | * |
alindvall | 0:71e474187082 | 10 | * Unless required by applicable law or agreed to in writing, software |
alindvall | 0:71e474187082 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
alindvall | 0:71e474187082 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
alindvall | 0:71e474187082 | 13 | * See the License for the specific language governing permissions and |
alindvall | 0:71e474187082 | 14 | * limitations under the License. |
alindvall | 0:71e474187082 | 15 | */ |
alindvall | 0:71e474187082 | 16 | |
alindvall | 0:71e474187082 | 17 | #ifndef APP_TEMPLATE_H |
alindvall | 0:71e474187082 | 18 | #define APP_TEMPLATE_H |
alindvall | 0:71e474187082 | 19 | |
alindvall | 0:71e474187082 | 20 | #include "App.h" |
alindvall | 0:71e474187082 | 21 | #include "DMBoard.h" |
alindvall | 0:71e474187082 | 22 | #include "lpc_swim.h" |
alindvall | 0:71e474187082 | 23 | #include "ImageButton.h" |
alindvall | 0:71e474187082 | 24 | |
alindvall | 0:71e474187082 | 25 | /** |
alindvall | 0:71e474187082 | 26 | * An App example. |
alindvall | 0:71e474187082 | 27 | */ |
alindvall | 0:71e474187082 | 28 | class AppTemplate : public App { |
alindvall | 0:71e474187082 | 29 | public: |
alindvall | 0:71e474187082 | 30 | |
alindvall | 1:2b9c48157f2d | 31 | AppTemplate(); |
alindvall | 1:2b9c48157f2d | 32 | virtual ~AppTemplate(); |
alindvall | 0:71e474187082 | 33 | |
alindvall | 0:71e474187082 | 34 | virtual bool setup(); |
alindvall | 0:71e474187082 | 35 | virtual void runToCompletion(); |
alindvall | 0:71e474187082 | 36 | virtual bool teardown(); |
alindvall | 0:71e474187082 | 37 | |
alindvall | 0:71e474187082 | 38 | private: |
alindvall | 0:71e474187082 | 39 | Display* _disp; |
alindvall | 0:71e474187082 | 40 | SWIM_WINDOW_T* _win; |
alindvall | 0:71e474187082 | 41 | void* _fb; |
alindvall | 0:71e474187082 | 42 | ImageButton* _btn; |
alindvall | 0:71e474187082 | 43 | |
alindvall | 0:71e474187082 | 44 | void draw(); |
alindvall | 0:71e474187082 | 45 | }; |
alindvall | 0:71e474187082 | 46 | |
alindvall | 0:71e474187082 | 47 | #endif |
alindvall | 0:71e474187082 | 48 |