diff options
Diffstat (limited to 'NxWidgets/nxwm/src')
-rw-r--r-- | NxWidgets/nxwm/src/capplicationwindow.cxx | 30 | ||||
-rw-r--r-- | NxWidgets/nxwm/src/chexcalculator.cxx | 2 | ||||
-rw-r--r-- | NxWidgets/nxwm/src/cstartwindow.cxx | 2 | ||||
-rw-r--r-- | NxWidgets/nxwm/src/ctaskbar.cxx | 19 |
4 files changed, 41 insertions, 12 deletions
diff --git a/NxWidgets/nxwm/src/capplicationwindow.cxx b/NxWidgets/nxwm/src/capplicationwindow.cxx index 65de1b1a4..d2e044298 100644 --- a/NxWidgets/nxwm/src/capplicationwindow.cxx +++ b/NxWidgets/nxwm/src/capplicationwindow.cxx @@ -241,6 +241,7 @@ bool CApplicationWindow::open(void) m_stopImage->addWidgetEventHandler(this); } +#ifndef CONFIG_NXWM_DISABLE_MINIMIZE // Create MINIMIZE application bitmap container m_minimizeBitmap = new NXWidgets::CRlePaletteBitmap(&g_minimizeBitmap); @@ -289,6 +290,7 @@ bool CApplicationWindow::open(void) m_minimizeImage->setBorderless(true); m_minimizeImage->addWidgetEventHandler(this); +#endif // The rest of the toolbar will hold the left-justified application label // Create the default font instance @@ -364,12 +366,16 @@ void CApplicationWindow::redraw(void) m_stopImage->setRaisesEvents(true); } - // Draw the minimize image - - m_minimizeImage->enableDrawing(); - m_minimizeImage->redraw(); - m_minimizeImage->setRaisesEvents(true); + // Draw the minimize image (which may not be present if this is a + // mimimization is disabled) + if (m_minimizeImage) + { + m_minimizeImage->enableDrawing(); + m_minimizeImage->redraw(); + m_minimizeImage->setRaisesEvents(true); + } + // And finally draw the window label m_windowLabel->enableDrawing(); @@ -392,11 +398,15 @@ void CApplicationWindow::hide(void) m_stopImage->setRaisesEvents(false); } - // Disable the minimize image - - m_minimizeImage->disableDrawing(); - m_minimizeImage->setRaisesEvents(false); + // Disable the minimize image(which may not be present if this is a + // mimimization is disabled) + if (m_minimizeImage) + { + m_minimizeImage->disableDrawing(); + m_minimizeImage->setRaisesEvents(false); + } + // Disable the window label m_windowLabel->disableDrawing(); @@ -570,7 +580,7 @@ void CApplicationWindow::handleActionEvent(const NXWidgets::CWidgetEventArgs &e) // Check the minimize image (only if the stop application image is not pressed) - else if (m_minimizeImage->isClicked()) + else if (m_minimizeImage && m_minimizeImage->isClicked()) { // Notify the controlling logic that the application should be miminsed diff --git a/NxWidgets/nxwm/src/chexcalculator.cxx b/NxWidgets/nxwm/src/chexcalculator.cxx index f8f1bb246..eeb0b1d1d 100644 --- a/NxWidgets/nxwm/src/chexcalculator.cxx +++ b/NxWidgets/nxwm/src/chexcalculator.cxx @@ -191,6 +191,8 @@ namespace NxWM * CHexCalculator Method Implementations ********************************************************************************************/ +extern const struct NXWidgets::SRlePaletteBitmap CONFIG_NXWM_HEXCALCULATOR_ICON; + using namespace NxWM; /** diff --git a/NxWidgets/nxwm/src/cstartwindow.cxx b/NxWidgets/nxwm/src/cstartwindow.cxx index 5c54cba3a..a99e81d88 100644 --- a/NxWidgets/nxwm/src/cstartwindow.cxx +++ b/NxWidgets/nxwm/src/cstartwindow.cxx @@ -71,6 +71,8 @@ FAR const char *NxWM::g_startWindowMqName = CONFIG_NXWM_STARTWINDOW_MQNAME; * CStartWindow Method Implementations ********************************************************************************************/ +extern const struct NXWidgets::SRlePaletteBitmap CONFIG_NXWM_STARTWINDOW_ICON; + using namespace NxWM; /** diff --git a/NxWidgets/nxwm/src/ctaskbar.cxx b/NxWidgets/nxwm/src/ctaskbar.cxx index c494fcba3..23d2d23b5 100644 --- a/NxWidgets/nxwm/src/ctaskbar.cxx +++ b/NxWidgets/nxwm/src/ctaskbar.cxx @@ -991,6 +991,7 @@ bool CTaskbar::createBackgroundWindow(void) bool CTaskbar::createBackgroundImage(void) { +#ifndef CONFIG_NXWM_DISABLE_BACKGROUND_IMAGE // Get the size of the display struct nxgl_size_s windowSize; @@ -1054,6 +1055,8 @@ bool CTaskbar::createBackgroundImage(void) m_backImage->setBorderless(true); m_backImage->setRaisesEvents(false); +#endif + return true; } @@ -1128,6 +1131,10 @@ bool CTaskbar::redrawTaskbarWindow(void) image->disableDrawing(); image->setRaisesEvents(false); + // Highlight the icon for the top-most window + + image->highlight(m_slots.at(i).app == m_topApp); + // Get the size of the icon image NXWidgets::CRect rect; @@ -1302,8 +1309,12 @@ bool CTaskbar::redrawBackgroundWindow(void) // Then re-draw the background image on the window - m_backImage->enableDrawing(); - m_backImage->redraw(); + if (m_backImage) + { + m_backImage->enableDrawing(); + m_backImage->redraw(); + } + return true; } @@ -1330,6 +1341,10 @@ bool CTaskbar::redrawApplicationWindow(IApplication *app) raiseTopApplication(); + // Redraw taskbar + + redrawTaskbarWindow(); + // Every application provides a method to obtain its application window IApplicationWindow *appWindow = app->getWindow(); |