X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/821099592d721f82eeb92c32c7e8e60847c37294..8bca86cd0957744b9b1439c0ef63debb2e562c94:/lib/gui/ewindow.cpp diff --git a/lib/gui/ewindow.cpp b/lib/gui/ewindow.cpp index 622e8b0a..910acda4 100644 --- a/lib/gui/ewindow.cpp +++ b/lib/gui/ewindow.cpp @@ -6,9 +6,10 @@ #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); @@ -22,17 +23,20 @@ eWindow::eWindow(eWidgetDesktop *desktop): eWidget(0) 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(); } void eWindow::setTitle(const std::string &string) @@ -43,6 +47,19 @@ void eWindow::setTitle(const std::string &string) event(evtTitleChanged); } +std::string eWindow::getTitle() const +{ + return m_title; +} + +void eWindow::setBackgroundColor(const gRGB &col) +{ + eDebug("eWindow: Set background color!"); + /* set background color for child, too */ + eWidget::setBackgroundColor(col); + m_child->setBackgroundColor(col); +} + void eWindow::setFlag(int flags) { m_flags |= flags;