Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more
Fork of DMBasicGUI by
Application/AppColorPicker.h@10:651861441108, 2015-01-26 (annotated)
- Committer:
- embeddedartists
- Date:
- Mon Jan 26 10:06:58 2015 +0100
- Revision:
- 10:651861441108
- Parent:
- 1:46c8df4608c8
- Child:
- 11:265884fa7fdd
- Added virtual destructors to avoid undefined behaviour
- Fixed compiler warnings
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| embeddedartists | 1:46c8df4608c8 | 1 | /* | 
| embeddedartists | 1:46c8df4608c8 | 2 | * Copyright 2014 Embedded Artists AB | 
| embeddedartists | 1:46c8df4608c8 | 3 | * | 
| embeddedartists | 1:46c8df4608c8 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 
| embeddedartists | 1:46c8df4608c8 | 5 | * you may not use this file except in compliance with the License. | 
| embeddedartists | 1:46c8df4608c8 | 6 | * You may obtain a copy of the License at | 
| embeddedartists | 1:46c8df4608c8 | 7 | * | 
| embeddedartists | 1:46c8df4608c8 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 | 
| embeddedartists | 1:46c8df4608c8 | 9 | * | 
| embeddedartists | 1:46c8df4608c8 | 10 | * Unless required by applicable law or agreed to in writing, software | 
| embeddedartists | 1:46c8df4608c8 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, | 
| embeddedartists | 1:46c8df4608c8 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
| embeddedartists | 1:46c8df4608c8 | 13 | * See the License for the specific language governing permissions and | 
| embeddedartists | 1:46c8df4608c8 | 14 | * limitations under the License. | 
| embeddedartists | 1:46c8df4608c8 | 15 | */ | 
| embeddedartists | 0:4977187e90c7 | 16 | |
| embeddedartists | 0:4977187e90c7 | 17 | #ifndef APP_COLORPICKER_H | 
| embeddedartists | 0:4977187e90c7 | 18 | #define APP_COLORPICKER_H | 
| embeddedartists | 0:4977187e90c7 | 19 | |
| embeddedartists | 0:4977187e90c7 | 20 | #include "App.h" | 
| embeddedartists | 0:4977187e90c7 | 21 | #include "DMBoard.h" | 
| embeddedartists | 0:4977187e90c7 | 22 | #include "lpc_swim.h" | 
| embeddedartists | 0:4977187e90c7 | 23 | #include "Button.h" | 
| embeddedartists | 0:4977187e90c7 | 24 | |
| embeddedartists | 0:4977187e90c7 | 25 | /** | 
| embeddedartists | 1:46c8df4608c8 | 26 | * An App example. Lets the user pick a color from a colored area. | 
| embeddedartists | 1:46c8df4608c8 | 27 | * The hex value in RGB565 format is shown as well as a larger sample | 
| embeddedartists | 1:46c8df4608c8 | 28 | * of the selected color. | 
| embeddedartists | 0:4977187e90c7 | 29 | * | 
| embeddedartists | 1:46c8df4608c8 | 30 | * The purpose of this example is to show let the user test the touch | 
| embeddedartists | 1:46c8df4608c8 | 31 | * panel and it can be helpful when selecting colors for e.g. backgrounds. | 
| embeddedartists | 0:4977187e90c7 | 32 | */ | 
| embeddedartists | 0:4977187e90c7 | 33 | class AppColorPicker : public App { | 
| embeddedartists | 0:4977187e90c7 | 34 | public: | 
| embeddedartists | 0:4977187e90c7 | 35 | |
| embeddedartists | 0:4977187e90c7 | 36 | AppColorPicker(); | 
| embeddedartists | 10:651861441108 | 37 | virtual ~AppColorPicker(); | 
| embeddedartists | 0:4977187e90c7 | 38 | |
| embeddedartists | 0:4977187e90c7 | 39 | virtual bool setup(); | 
| embeddedartists | 0:4977187e90c7 | 40 | virtual void runToCompletion(); | 
| embeddedartists | 0:4977187e90c7 | 41 | virtual bool teardown(); | 
| embeddedartists | 0:4977187e90c7 | 42 | |
| embeddedartists | 0:4977187e90c7 | 43 | private: | 
| embeddedartists | 0:4977187e90c7 | 44 | Display* _disp; | 
| embeddedartists | 0:4977187e90c7 | 45 | SWIM_WINDOW_T* _win; | 
| embeddedartists | 0:4977187e90c7 | 46 | SWIM_WINDOW_T* _colorwin; | 
| embeddedartists | 0:4977187e90c7 | 47 | void* _fb; | 
| embeddedartists | 0:4977187e90c7 | 48 | Button* _btn; | 
| embeddedartists | 0:4977187e90c7 | 49 | |
| embeddedartists | 0:4977187e90c7 | 50 | void draw(); | 
| embeddedartists | 0:4977187e90c7 | 51 | }; | 
| embeddedartists | 0:4977187e90c7 | 52 | |
| embeddedartists | 0:4977187e90c7 | 53 | #endif | 
