diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-04-29 14:34:56 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-04-29 14:34:56 +0000 |
commit | 530e4e8173cbbdc299b7244ef5ba839f17b49556 (patch) | |
tree | a1b741f5bd64efb9dbae3d238b08072ebcc2883c /NxWidgets/nxwm/include | |
parent | e35aa390b0d57483b82638952ad62f3a7f5373b5 (diff) | |
download | px4-nuttx-530e4e8173cbbdc299b7244ef5ba839f17b49556.tar.gz px4-nuttx-530e4e8173cbbdc299b7244ef5ba839f17b49556.tar.bz2 px4-nuttx-530e4e8173cbbdc299b7244ef5ba839f17b49556.zip |
Fix STM32 USART4/5 vs UART4/5 confusion
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4671 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r-- | NxWidgets/nxwm/include/cnxstart.hxx | 35 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/cnxtaskbar.hxx | 42 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/inxapplication.hxx | 28 | ||||
-rw-r--r-- | NxWidgets/nxwm/include/nxwmconfig.hxx | 38 |
4 files changed, 139 insertions, 4 deletions
diff --git a/NxWidgets/nxwm/include/cnxstart.hxx b/NxWidgets/nxwm/include/cnxstart.hxx index 42ea67b35..fbfb9c54b 100644 --- a/NxWidgets/nxwm/include/cnxstart.hxx +++ b/NxWidgets/nxwm/include/cnxstart.hxx @@ -56,6 +56,9 @@ namespace NxWM { + class CNxTaskbar; + class CApplicationWindow; + class CNxStart : public INxApplication { protected: @@ -71,9 +74,19 @@ namespace NxWM /** * CNxStart Constructor + * + * @param taskbar. A pointer to the parent task bar instance + * @param window. The window to be used by this application. + */ + + CNxStart(CNxTaskbar *taskbar, CApplicationWindow *window); + + /** + * Each implementation of INxApplication must provide a method to recover + * the contained CApplicationWindow instance. */ - CNxStart(CNxTaskbar *taskbar); + CApplicationWindow *getWindow(void) const; /** * Get the icon associated with the application @@ -86,6 +99,26 @@ namespace NxWM NXWidgets::INxBitmap *getIcon(void); /** + * Get the name string associated with the application + * + * @return A copy if CNxString that contains the name of the application. + */ + + NXWidgets::CNxString getName(void); + + /** + * Start the application. + */ + + run(void); + + /** + * Stop the application. + */ + + stop(void); + + /** * Add the application to the start window * * @param application. The new application to add to the start window diff --git a/NxWidgets/nxwm/include/cnxtaskbar.hxx b/NxWidgets/nxwm/include/cnxtaskbar.hxx index ff8b7e4c1..606514bb0 100644 --- a/NxWidgets/nxwm/include/cnxtaskbar.hxx +++ b/NxWidgets/nxwm/include/cnxtaskbar.hxx @@ -92,7 +92,7 @@ namespace NxWM * widget constructor */ - NXWidgets::INxWindow *openRawWindow(void); + NXWidgets::CNxWindow *openRawWindow(void); /** * Create a framed application window @@ -102,7 +102,15 @@ namespace NxWM * @return A partially initialized application window instance. */ - NXWidgets::INxWindow *openFramedWindow(void); + NXWidgets::CNxTkWindow *openFramedWindow(void); + + /** + * Set size and position of a window in the application area. + * + * @param window. The window to be resized and repositioned + */ + + void setApplicationGeometry(NxWidgets::INxWindow *window); /** * Create the toolbar window. @@ -167,8 +175,36 @@ namespace NxWM bool startWindowManager(start); /** + * Create an application window. Creating a new applicatino in the start + * window requires three steps: + * + * 1. Call openApplicationWindow to create a window for the application, + * 2. Instantiate the application, providing the window to the application's + * constructor, + * 3. Then call addApplication to add the application to the start window. + * + * When the application is selected from the start window: + * + * 4. Call startApplication start the application and bring its window to + * the top. + */ + + CApplicationWindow *openApplicationWindow(void); + + /** * Start an application and add its icon to the taskbar. The applications's - * window is brought to the top. + * window is brought to the top. Creating a new applicatino in the start + * window requires three steps: + * + * 1. Call openApplicationWindow to create a window for the application, + * 2. Instantiate the application, providing the window to the application's + * constructor, + * 3. Then call addApplication to add the application to the start window. + * + * When the application is selected from the start window: + * + * 4. Call startApplication start the application and bring its window to + * the top. * * @param application. The new application to add to the task bar * @return true on success diff --git a/NxWidgets/nxwm/include/inxapplication.hxx b/NxWidgets/nxwm/include/inxapplication.hxx index ef7c52326..70d4ac104 100644 --- a/NxWidgets/nxwm/include/inxapplication.hxx +++ b/NxWidgets/nxwm/include/inxapplication.hxx @@ -54,10 +54,24 @@ namespace NxWM { + class CApplicationWindow; + class NxWidget::CNxString; + + /** + * INxApplication provides the abstract base class for each NxWM application. + */ + class INxApplication { public: /** + * Each implementation of INxApplication must provide a method to recover + * the contained CApplicationWindow instance. + */ + + virtual CApplicationWindow *getWindow(void) const = 0; + + /** * Get the icon associated with the application * * @return An instance if INxBitmap that may be used to rend the @@ -68,10 +82,24 @@ namespace NxWM virtual NXWidgets::INxBitmap *getIcon(void) = 0; /** + * Get the name string associated with the application + * + * @return A copy if CNxString that contains the name of the application. + */ + + virtual NXWidgets::CNxString getName(void) = 0; + + /** * Start the application. */ virtual run(void) = 0; + + /** + * Stop the application. + */ + + virtual stop(void) = 0; }; } diff --git a/NxWidgets/nxwm/include/nxwmconfig.hxx b/NxWidgets/nxwm/include/nxwmconfig.hxx index 18b35d83a..e5a85ac5a 100644 --- a/NxWidgets/nxwm/include/nxwmconfig.hxx +++ b/NxWidgets/nxwm/include/nxwmconfig.hxx @@ -47,7 +47,16 @@ /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ +/* General Configuration ****************************************************/ +/** + * NX Multi-user support is required + */ + +#ifndef CONFIG_NX_MULTIUSER +# warning "NX multi-user support is required (CONFIG_NX_MULTIUSER)" +#endif +/* Colors *******************************************************************/ /** * Normal background color */ @@ -80,5 +89,34 @@ # define CONFIG_NXWM_DEFAULT_SELECTEDFOREGROUNDCOLOR MKRGB(248,248,248) #endif +/* Task Bar Configuation ***************************************************/ +/* At present, all icons are 25 pixels in "widgth" and, hence require a + * task bar of at least that size. + */ + +#ifndef CONFIG_NXWM_TASKBAR_WIDTH +# define CONFIG_NXWM_TASKBAR_WIDTH (25+2*2) +#endif + +/* Check task bar location */ + +#if defined(CONFIG_NXWM_TASKBAR_TOP) +# if defined(CONFIG_NXWM_TASKBAR_BOTTOM) || defined (CONFIG_NXWM_TASKBAR_LEFT) || defined (CONFIG_NXWM_TASKBAR_RIGHT) +# warning "Multiple task positions specified" +# endif +#elif defined(CONFIG_NXWM_TASKBAR_BOTTOM) +# if defined (CONFIG_NXWM_TASKBAR_LEFT) || defined (CONFIG_NXWM_TASKBAR_RIGHT) +# warning "Multiple task positions specified" +# endif +#elif defined(CONFIG_NXWM_TASKBAR_LEFT) +# if defined defined (CONFIG_NXWM_TASKBAR_RIGHT) +# warning "Multiple task positions specified" +# endif +#elif !defined(CONFIG_NXWM_TASKBAR_RIGHT) +# warning "No task positions specified" +# define CONFIG_NXWM_TASKBAR_TOP 1 +#endif + +/* Colors *******************************************************************/ #endif // __INCLUDE_NXWM_CONFIG_HXX |