if (m_position == pos)
return;
+ /* ?? what about native move support? */
+ invalidate();
+
m_position = pos;
event(evtChangedPosition);
insertIntoParent(); /* now at the new Z position */
}
+void eWidget::setTransparent(int transp)
+{
+ if (transp)
+ m_vis |= wVisTransparent;
+ else
+ m_vis &=~wVisTransparent;
+}
+
void eWidget::mayKillFocus()
{
setFocus(0);
m_parent->m_childs.insert(i, this);
return;
}
+ ++i;
}
}
if (m_visible_with_childs.empty())
return;
- gRegion region = r;
+ gRegion region = r, childs = r;
/* we were in parent's space, now we are in local space */
region.moveBy(-position());
painter.moveOffset(position());
- /* walk all childs */
- for (ePtrList<eWidget>::iterator i(m_childs.begin()); i != m_childs.end(); ++i)
- i->doPaint(painter, region);
/* check if there's anything for us to paint */
region &= m_visible_region;
painter.resetClip(region);
event(evtPaint, ®ion, &painter);
}
+
+ childs.moveBy(-position());
+ /* walk all childs */
+ for (ePtrList<eWidget>::iterator i(m_childs.begin()); i != m_childs.end(); ++i)
+ i->doPaint(painter, childs);
painter.moveOffset(-position());
}
// eDebug("eWidget::evtPaint");
// dumpRegion(*(gRegion*)data);
- if (!m_have_background_color)
+ if (!isTransparent())
{
- ePtr<eWindowStyle> style;
- if (!getStyle(style))
- style->paintBackground(painter, ePoint(0, 0), size());
+ if (!m_have_background_color)
+ {
+ ePtr<eWindowStyle> style;
+ if (!getStyle(style))
+ style->paintBackground(painter, ePoint(0, 0), size());
+ } else
+ {
+ painter.setBackgroundColor(m_background_color);
+ painter.clear();
+ }
} else
{
- painter.setBackgroundColor(m_background_color);
- painter.clear();
+ if (m_have_background_color)
+ painter.setBackgroundColor(m_background_color);
}
break;
}