Repository for import to local machine

Dependencies:   DMBasicGUI DMSupport

Committer:
jmitc91516
Date:
Wed Jan 13 13:17:05 2016 +0000
Revision:
0:47c880c1463d
Child:
1:a5258871b33d
First revision of 5 inch display version of GC500_2. Dated 13 Jan 2016

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jmitc91516 0:47c880c1463d 1 #ifndef GCCOMPONENTSTATUSCOLORAREA_H
jmitc91516 0:47c880c1463d 2 #define GCCOMPONENTSTATUSCOLORAREA_H
jmitc91516 0:47c880c1463d 3
jmitc91516 0:47c880c1463d 4 #include "GuiLib.h"
jmitc91516 0:47c880c1463d 5
jmitc91516 0:47c880c1463d 6 #include "GCComponentStatusEnums.h"
jmitc91516 0:47c880c1463d 7
jmitc91516 0:47c880c1463d 8
jmitc91516 0:47c880c1463d 9 // For a particular component, this is the area on the display
jmitc91516 0:47c880c1463d 10 // to be filled with a colour indicating the status of the component
jmitc91516 0:47c880c1463d 11 class GCComponentStatusColorArea
jmitc91516 0:47c880c1463d 12 {
jmitc91516 0:47c880c1463d 13 public:
jmitc91516 0:47c880c1463d 14 GCComponentStatusColorArea();
jmitc91516 0:47c880c1463d 15
jmitc91516 0:47c880c1463d 16 GCComponentStatusColorArea(GuiConst_INT16S X, GuiConst_INT16S Y, GuiConst_INT16S W, GuiConst_INT16S H);
jmitc91516 0:47c880c1463d 17
jmitc91516 0:47c880c1463d 18 void SetComponentStatus(GCComponentStatus newStatus) { componentStatus = newStatus; }
jmitc91516 0:47c880c1463d 19
jmitc91516 0:47c880c1463d 20 GCComponentStatus GetComponentStatus(void) { return componentStatus; }
jmitc91516 0:47c880c1463d 21
jmitc91516 0:47c880c1463d 22 void DisplayComponentStatus(void);
jmitc91516 0:47c880c1463d 23
jmitc91516 0:47c880c1463d 24 private:
jmitc91516 0:47c880c1463d 25 GuiConst_INT16S x;
jmitc91516 0:47c880c1463d 26 GuiConst_INT16S y;
jmitc91516 0:47c880c1463d 27 GuiConst_INT16S w;
jmitc91516 0:47c880c1463d 28 GuiConst_INT16S h;
jmitc91516 0:47c880c1463d 29
jmitc91516 0:47c880c1463d 30 GCComponentStatus componentStatus;
jmitc91516 0:47c880c1463d 31
jmitc91516 0:47c880c1463d 32 static GuiConst_INTCOLOR GetColorForComponentStatus(GCComponentStatus status);
jmitc91516 0:47c880c1463d 33 };
jmitc91516 0:47c880c1463d 34
jmitc91516 0:47c880c1463d 35 class HomePageGCComponentStatusColorAreas
jmitc91516 0:47c880c1463d 36 {
jmitc91516 0:47c880c1463d 37 public:
jmitc91516 0:47c880c1463d 38 HomePageGCComponentStatusColorAreas();
jmitc91516 0:47c880c1463d 39
jmitc91516 0:47c880c1463d 40 GCComponentStatusColorArea *GetColorArea(GCComponent component);
jmitc91516 0:47c880c1463d 41
jmitc91516 0:47c880c1463d 42 void SetGCComponentStatus(GCComponent component, GCComponentStatus newStatus);
jmitc91516 0:47c880c1463d 43
jmitc91516 0:47c880c1463d 44 void DisplayAll(void);
jmitc91516 0:47c880c1463d 45
jmitc91516 0:47c880c1463d 46 private:
jmitc91516 0:47c880c1463d 47 enum HomePageColorAreasCount { HOME_PAGE_COLOR_AREAS_COUNT = 4 };
jmitc91516 0:47c880c1463d 48
jmitc91516 0:47c880c1463d 49 GCComponentStatusColorArea *colorAreas[HOME_PAGE_COLOR_AREAS_COUNT];
jmitc91516 0:47c880c1463d 50 };
jmitc91516 0:47c880c1463d 51
jmitc91516 0:47c880c1463d 52 class SingleGCComponentPageStatusColorAreas
jmitc91516 0:47c880c1463d 53 {
jmitc91516 0:47c880c1463d 54 public:
jmitc91516 0:47c880c1463d 55 SingleGCComponentPageStatusColorAreas();
jmitc91516 0:47c880c1463d 56
jmitc91516 0:47c880c1463d 57 GCComponentStatusColorArea *GetColorArea(GCComponent component);
jmitc91516 0:47c880c1463d 58
jmitc91516 0:47c880c1463d 59 void SetGCComponentStatus(GCComponent component, GCComponentStatus newStatus);
jmitc91516 0:47c880c1463d 60
jmitc91516 0:47c880c1463d 61 void DisplayGCComponentStatus(GCComponent component);
jmitc91516 0:47c880c1463d 62
jmitc91516 0:47c880c1463d 63 private:
jmitc91516 0:47c880c1463d 64 enum SingleGCComponentPageColorAreasCount { SINGLE_PAGE_COLOR_AREAS_COUNT = 4 };
jmitc91516 0:47c880c1463d 65
jmitc91516 0:47c880c1463d 66 GCComponentStatusColorArea *colorAreas[SINGLE_PAGE_COLOR_AREAS_COUNT];
jmitc91516 0:47c880c1463d 67 };
jmitc91516 0:47c880c1463d 68
jmitc91516 0:47c880c1463d 69 #endif // GCCOMPONENTSTATUSCOLORAREA_H