X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fgui%2Fewindow.cpp;h=83e65ec3d21a0e05aad092c92cb1e45f3924ae6b;hb=3e45b153a93894c4c382d3ba5ded974c738e9589;hp=06827a9eede6cefff82df4cd64ef8911c7e33edd;hpb=7eab308715ea1130166915574e3b691e08eb4482;p=vuplus_dvbapp diff --git a/lib/gui/ewindow.cpp b/lib/gui/ewindow.cpp index 06827a9..83e65ec 100644 --- a/lib/gui/ewindow.cpp +++ b/lib/gui/ewindow.cpp @@ -6,33 +6,36 @@ #include -eWindow::eWindow(eWidgetDesktop *desktop): eWidget(0) +eWindow::eWindow(eWidgetDesktop *desktop, int z): eWidget(0) { m_flags = 0; + m_desktop = desktop; /* ask style manager for current style */ ePtr mgr; eWindowStyleManager::getInstance(mgr); ePtr style; if (mgr) - mgr->getStyle(style); + mgr->getStyle(desktop->getStyleID(), style); /* when there is either no style manager or no style, revert to simple style. */ if (!style) style = new eWindowStyleSimple(); setStyle(style); + + setZPosition(z); /* must be done before addRootWidget */ /* we are the parent for the child window. */ /* as we are in the constructor, this is thread safe. */ m_child = this; m_child = new eWidget(this); - desktop->addRootWidget(this, 0); + desktop->addRootWidget(this); } eWindow::~eWindow() { - getDesktop()->removeRootWidget(this); + m_desktop->removeRootWidget(this); m_child->destruct(); } @@ -49,6 +52,13 @@ std::string eWindow::getTitle() const return m_title; } +void eWindow::setBackgroundColor(const gRGB &col) +{ + /* set background color for child, too */ + eWidget::setBackgroundColor(col); + m_child->setBackgroundColor(col); +} + void eWindow::setFlag(int flags) { m_flags |= flags;