From a63f8bb684d01a23bfe1ee85b1d7faf983b9d1ea Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 28 Feb 2013 18:48:11 +0000 Subject: NxWidgets/NxWM updates from Petteri Aimonen (Patches 0007-0013) git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5689 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/nxwm/src/capplicationwindow.cxx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'NxWidgets/nxwm/src/capplicationwindow.cxx') diff --git a/NxWidgets/nxwm/src/capplicationwindow.cxx b/NxWidgets/nxwm/src/capplicationwindow.cxx index d2e044298..77d196d07 100644 --- a/NxWidgets/nxwm/src/capplicationwindow.cxx +++ b/NxWidgets/nxwm/src/capplicationwindow.cxx @@ -1,7 +1,7 @@ /******************************************************************************************** * NxWidgets/nxwm/src/capplicationwindow.cxx * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -54,6 +54,18 @@ * Pre-Processor Definitions ********************************************************************************************/ +#ifdef CONFIG_NXWM_STOP_BITMAP +extern const struct NXWidgets::SRlePaletteBitmap CONFIG_NXWM_STOP_BITMAP; +#else +# define CONFIG_NXWM_STOP_BITMAP g_stopBitmap +#endif + +#ifdef CONFIG_NXWM_MINIMIZE_BITMAP +extern const struct NXWidgets::SRlePaletteBitmap CONFIG_NXWM_MINIMIZE_BITMAP; +#else +# define CONFIG_NXWM_MINIMIZE_BITMAP g_minimizeBitmap +#endif + /******************************************************************************************** * CApplicationWindow Method Implementations ********************************************************************************************/ @@ -192,7 +204,7 @@ bool CApplicationWindow::open(void) { // Create STOP bitmap container - m_stopBitmap = new NXWidgets::CRlePaletteBitmap(&g_stopBitmap); + m_stopBitmap = new NXWidgets::CRlePaletteBitmap(&CONFIG_NXWM_STOP_BITMAP); if (!m_stopBitmap) { return false; @@ -244,7 +256,7 @@ bool CApplicationWindow::open(void) #ifndef CONFIG_NXWM_DISABLE_MINIMIZE // Create MINIMIZE application bitmap container - m_minimizeBitmap = new NXWidgets::CRlePaletteBitmap(&g_minimizeBitmap); + m_minimizeBitmap = new NXWidgets::CRlePaletteBitmap(&CONFIG_NXWM_MINIMIZE_BITMAP); if (!m_minimizeBitmap) { return false; @@ -375,7 +387,7 @@ void CApplicationWindow::redraw(void) m_minimizeImage->redraw(); m_minimizeImage->setRaisesEvents(true); } - + // And finally draw the window label m_windowLabel->enableDrawing(); @@ -406,7 +418,7 @@ void CApplicationWindow::hide(void) m_minimizeImage->disableDrawing(); m_minimizeImage->setRaisesEvents(false); } - + // Disable the window label m_windowLabel->disableDrawing(); -- cgit v1.2.3