Displays a large title and some small text with a blue rectangle Constantly refreshes 3 variable values on the screen. NO TOUCH SUPPORT AS OF YET

Dependencies:   mbed

Committer:
EmbeddedSam
Date:
Sat Dec 05 23:41:01 2015 +0000
Revision:
0:38cf064697d7
First commit, working with displaying messages; no touch support as of yet

Who changed what in which revision?

UserRevisionLine numberNew contents of line
EmbeddedSam 0:38cf064697d7 1 /* mbed GraphicsDisplay Display Library Base Class
EmbeddedSam 0:38cf064697d7 2 * Copyright (c) 2007-2009 sford
EmbeddedSam 0:38cf064697d7 3 * Released under the MIT License: http://mbed.org/license/mit
EmbeddedSam 0:38cf064697d7 4 *
EmbeddedSam 0:38cf064697d7 5 * A library for providing a common base class for Graphics displays
EmbeddedSam 0:38cf064697d7 6 * To port a new display, derive from this class and implement
EmbeddedSam 0:38cf064697d7 7 * the constructor (setup the display), pixel (put a pixel
EmbeddedSam 0:38cf064697d7 8 * at a location), width and height functions. Everything else
EmbeddedSam 0:38cf064697d7 9 * (locate, printf, putc, cls, window, putp, fill, blit, blitbit)
EmbeddedSam 0:38cf064697d7 10 * will come for free. You can also provide a specialised implementation
EmbeddedSam 0:38cf064697d7 11 * of window and putp to speed up the results
EmbeddedSam 0:38cf064697d7 12 */
EmbeddedSam 0:38cf064697d7 13
EmbeddedSam 0:38cf064697d7 14 #ifndef MBED_GRAPHICSDISPLAY_H
EmbeddedSam 0:38cf064697d7 15 #define MBED_GRAPHICSDISPLAY_H
EmbeddedSam 0:38cf064697d7 16
EmbeddedSam 0:38cf064697d7 17 #include "TextDisplay.h"
EmbeddedSam 0:38cf064697d7 18
EmbeddedSam 0:38cf064697d7 19 class GraphicsDisplay : public TextDisplay {
EmbeddedSam 0:38cf064697d7 20
EmbeddedSam 0:38cf064697d7 21 public:
EmbeddedSam 0:38cf064697d7 22
EmbeddedSam 0:38cf064697d7 23 GraphicsDisplay(const char* name);
EmbeddedSam 0:38cf064697d7 24
EmbeddedSam 0:38cf064697d7 25 virtual void pixel(int x, int y, int colour) = 0;
EmbeddedSam 0:38cf064697d7 26 virtual int width() = 0;
EmbeddedSam 0:38cf064697d7 27 virtual int height() = 0;
EmbeddedSam 0:38cf064697d7 28
EmbeddedSam 0:38cf064697d7 29 virtual void window(unsigned int x,unsigned int y,unsigned int w,unsigned int h);
EmbeddedSam 0:38cf064697d7 30 virtual void putp(int colour);
EmbeddedSam 0:38cf064697d7 31
EmbeddedSam 0:38cf064697d7 32 virtual void cls();
EmbeddedSam 0:38cf064697d7 33 virtual void fill(int x, int y, int w, int h, int colour);
EmbeddedSam 0:38cf064697d7 34 virtual void blit(int x, int y, int w, int h, const int *colour);
EmbeddedSam 0:38cf064697d7 35 virtual void blitbit(int x, int y, int w, int h, const char* colour);
EmbeddedSam 0:38cf064697d7 36
EmbeddedSam 0:38cf064697d7 37 virtual void character(int column, int row, int value);
EmbeddedSam 0:38cf064697d7 38 virtual int columns();
EmbeddedSam 0:38cf064697d7 39 virtual int rows();
EmbeddedSam 0:38cf064697d7 40
EmbeddedSam 0:38cf064697d7 41 protected:
EmbeddedSam 0:38cf064697d7 42
EmbeddedSam 0:38cf064697d7 43 // pixel location
EmbeddedSam 0:38cf064697d7 44 short _x;
EmbeddedSam 0:38cf064697d7 45 short _y;
EmbeddedSam 0:38cf064697d7 46
EmbeddedSam 0:38cf064697d7 47 // window location
EmbeddedSam 0:38cf064697d7 48 short _x1;
EmbeddedSam 0:38cf064697d7 49 short _x2;
EmbeddedSam 0:38cf064697d7 50 short _y1;
EmbeddedSam 0:38cf064697d7 51 short _y2;
EmbeddedSam 0:38cf064697d7 52
EmbeddedSam 0:38cf064697d7 53 };
EmbeddedSam 0:38cf064697d7 54
EmbeddedSam 0:38cf064697d7 55 #endif