eListbox::~eListbox()
{
+ if (m_scrollbar)
+ delete m_scrollbar;
+
ePtr<eActionMap> ptr;
eActionMap::getInstance(ptr);
ptr->unbindAction(this, 0);
m_parent = 0;
- /* destroy all childs */
+ /* tell all childs that the parent is not anymore existing */
ePtrList<eWidget>::iterator i(m_childs.begin());
while (i != m_childs.end())
{
- (*i)->m_parent = 0;
- delete *i;
+ (*i)->parentRemoved();
i = m_childs.erase(i);
}
}
} while(1);
}
+void eWidget::parentRemoved()
+{
+ m_parent = 0;
+}
+
int eWidget::event(int event, void *data, void *data2)
{
switch (event)
void doPaint(gPainter &painter, const gRegion ®ion);
void recalcClipRegionsWhenVisible();
+ void parentRemoved();
+
gRGB m_background_color;
int m_have_background_color;
eWindow::~eWindow()
{
getDesktop()->removeRootWidget(this);
+ m_child->destruct();
}
void eWindow::setTitle(const std::string &string)
for w in self.additionalWidgets:
w.instance = w.widget(parent)
- w.instance.thisown = 0
+ # w.instance.thisown = 0
applyAllAttributes(w.instance, desktop, w.skinAttributes)
for f in self.onLayoutFinish: