summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm/include/ctaskbar.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/ctaskbar.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/ctaskbar.hxx')
-rw-r--r--NxWidgets/nxwm/include/ctaskbar.hxx29
1 files changed, 26 insertions, 3 deletions
diff --git a/NxWidgets/nxwm/include/ctaskbar.hxx b/NxWidgets/nxwm/include/ctaskbar.hxx
index 994b918ae..7a6812901 100644
--- a/NxWidgets/nxwm/include/ctaskbar.hxx
+++ b/NxWidgets/nxwm/include/ctaskbar.hxx
@@ -97,7 +97,7 @@ namespace NxWM
NXWidgets::CNxWindow *m_taskbar; /**< The task bar window */
NXWidgets::CNxWindow *m_background; /**< The background window */
NXWidgets::CImage *m_backImage; /**< The background image */
- IApplication *m_topapp; /**< The top application in the hierarchy */
+ IApplication *m_topApp; /**< The top application in the hierarchy */
TNxArray<struct STaskbarSlot> m_slots; /**< List of application slots in the task bar */
/**
@@ -192,6 +192,15 @@ namespace NxWM
bool redrawApplicationWindow(IApplication *app);
/**
+ * The application window is hidden (either it is minimized or it is
+ * maximized, but not at the top of the hierarchy)
+ *
+ * @param app. The application to hide
+ */
+
+ void hideApplicationWindow(IApplication *app);
+
+ /**
* Handle a mouse button click event.
*
* @param e The event data.
@@ -353,14 +362,28 @@ namespace NxWM
/**
* Simulate a mouse click on the icon at index. This inline method is only
- * used duringautomated testing of NxWM.
+ * used during automated testing of NxWM.
*/
inline void clickIcon(int index)
{
if (index < m_slots.size())
{
- m_slots.at(index).image->click(0,0);
+ // Get the image widget at this index
+
+ NXWidgets::CImage *image = m_slots.at(index).image;
+
+ // Get the size and position of the widget
+
+ struct nxgl_size_s imageSize;
+ image->getSize(imageSize);
+
+ struct nxgl_point_s imagePos;
+ image->getPos(imagePos);
+
+ // And click the image at its center
+
+ image->click(imagePos.x + (imageSize.w >> 1), imagePos.y + (imageSize.h >> 1));
}
}
};