m_vis = 0;
m_desktop = 0;
m_have_background_color = 0;
+ m_z_position = 0;
m_client_offset = eSize(0, 0);
if (m_parent)
{
- m_parent->m_childs.push_back(this);
+ insertIntoParent();
m_parent->getStyle(m_style);
}
m_have_background_color = 0;
}
+void eWidget::setZPosition(int z)
+{
+ m_z_position = z;
+ if (!m_parent)
+ return;
+
+ m_parent->m_childs.remove(this);
+
+ insertIntoParent(); /* now at the new Z position */
+}
+
void eWidget::mayKillFocus()
{
setFocus(0);
}
}
+void eWidget::insertIntoParent()
+{
+ ePtrList<eWidget>::iterator i = m_parent->m_childs.begin();
+
+ for(;;)
+ {
+ if ((i == m_parent->m_childs.end()) || (i->m_z_position > m_z_position))
+ {
+ m_parent->m_childs.insert(i, this);
+ return;
+ }
+ }
+}
+
void eWidget::doPaint(gPainter &painter, const gRegion &r)
{
if (m_visible_with_childs.empty())
void setBackgroundColor(const gRGB &col);
void clearBackgroundColor();
+ void setZPosition(int z);
+
/* untested code */
int isVisible() { return (m_vis & wVisShow) && ((!m_parent) || m_parent->isVisible()); }
/* ... */
ePtr<eWindowStyle> m_style;
+ void insertIntoParent();
void doPaint(gPainter &painter, const gRegion ®ion);
void recalcClipRegionsWhenVisible();
int m_have_background_color;
eWidget *m_current_focus, *m_focus_owner;
+
+ int m_z_position;
+
protected:
virtual ~eWidget();
void mayKillFocus();