From 4b489525b44d49fa0f8cb95733dd0fdf4553c884 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 2 May 2012 22:03:05 +0000 Subject: 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 --- NxWidgets/libnxwidgets/include/cnxwidget.hxx | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'NxWidgets/libnxwidgets/include/cnxwidget.hxx') diff --git a/NxWidgets/libnxwidgets/include/cnxwidget.hxx b/NxWidgets/libnxwidgets/include/cnxwidget.hxx index eb1b18710..f46c2e73a 100644 --- a/NxWidgets/libnxwidgets/include/cnxwidget.hxx +++ b/NxWidgets/libnxwidgets/include/cnxwidget.hxx @@ -695,6 +695,41 @@ namespace NXWidgets return m_rect.getHeight(); } + /** + * Get the size of the widget + * + * @return The widgets's size + */ + + inline void getSize(struct nxgl_size_s &size) const + { + size.h = m_rect.getHeight(); + size.w = m_rect.getWidth(); + } + + /** + * Get the position of the widget + * + * @return The widgets's position + */ + + inline void getPos(struct nxgl_point_s &pos) const + { + pos.x = m_rect.getX(); + pos.y = m_rect.getY(); + } + + /** + * Get the window bounding box in physical display coordinated. + * + * @return This function returns the window handle. + */ + + inline CRect getBoundingBox(void) + { + return CRect(m_rect); + } + /** * Get the dimensions of the border * -- cgit v1.2.3