diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-04-29 19:18:24 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-04-29 19:18:24 +0000 |
commit | c38d91a6cda19491b56dfb2e298e28ea3de06086 (patch) | |
tree | 77b8442939f538486aaeaa6fd51c43c849a618ca /NxWidgets/nxwm/include | |
parent | 3906314011646470ede38d0c96157378d89c7568 (diff) | |
download | px4-nuttx-c38d91a6cda19491b56dfb2e298e28ea3de06086.tar.gz px4-nuttx-c38d91a6cda19491b56dfb2e298e28ea3de06086.tar.bz2 px4-nuttx-c38d91a6cda19491b56dfb2e298e28ea3de06086.zip |
NxWM update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4675 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r-- | NxWidgets/nxwm/include/capplicationwindow.hxx | 34 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/nxwmconfig.hxx | 28 |
2 files changed, 55 insertions, 7 deletions
diff --git a/NxWidgets/nxwm/include/capplicationwindow.hxx b/NxWidgets/nxwm/include/capplicationwindow.hxx index 6f802ebe5..607538e12 100644 --- a/NxWidgets/nxwm/include/capplicationwindow.hxx +++ b/NxWidgets/nxwm/include/capplicationwindow.hxx @@ -88,11 +88,24 @@ namespace NxWM class CApplicationWindow : public INxApplication { protected: - NxWidgets::CNxTkWindow *m_window; /**< The framed window used by the application */ - NxWidgets::CNxToolbar *m_toolbar; /**< The toolbar */ - NxWidgets::CImage *m_minimize; /**< The minimize icon */ - NxWidgets::CImage *m_close; /**< The close icon */ - IApplicationCallback *m_callback; /**< Toolbar action callbacks */ + 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 */ + IApplicationCallback *m_callback; /**< Toolbar action callbacks */ + + /** + * Configure the standard application toolbar + * + * @return True if the toolcar was successfully initialized. + */ + + bool configureToolbar(void); /** * CNxApplicationWindow Destructor @@ -132,6 +145,17 @@ namespace NxWM } /** + * Set the window label + * + * @param appname. The name of the application to place on the window + */ + + inline void setWindowLabel(NxWidgets::CNxString &appname) + { + m_windowLabel->setText(appname); + } + + /** * Register to receive callbacks when toolbar icons are selected */ diff --git a/NxWidgets/nxwm/include/nxwmconfig.hxx b/NxWidgets/nxwm/include/nxwmconfig.hxx index e5a85ac5a..1400d41a4 100644 --- a/NxWidgets/nxwm/include/nxwmconfig.hxx +++ b/NxWidgets/nxwm/include/nxwmconfig.hxx @@ -56,13 +56,21 @@ # warning "NX multi-user support is required (CONFIG_NX_MULTIUSER)" #endif +/** + * Default font ID + */ + +#ifndef CONFIG_NXWM_DEFAULT_FONTID +# define CONFIG_NXWM_DEFAULT_FONTID NXFONT_DEFAULT +#endif + /* Colors *******************************************************************/ /** * Normal background color */ #ifndef CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR -# define CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR +# define CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR #endif /** @@ -70,7 +78,7 @@ */ #ifndef CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR -# define CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR +# define CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR #endif /** @@ -89,6 +97,22 @@ # define CONFIG_NXWM_DEFAULT_SELECTEDFOREGROUNDCOLOR MKRGB(248,248,248) #endif +/** + * The default font color + */ + +#ifndef CONFIG_NXWM_DEFAULT_FONTCOLOR +# define CONFIG_NXWM_DEFAULT_FONTCOLOR MKRGB(255,255,255) +#endif + +/** + * The transparent color + */ + +#ifndef CONFIG_NXWM_TRANSPARENT_COLOR +# define CONFIG_NXWM_TRANSPARENT_COLOR MKRGB(0,0,0) +#endif + /* Task Bar Configuation ***************************************************/ /* At present, all icons are 25 pixels in "widgth" and, hence require a * task bar of at least that size. |