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 EmbeddedArtists AB

Application/AppColorPicker.h

Committer:
embeddedartists
Date:
2015-03-09
Revision:
14:647b1896ed84
Parent:
11:265884fa7fdd
Child:
17:6e2abf107800

File content as of revision 14:647b1896ed84:

/*
 *  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_COLORPICKER_H
#define APP_COLORPICKER_H

#include "App.h"
#include "DMBoard.h"
#include "lpc_swim.h"
#include "ImageButton.h"

/**
 * An App example letting the user pick a color from a colored area.
 * The hex value in RGB565 format is shown as well as a larger sample
 * of the selected color.
 *
 * The purpose of this example is to show let the user test the touch
 * panel and it can be helpful when selecting colors for e.g. backgrounds.
 */
class AppColorPicker : public App {
public:

	AppColorPicker();
	virtual ~AppColorPicker();

    virtual bool setup();
    virtual void runToCompletion();
    virtual bool teardown();

private:
    Display* _disp;
    SWIM_WINDOW_T* _win;
    SWIM_WINDOW_T* _colorwin;
    COLOR_T* _fb;
    COLOR_T* _fb2;
    ImageButton* _btn;

    void draw();
};

#endif