diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 22:03:05 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 22:03:05 +0000 |
commit | 4b489525b44d49fa0f8cb95733dd0fdf4553c884 (patch) | |
tree | 8773aca5097c9c4fd1006bf1e35685c55619ce17 /NxWidgets/nxwm/include/capplicationwindow.hxx | |
parent | 5ebf11ee63f1baaf070fd8484d99362810cd5bcc (diff) | |
download | nuttx-4b489525b44d49fa0f8cb95733dd0fdf4553c884.tar.gz nuttx-4b489525b44d49fa0f8cb95733dd0fdf4553c884.tar.bz2 nuttx-4b489525b44d49fa0f8cb95733dd0fdf4553c884.zip |
NxWM updates (with some NX and NxWidget fixes too)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4689 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/include/capplicationwindow.hxx')
-rw-r--r-- | NxWidgets/nxwm/include/capplicationwindow.hxx | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/NxWidgets/nxwm/include/capplicationwindow.hxx b/NxWidgets/nxwm/include/capplicationwindow.hxx index adeac30dc..167f51997 100644 --- a/NxWidgets/nxwm/include/capplicationwindow.hxx +++ b/NxWidgets/nxwm/include/capplicationwindow.hxx @@ -136,6 +136,19 @@ namespace NxWM bool open(void); /** + * Re-draw the application window + */ + + void redraw(void); + + /** + * The application window is hidden (either it is minimized or it is + * maximized, but not at the top of the hierarchy) + */ + + void hide(void); + + /** * Recover the contained NXTK window instance * * @return. The window used by this application @@ -173,7 +186,17 @@ namespace NxWM inline void clickMinimizeIcon(int index) { - m_minimizeImage->click(0,0); + // Get the size and position of the widget + + struct nxgl_size_s imageSize; + m_minimizeImage->getSize(imageSize); + + struct nxgl_point_s imagePos; + m_minimizeImage->getPos(imagePos); + + // And click the image at its center + + m_minimizeImage->click(imagePos.x + (imageSize.w >> 1), imagePos.y + (imageSize.h >> 1)); } /** @@ -183,9 +206,19 @@ namespace NxWM inline void clickStopIcon(int index) { - m_stopImage->click(0,0); + // Get the size and position of the widget + + struct nxgl_size_s imageSize; + m_stopImage->getSize(imageSize); + + struct nxgl_point_s imagePos; + m_stopImage->getPos(imagePos); + + // And click the image at its center + + m_stopImage->click(imagePos.x + (imageSize.w >> 1), imagePos.y + (imageSize.h >> 1)); } - }; + }; } #endif // __cplusplus |