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:
7:4ba7bd9d32ef
Parent:
6:7917b0894655
Child:
10:651861441108
--- a/Application/Clickable.h	Thu Jan 08 11:14:56 2015 +0100
+++ b/Application/Clickable.h	Thu Jan 08 19:28:22 2015 +0100
@@ -67,11 +67,26 @@
      */
   bool handle(uint16_t x, uint16_t y, bool pressed);
 
+    /** Test if the button is held down (usable for repeated presses)
+     *
+     *  @returns
+     *       true if the button is pressed
+     *       false otherwise
+     */
+  bool pressed() { return _pressed; }
+  
+  void bounds(int& x0, int& y0, int&x1, int&y1) {
+      x0 = _win.xpmin;
+      y0 = _win.ypmin;
+      x1 = _win.xpmax;
+      y1 = _win.ypmax;
+  }
+
     /** Draws the button (on a new framebuffer if one is specified)
      *  @param fb      the frame buffer
      */
   virtual void draw(COLOR_T* fb = 0) = 0;
-
+  
 protected:
   bool _enabled, _pressed;
   SWIM_WINDOW_T _win;