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

Revision:
11:265884fa7fdd
Parent:
10:651861441108
Child:
17:6e2abf107800
--- a/Application/ImageButton.h	Mon Jan 26 10:06:58 2015 +0100
+++ b/Application/ImageButton.h	Tue Feb 17 10:34:13 2015 +0100
@@ -36,8 +36,11 @@
      *  @param y       the upper left corner of the button
      *  @param width   the width of the button
      *  @param height  the height of the button
+     *  @param caption optional text to put below the image
+     *  @param color   text color
      */
-  ImageButton(COLOR_T* fb, uint16_t x, uint16_t y, uint16_t width, uint16_t height);
+  ImageButton(COLOR_T* fb, uint16_t x, uint16_t y, uint16_t width, uint16_t height, 
+              const char* caption=NULL, COLOR_T color=BLACK);
   virtual ~ImageButton();
 
     /** Loads the mandatory "normal" state image and the optional "pressed" state image
@@ -63,6 +66,11 @@
   bool loadImages(const unsigned char* imgUp, unsigned int imgUpSize, 
                   const unsigned char* imgDown = 0, unsigned int imgDownSize = 0);
 
+    /** Specifys a color that will be considered transparent (i.e. will not be drawn)
+     *  @param tColor  the transparent color
+     */
+  void setTransparency(COLOR_T tColor);
+
     /** Draws the button (on a new framebuffer if one is specified)
      *  @param fb      the frame buffer
      */
@@ -71,6 +79,10 @@
 private:
   Image::ImageData_t _imgUp;
   Image::ImageData_t _imgDown;
+  char* _caption;
+  COLOR_T _captionColor;
+  bool _transparent;
+  COLOR_T _transparentColor;
 };
 
 #endif /* IMAGEBUTTON_H */