summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-19 04:20:56 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-19 04:20:56 +0000
commit38b3dcac9e4dcb225ceaa7a4798a644537c50ece (patch)
treeaec833bcd4833134c4a769b6e3057a06eb2a9f74 /NxWidgets/nxwm/include
parente5350e893168b675cfd96b36fd7aad3ccfabf791 (diff)
downloadpx4-nuttx-38b3dcac9e4dcb225ceaa7a4798a644537c50ece.tar.gz
px4-nuttx-38b3dcac9e4dcb225ceaa7a4798a644537c50ece.tar.bz2
px4-nuttx-38b3dcac9e4dcb225ceaa7a4798a644537c50ece.zip
NxWM unit test now appears bug free (other than some NxConsole-related issues).
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4750 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r--NxWidgets/nxwm/include/ccalibration.hxx2
-rw-r--r--NxWidgets/nxwm/include/cnxconsole.hxx2
-rw-r--r--NxWidgets/nxwm/include/cstartwindow.hxx2
-rw-r--r--NxWidgets/nxwm/include/ctaskbar.hxx9
-rw-r--r--NxWidgets/nxwm/include/cwindowmessenger.hxx16
5 files changed, 20 insertions, 11 deletions
diff --git a/NxWidgets/nxwm/include/ccalibration.hxx b/NxWidgets/nxwm/include/ccalibration.hxx
index e9b5d400f..a54a35bf7 100644
--- a/NxWidgets/nxwm/include/ccalibration.hxx
+++ b/NxWidgets/nxwm/include/ccalibration.hxx
@@ -52,7 +52,6 @@
#include "ctaskbar.hxx"
#include "iapplication.hxx"
#include "cfullscreenwindow.hxx"
-#include "cwindowmessenger.hxx"
/****************************************************************************
* Pre-processor Definitions
@@ -144,7 +143,6 @@ namespace NxWM
* CCalibration state data
*/
- CWindowMessenger m_messenger; /**< Window event handler/messenger */
CTaskbar *m_taskbar; /**< The taskbar (used to terminate calibration) */
CFullScreenWindow *m_window; /**< The window for the calibration display */
CTouchscreen *m_touchscreen; /**< The touchscreen device */
diff --git a/NxWidgets/nxwm/include/cnxconsole.hxx b/NxWidgets/nxwm/include/cnxconsole.hxx
index bf3606f05..c04caeff9 100644
--- a/NxWidgets/nxwm/include/cnxconsole.hxx
+++ b/NxWidgets/nxwm/include/cnxconsole.hxx
@@ -49,7 +49,6 @@
#include "iapplication.hxx"
#include "capplicationwindow.hxx"
#include "ctaskbar.hxx"
-#include "cwindowmessenger.hxx"
/****************************************************************************
* Pre-Processor Definitions
@@ -79,7 +78,6 @@ namespace NxWM
class CNxConsole : public IApplication, private IApplicationCallback
{
private:
- CWindowMessenger m_messenger; /**< Window event handler/messenger */
CTaskbar *m_taskbar; /**< Reference to the "parent" taskbar */
CApplicationWindow *m_window; /**< Reference to the application window */
NXCONSOLE m_nxcon; /**< NxConsole handle */
diff --git a/NxWidgets/nxwm/include/cstartwindow.hxx b/NxWidgets/nxwm/include/cstartwindow.hxx
index 3a5325cb7..c7a812abf 100644
--- a/NxWidgets/nxwm/include/cstartwindow.hxx
+++ b/NxWidgets/nxwm/include/cstartwindow.hxx
@@ -48,7 +48,6 @@
#include "iapplication.hxx"
#include "capplicationwindow.hxx"
-#include "cwindowmessenger.hxx"
/****************************************************************************
* Pre-Processor Definitions
@@ -116,7 +115,6 @@ namespace NxWM
* CStartWindow state data
*/
- CWindowMessenger m_messenger; /**< Window event handler/messenger */
CTaskbar *m_taskbar; /**< Reference to the "parent" taskbar */
CApplicationWindow *m_window; /**< Reference to the application window */
TNxArray<struct SStartWindowSlot> m_slots; /**< List of apps in the start window */
diff --git a/NxWidgets/nxwm/include/ctaskbar.hxx b/NxWidgets/nxwm/include/ctaskbar.hxx
index a78fb1739..c8468877a 100644
--- a/NxWidgets/nxwm/include/ctaskbar.hxx
+++ b/NxWidgets/nxwm/include/ctaskbar.hxx
@@ -110,14 +110,19 @@ namespace NxWM
/**
* Create a raw window.
*
- * 1) Create a dumb NXWidgets::CWidgetControl instance
- * 2) Pass the dumb NXWidgets::CWidgetControl instance to the window constructor
+ * 1) Create a dumb NXWidgets::CWidgetControl instance (See not).
+ * 2) Pass the dumb NXWidgets::CWindowMessenger instance to the window constructor
* that inherits from INxWindow. This will "smarten" the NXWidgets::CWidgetControl
* instance with some window knowlede
* 3) Call the open() method on the window to display the window.
* 4) After that, the fully smartened NXWidgets::CWidgetControl instance can
* be used to generate additional widgets by passing it to the
* widget constructor
+ *
+ * NOTE: Actually, NxWM uses the CWindowMessenger class that inherits from
+ * CWidgetControl. That class just adds some unrelated messenging capability;
+ * It cohabitates with CWidgetControl only becuase it nees the CWidgetControl
+ * this point.
*/
NXWidgets::CNxWindow *openRawWindow(void);
diff --git a/NxWidgets/nxwm/include/cwindowmessenger.hxx b/NxWidgets/nxwm/include/cwindowmessenger.hxx
index 0aa8961bb..d2e862a7c 100644
--- a/NxWidgets/nxwm/include/cwindowmessenger.hxx
+++ b/NxWidgets/nxwm/include/cwindowmessenger.hxx
@@ -49,6 +49,7 @@
#include <nuttx/nx/nxconsole.h>
#include "cwindoweventhandler.hxx"
+#include "cwidgetstyle.hxx"
#include "cwidgetcontrol.hxx"
/****************************************************************************
@@ -71,10 +72,15 @@ namespace NxWM
/**
* The class CWindowMessenger integrates the widget control with some special
- * handling of mouse and keyboard inputs neesed by NxWM
+ * handling of mouse and keyboard inputs neesed by NxWM. It use used
+ * in place of CWidgetControl whenever an NxWM window is created.
+ *
+ * CWindowMessenger cohabitates with CWidgetControl only becuase it nees the
+ * CWidgetControl as an argument in its messenging.
*/
- class CWindowMessenger : public NXWidgets::CWindowEventHandler
+ class CWindowMessenger : public NXWidgets::CWindowEventHandler,
+ public NXWidgets::CWidgetControl
{
private:
mqd_t m_mqd; /**< Message queue descriptor used to commincate with the
@@ -110,9 +116,13 @@ namespace NxWM
/**
* CWindowMessenger Constructor
+ *
+ * @param style The default style that all widgets on this display
+ * should use. If this is not specified, the widget will use the
+ * values stored in the defaultCWidgetStyle object.
*/
- CWindowMessenger(void);
+ CWindowMessenger(FAR const NXWidgets::CWidgetStyle *style = (const NXWidgets::CWidgetStyle *)NULL);
/**
* CWindowMessenger Destructor.