diff options
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r-- | NxWidgets/nxwm/include/capplicationwindow.hxx | 49 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/cnxbackimage.hxx | 4 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/cnxtaskbar.hxx | 17 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/nxwmconfig.hxx | 13 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/nxwmglyphs.hxx | 14 |
5 files changed, 58 insertions, 39 deletions
diff --git a/NxWidgets/nxwm/include/capplicationwindow.hxx b/NxWidgets/nxwm/include/capplicationwindow.hxx index 607538e12..984f03b46 100644 --- a/NxWidgets/nxwm/include/capplicationwindow.hxx +++ b/NxWidgets/nxwm/include/capplicationwindow.hxx @@ -43,6 +43,12 @@ #include <nuttx/config.h> #include "cnxtkwindow.hxx" +#include "cnxtoolbar.hxx" +#include "cwidgeteventargs.hxx" +#include "cwidgeteventhandler.hxx" +#include "cimage.hxx" +#include "clabel.hxx" +#include "crlepalettebitmap.hxx" /**************************************************************************** * Pre-Processor Definitions @@ -56,8 +62,6 @@ namespace NxWM { - class CNxtkWindow; - /** * This callback class is used by the application to get notification of toolbar * related events. @@ -85,44 +89,43 @@ namespace NxWM * and close buttions and passes these to the application via callbacks. */ - class CApplicationWindow : public INxApplication + class CApplicationWindow : private NXWidgets::CWidgetEventHandler { protected: - NxWidgets::CNxTkWindow *m_window; /**< The framed window used by the application */ - NxWidgets::CNxToolbar *m_toolbar; /**< The toolbar */ - NxWidgets::CImage *m_minimizeImage; /**< The minimize icon */ - NxWidgets::CImage *m_stopImage; /**< The close icon */ - NxWidgets::CLabel *m_windowLabel; /**< The window title */ - NxWidgets::CRlePaletteBitmap *m_minimizeBitmap; /**< The minimize icon bitmap */ - NxWidgets::CRlePaletteBitmap *m_stopBitmap; /**< The stop icon bitmap */ - NxWidgets::CRlePaletteBitmap *m_minimizeBitmap; /**< The minimize icon bitmap */ - NxWidgets::CNxFont *m_windowFont; /**< The font used to rend the window label */ + NXWidgets::CNxTkWindow *m_window; /**< The framed window used by the application */ + NXWidgets::CNxToolbar *m_toolbar; /**< The toolbar */ + NXWidgets::CImage *m_minimizeImage; /**< The minimize icon */ + NXWidgets::CImage *m_stopImage; /**< The close icon */ + NXWidgets::CLabel *m_windowLabel; /**< The window title */ + NXWidgets::CRlePaletteBitmap *m_minimizeBitmap; /**< The minimize icon bitmap */ + 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 */ /** - * Configure the standard application toolbar + * Handle a mouse button click event. * - * @return True if the toolcar was successfully initialized. + * @param e The event data. */ - - bool configureToolbar(void); + + void handleClickEvent(const NXWidgets::CWidgetEventArgs &e); /** - * CNxApplicationWindow Destructor + * CApplicationWindow Destructor */ - ~CNxApplicationWindow(void); + ~CApplicationWindow(void); public: /** - * CNxApplicationWindow Constructor + * CApplicationWindow Constructor * * @param taskbar. A pointer to the parent task bar instance * @param window. The window to be used by this application. */ - CNxApplicationWindow(NxWidgets::CNxTkWindow *window); + CApplicationWindow(NXWidgets::CNxTkWindow *window); /** * Initialize window. Window initialization is separate from @@ -139,7 +142,7 @@ namespace NxWM * @return. The window used by this application */ - inline NxWidgets::CNxTkWindow *getWindow(void) const + inline NXWidgets::CNxTkWindow *getWindow(void) const { return m_window; } @@ -150,7 +153,7 @@ namespace NxWM * @param appname. The name of the application to place on the window */ - inline void setWindowLabel(NxWidgets::CNxString &appname) + inline void setWindowLabel(NXWidgets::CNxString &appname) { m_windowLabel->setText(appname); } @@ -161,7 +164,7 @@ namespace NxWM void registerCallbacks(IApplicationCallback *callback) { - m_callback = callback + m_callback = callback; } }; } diff --git a/NxWidgets/nxwm/include/cnxbackimage.hxx b/NxWidgets/nxwm/include/cnxbackimage.hxx index 903a4880d..cc56e6519 100644 --- a/NxWidgets/nxwm/include/cnxbackimage.hxx +++ b/NxWidgets/nxwm/include/cnxbackimage.hxx @@ -64,10 +64,10 @@ namespace NxWM * This class describes the NX windo manager's background image. */ - class CNxBackImage : public NxWidgets::CImage + class CNxBackImage : public NXWidgets::CImage { private: - NxWidgets::CWidgetControl *m_widgetControl; // The controlling widget for the window + NXWidgets::CWidgetControl *m_widgetControl; // The controlling widget for the window public: /** diff --git a/NxWidgets/nxwm/include/cnxtaskbar.hxx b/NxWidgets/nxwm/include/cnxtaskbar.hxx index 5f1a81527..3809e17ff 100644 --- a/NxWidgets/nxwm/include/cnxtaskbar.hxx +++ b/NxWidgets/nxwm/include/cnxtaskbar.hxx @@ -60,11 +60,11 @@ namespace NxWM * This class describes the NX window manager's task bar */ - class CNxTaskBar : public NxWidgets::CNxServer + class CNxTaskBar : public NXWidgets::CNxServer, private NXWidgets::CWidgetEventHandler { private: - NxWidgets:INxWindow *m_taskbar; /**< The toolbar window */ - NxWidgets:INxWindow *m_background; /**< The background window */ + NXWidgets:INxWindow *m_taskbar; /**< The toolbar window */ + NXWidgets:INxWindow *m_background; /**< The background window */ INxApplication *m_start; /**< The start window */ /** @@ -110,7 +110,7 @@ namespace NxWM * @param window. The window to be resized and repositioned */ - void setApplicationGeometry(NxWidgets::INxWindow *window); + void setApplicationGeometry(NXWidgets::INxWindow *window); /** * Create the toolbar window. @@ -128,6 +128,15 @@ namespace NxWM bool createBackgroundWindow(void); + + /** + * Handle a mouse button click event. + * + * @param e The event data. + */ + + void handleClickEvent(const CWidgetEventArgs &e); + /** * CNxTaskBar Destructor */ diff --git a/NxWidgets/nxwm/include/nxwmconfig.hxx b/NxWidgets/nxwm/include/nxwmconfig.hxx index 1400d41a4..dc6c2acf2 100644 --- a/NxWidgets/nxwm/include/nxwmconfig.hxx +++ b/NxWidgets/nxwm/include/nxwmconfig.hxx @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __INCLUDE_NXWM_CONFIG_HXX -#define __INCLUDE_NXWM_CONFIG_HXX +#ifndef __INCLUDE_NXWMCONFIG_HXX +#define __INCLUDE_NXWMCONFIG_HXX /**************************************************************************** * Included Files @@ -43,6 +43,7 @@ #include <nuttx/config.h> #include "nxconfig.hxx" +#include "crlepalettebitmap.hxx" /**************************************************************************** * Pre-Processor Definitions @@ -141,6 +142,12 @@ # define CONFIG_NXWM_TASKBAR_TOP 1 #endif +/* Tool Bar Configuration ***************************************************/ + +#ifndef CONFIG_NXWM_TOOLBAR_HEIGHT +# define CONFIG_NXWM_TOOLBAR_HEIGHT CONFIG_NXWM_TASKBAR_WIDTH +#endif + /* Colors *******************************************************************/ -#endif // __INCLUDE_NXWM_CONFIG_HXX +#endif // __INCLUDE_NXWMCONFIG_HXX diff --git a/NxWidgets/nxwm/include/nxwmglyphs.hxx b/NxWidgets/nxwm/include/nxwmglyphs.hxx index a311155b0..bacd35891 100644 --- a/NxWidgets/nxwm/include/nxwmglyphs.hxx +++ b/NxWidgets/nxwm/include/nxwmglyphs.hxx @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __INCLUDE_NXWM_CONFIG_HXX -#define __INCLUDE_NXWM_CONFIG_HXX +#ifndef __INCLUDE_NXWMGLYPHS_HXX +#define __INCLUDE_NXWMGLYPHS_HXX /**************************************************************************** * Included Files @@ -56,11 +56,11 @@ namespace NxWM { - extern const struct NxWidgets::SRlePaletteBitmap g_nshBitmap; - extern const struct NxWidgets::SRlePaletteBitmap g_minimizeBitmap; - extern const struct NxWidgets::SRlePaletteBitmap g_startBitmap; - extern const struct NxWidgets::SRlePaletteBitmap g_stopBitmap; + extern const struct NXWidgets::SRlePaletteBitmap g_nshBitmap; + extern const struct NXWidgets::SRlePaletteBitmap g_minimizeBitmap; + extern const struct NXWidgets::SRlePaletteBitmap g_startBitmap; + extern const struct NXWidgets::SRlePaletteBitmap g_stopBitmap; } #endif // __cplusplus -#endif // __INCLUDE_NXWM_CONFIG_HXX +#endif // __INCLUDE_NXWMGLYPHS_HXX |