summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/include
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-04-22 08:01:43 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-04-22 08:01:43 -0600
commit11278c31a01b6fdfb09e2a3109a20d38ef793055 (patch)
treec0f670c168d61c819c5d888eb6726121068e6f27 /NxWidgets/libnxwidgets/include
parent58d19e46e06d8b0f06c997f001b159682d76672f (diff)
downloadnuttx-11278c31a01b6fdfb09e2a3109a20d38ef793055.tar.gz
nuttx-11278c31a01b6fdfb09e2a3109a20d38ef793055.tar.bz2
nuttx-11278c31a01b6fdfb09e2a3109a20d38ef793055.zip
Fixes to strchr, mkfats, and NxWidgets from Petteri Aimonen
Diffstat (limited to 'NxWidgets/libnxwidgets/include')
-rw-r--r--NxWidgets/libnxwidgets/include/cglyphbutton.hxx17
-rw-r--r--NxWidgets/libnxwidgets/include/cnxtimer.hxx16
-rw-r--r--NxWidgets/libnxwidgets/include/cnxwidget.hxx6
-rw-r--r--NxWidgets/libnxwidgets/include/cscrollbarpanel.hxx32
4 files changed, 43 insertions, 28 deletions
diff --git a/NxWidgets/libnxwidgets/include/cglyphbutton.hxx b/NxWidgets/libnxwidgets/include/cglyphbutton.hxx
index aad348ca9..b4b1a5657 100644
--- a/NxWidgets/libnxwidgets/include/cglyphbutton.hxx
+++ b/NxWidgets/libnxwidgets/include/cglyphbutton.hxx
@@ -73,7 +73,7 @@
/****************************************************************************
* Included Files
****************************************************************************/
-
+
#include <nuttx/config.h>
#include <stdint.h>
@@ -87,11 +87,11 @@
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
-
+
/****************************************************************************
* Implementation Classes
****************************************************************************/
-
+
#if defined(__cplusplus)
namespace NXWidgets
@@ -156,7 +156,16 @@ namespace NXWidgets
virtual void onClick(nxgl_coord_t x, nxgl_coord_t y);
/**
- * Raises an action event and redraws the button.
+ * Raises an action event.
+ *
+ * @param x The x coordinate of the mouse.
+ * @param y The y coordinate of the mouse.
+ */
+
+ virtual void onPreRelease(nxgl_coord_t x, nxgl_coord_t y);
+
+ /**
+ * Raises a release event and redraws the button.
*
* @param x The x coordinate of the mouse.
* @param y The y coordinate of the mouse.
diff --git a/NxWidgets/libnxwidgets/include/cnxtimer.hxx b/NxWidgets/libnxwidgets/include/cnxtimer.hxx
index d4715b378..ab3727de3 100644
--- a/NxWidgets/libnxwidgets/include/cnxtimer.hxx
+++ b/NxWidgets/libnxwidgets/include/cnxtimer.hxx
@@ -73,7 +73,7 @@
/****************************************************************************
* Included Files
****************************************************************************/
-
+
#include <nuttx/config.h>
#include <stdint.h>
@@ -87,11 +87,11 @@
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
-
+
/****************************************************************************
* Implementation Classes
****************************************************************************/
-
+
#if defined(__cplusplus)
namespace NXWidgets
@@ -102,7 +102,7 @@ namespace NXWidgets
* Timer widget. It can drive time-based events, animations, etc.
*
* Using the timer is simple:
- * - Create an instance of the CNxTimer and add it as a child to a widget.
+ * - Create an instance of the CNxTimer and add it as a child to a widget.
* - Call the instance's "start()" method.
* - Catch the timer's action event and call any code that should run.
*/
@@ -170,6 +170,12 @@ namespace NXWidgets
void stop(void);
/**
+ * Returns true if the timer is currently running.
+ */
+
+ inline bool isRunning() const { return m_isRunning; }
+
+ /**
* Set the timeout of this timer. This timeout value will not
* take effect until start() or reset() is called.
*
@@ -181,7 +187,7 @@ namespace NXWidgets
{
m_timeout = timeout;
}
-
+
/**
* Return the timeout of this timer.
*
diff --git a/NxWidgets/libnxwidgets/include/cnxwidget.hxx b/NxWidgets/libnxwidgets/include/cnxwidget.hxx
index a6982660b..f8c472e75 100644
--- a/NxWidgets/libnxwidgets/include/cnxwidget.hxx
+++ b/NxWidgets/libnxwidgets/include/cnxwidget.hxx
@@ -1215,7 +1215,7 @@ namespace NXWidgets
* @return True if a collision occurred.
*/
- bool checkCollision(nxgl_coord_t x, nxgl_coord_t y) const;
+ virtual bool checkCollision(nxgl_coord_t x, nxgl_coord_t y) const;
/**
* Checks if the supplied rectangle definition collides with this widget.
@@ -1227,8 +1227,8 @@ namespace NXWidgets
* @return True if a collision occurred.
*/
- bool checkCollision(nxgl_coord_t x, nxgl_coord_t y,
- nxgl_coord_t width, nxgl_coord_t height) const;
+ virtual bool checkCollision(nxgl_coord_t x, nxgl_coord_t y,
+ nxgl_coord_t width, nxgl_coord_t height) const;
/**
* Checks if the supplied widget collides with this widget.
diff --git a/NxWidgets/libnxwidgets/include/cscrollbarpanel.hxx b/NxWidgets/libnxwidgets/include/cscrollbarpanel.hxx
index 08bdb721c..7f6bf1d32 100644
--- a/NxWidgets/libnxwidgets/include/cscrollbarpanel.hxx
+++ b/NxWidgets/libnxwidgets/include/cscrollbarpanel.hxx
@@ -73,7 +73,7 @@
/****************************************************************************
* Included Files
****************************************************************************/
-
+
#include <nuttx/config.h>
#include <stdint.h>
@@ -93,11 +93,11 @@
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
-
+
/****************************************************************************
* Implementation Classes
****************************************************************************/
-
+
#if defined(__cplusplus)
namespace NXWidgets
@@ -105,8 +105,8 @@ namespace NXWidgets
/**
* Class containing a scrolling panel bordered by scrollbars.
*/
- class CScollbarPanel : public CNxWidget, public IScrollable,
- public CWidgetEventHandler
+ class CScrollbarPanel : public CNxWidget, public IScrollable,
+ public CWidgetEventHandler
{
protected:
CWidgetControl *m_widgetControl; /**< Widget control instance */
@@ -143,13 +143,13 @@ namespace NXWidgets
* Destructor.
*/
- virtual ~CScollbarPanel(void) { }
+ virtual ~CScrollbarPanel(void) { }
/**
* Copy constructor is protected to prevent usage.
*/
- inline CScollbarPanel(const CScollbarPanel &scrollbarPanel)
+ inline CScrollbarPanel(const CScrollbarPanel &scrollbarPanel)
: CNxWidget(scrollbarPanel) { }
public:
@@ -169,11 +169,11 @@ namespace NXWidgets
* the style into its own internal style object.
*/
- CScollbarPanel(CWidgetControl *pWidgetControl,
- nxgl_coord_t x, nxgl_coord_t y,
- nxgl_coord_t width, nxgl_coord_t height,
- uint32_t flags,
- CWidgetStyle *style = (CWidgetStyle *)NULL);
+ CScrollbarPanel(CWidgetControl *pWidgetControl,
+ nxgl_coord_t x, nxgl_coord_t y,
+ nxgl_coord_t width, nxgl_coord_t height,
+ uint32_t flags,
+ CWidgetStyle *style = (CWidgetStyle *)NULL);
/**
* Scroll the panel by the specified amounts.
@@ -183,7 +183,7 @@ namespace NXWidgets
*/
virtual void scroll(int32_t dx, int32_t dy);
-
+
/**
* Reposition the panel's scrolling region to the specified coordinates.
*
@@ -216,7 +216,7 @@ namespace NXWidgets
*/
virtual void setCanvasWidth(const int32_t width);
-
+
/**
* Sets the height of the virtual canvas.
*
@@ -248,7 +248,7 @@ namespace NXWidgets
*/
virtual const int32_t getCanvasX(void) const;
-
+
/**
* Gets the y coordinate of the virtual canvas.
*
@@ -264,7 +264,7 @@ namespace NXWidgets
*/
virtual const int32_t getCanvasWidth(void) const;
-
+
/**
* Gets the height of the virtual canvas.
*