summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm/include/capplicationwindow.hxx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-02 22:03:05 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-02 22:03:05 +0000
commit4b489525b44d49fa0f8cb95733dd0fdf4553c884 (patch)
tree8773aca5097c9c4fd1006bf1e35685c55619ce17 /NxWidgets/nxwm/include/capplicationwindow.hxx
parent5ebf11ee63f1baaf070fd8484d99362810cd5bcc (diff)
downloadnuttx-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.hxx39
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