summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-13 14:36:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-13 14:36:59 +0000
commit193f6fa1764c7d1d88efced8af88c785ebff891f (patch)
treead7cd2e11ec8b196ca588de12508afb294a689c8 /NxWidgets/nxwm/include
parentdddc850bfc8afdd0fb6e02d1541636931abaa70a (diff)
downloadpx4-nuttx-193f6fa1764c7d1d88efced8af88c785ebff891f.tar.gz
px4-nuttx-193f6fa1764c7d1d88efced8af88c785ebff891f.tar.bz2
px4-nuttx-193f6fa1764c7d1d88efced8af88c785ebff891f.zip
NxWM: Fix detection of touch events in the tool bar; Start window should not have a stop icon
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4729 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r--NxWidgets/nxwm/include/capplicationwindow.hxx26
-rw-r--r--NxWidgets/nxwm/include/ctaskbar.hxx4
2 files changed, 28 insertions, 2 deletions
diff --git a/NxWidgets/nxwm/include/capplicationwindow.hxx b/NxWidgets/nxwm/include/capplicationwindow.hxx
index 7736a3081..807f268a6 100644
--- a/NxWidgets/nxwm/include/capplicationwindow.hxx
+++ b/NxWidgets/nxwm/include/capplicationwindow.hxx
@@ -73,6 +73,16 @@ namespace NxWM
class CApplicationWindow : public IApplicationWindow,
private NXWidgets::CWidgetEventHandler
{
+ public:
+ /**
+ * Enumeration describing the bit settings for each window flag
+ */
+
+ enum EWindowFlags
+ {
+ WINDOW_PERSISTENT = 0x01 /**< Persistent windows have no stop button */
+ };
+
protected:
NXWidgets::CNxTkWindow *m_window; /**< The framed window used by the application */
NXWidgets::CNxToolbar *m_toolbar; /**< The toolbar */
@@ -83,6 +93,7 @@ namespace NxWM
NXWidgets::CRlePaletteBitmap *m_stopBitmap; /**< The stop icon bitmap */
NXWidgets::CNxFont *m_windowFont; /**< The font used to rend the window label */
IApplicationCallback *m_callback; /**< Toolbar action callbacks */
+ uint8_t m_flags; /**< Window flags */
/**
* Handle a mouse button click event.
@@ -98,9 +109,10 @@ namespace NxWM
* CApplicationWindow Constructor
*
* @param window. The window to be used by this application.
+ * @param flags. Optional flags to control the window configuration (See EWindowFlags).
*/
- CApplicationWindow(NXWidgets::CNxTkWindow *window);
+ CApplicationWindow(NXWidgets::CNxTkWindow *window, uint8_t flags = 0);
/**
* CApplicationWindow Destructor
@@ -153,6 +165,18 @@ namespace NxWM
void registerCallbacks(IApplicationCallback *callback);
/**
+ * Check if this window is configured for a persistent application (i.e.,
+ * an application that has no STOP icon
+ *
+ * @return True if the window is configured for a persistent application.
+ */
+
+ inline bool isPersistent(void) const
+ {
+ return (m_flags & WINDOW_PERSISTENT) != 0;
+ }
+
+ /**
* Simulate a mouse click on the minimize icon. This inline method is only
* used during automated testing of NxWM.
*/
diff --git a/NxWidgets/nxwm/include/ctaskbar.hxx b/NxWidgets/nxwm/include/ctaskbar.hxx
index 431c2be48..35a291aef 100644
--- a/NxWidgets/nxwm/include/ctaskbar.hxx
+++ b/NxWidgets/nxwm/include/ctaskbar.hxx
@@ -301,9 +301,11 @@ namespace NxWM
*
* 4. Call CTaskBar::startApplication start the application and bring its window to
* the top.
+ *
+ * @param flags. CApplicationWindow flugs for window customization.
*/
- CApplicationWindow *openApplicationWindow(void);
+ CApplicationWindow *openApplicationWindow(uint8_t flags = 0);
/**
* Create a full screen application window. Creating a new full screen application