summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-17 13:50:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-17 13:50:02 +0000
commit925415fbda596e6da11429a72f57f2574ce50844 (patch)
treeee651f9e8843afb0fdec7a023e3f377fbd596052 /NxWidgets/libnxwidgets/src/cnxtkwindow.cxx
parentdbda56e617cfde1910ecf6091a76038f44dff65d (diff)
downloadnuttx-925415fbda596e6da11429a72f57f2574ce50844.tar.gz
nuttx-925415fbda596e6da11429a72f57f2574ce50844.tar.bz2
nuttx-925415fbda596e6da11429a72f57f2574ce50844.zip
Patches 7-9 from Petteri Aimonen
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5365 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets/src/cnxtkwindow.cxx')
-rw-r--r--NxWidgets/libnxwidgets/src/cnxtkwindow.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx
index 05241817c..57ca5eb2b 100644
--- a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx
+++ b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx
@@ -65,7 +65,7 @@ using namespace NXWidgets;
* @param hNxServer Handle to the NX server.
* @param widgetControl Controlling widget for this window.
*/
-
+
CNxTkWindow::CNxTkWindow(NXHANDLE hNxServer, CWidgetControl *widgetControl)
: CCallback(widgetControl)
{
@@ -101,6 +101,8 @@ CNxTkWindow::~CNxTkWindow(void)
// constructed-us.
(void)nxtk_closewindow(m_hNxTkWindow);
+
+ delete m_widgetControl;
}
/**
@@ -137,7 +139,7 @@ CWidgetControl *CNxTkWindow::getWidgetControl(void) const
/**
* Open a toolbar on the framed window. This method both instantiates
- * the toolbar object AND calls the INxWindow::open() method to
+ * the toolbar object AND calls the INxWindow::open() method to
* create the toolbar. The toolbar is ready for use upon return.
*
* @param height. The height in rows of the tool bar
@@ -184,7 +186,7 @@ CNxToolbar *CNxTkWindow::openToolbar(nxgl_coord_t height, CWidgetControl *widget
widgetControl->setWidgetStyle(&style);
// And create the toolbar
-
+
m_toolbar = new CNxToolbar(this, m_hNxTkWindow,
widgetControl, height);
if (!m_toolbar)
@@ -218,7 +220,7 @@ CNxToolbar *CNxTkWindow::openToolbar(nxgl_coord_t height, CWidgetControl *widget
// Provide parent widget control information to new widget control instance.
// This information is reported by an NX callback for "normal" windows. But
- // the toolbar widget control does not get NX callbacks and has to get the
+ // the toolbar widget control does not get NX callbacks and has to get the
// window size through the setWindowBounds method.
// Disable preemption so that we can be assured that all of the following
@@ -309,7 +311,7 @@ bool CNxTkWindow::getSize(FAR struct nxgl_size_s *size)
* @param pos The new position of the window.
* @return True on success, false on any failure.
*/
-
+
bool CNxTkWindow::setPosition(FAR const struct nxgl_point_s *pos)
{
// Set the window size and position
@@ -323,7 +325,7 @@ bool CNxTkWindow::setPosition(FAR const struct nxgl_point_s *pos)
* @param size The new size of the window.
* @return True on success, false on any failure.
*/
-
+
bool CNxTkWindow::setSize(FAR const struct nxgl_size_s *size)
{
// Set the window size