diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-13 14:36:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-13 14:36:59 +0000 |
commit | 193f6fa1764c7d1d88efced8af88c785ebff891f (patch) | |
tree | ad7cd2e11ec8b196ca588de12508afb294a689c8 /NxWidgets/nxwm/include/capplicationwindow.hxx | |
parent | dddc850bfc8afdd0fb6e02d1541636931abaa70a (diff) | |
download | nuttx-193f6fa1764c7d1d88efced8af88c785ebff891f.tar.gz nuttx-193f6fa1764c7d1d88efced8af88c785ebff891f.tar.bz2 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/capplicationwindow.hxx')
-rw-r--r-- | NxWidgets/nxwm/include/capplicationwindow.hxx | 26 |
1 files changed, 25 insertions, 1 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. */ |