eWindow::eWindow(eWidgetDesktop *desktop, int z): eWidget(0)
{
m_flags = 0;
+ m_animation_mode = 0x11;
m_desktop = desktop;
/* ask style manager for current style */
ePtr<eWindowStyleManager> mgr;
ePtr<eWindowStyle> 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)
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;
return eWidget::event(event, data, data2);
}
+void eWindow::show()
+{
+ if (m_animation_mode & 0x01)
+ m_desktop->sendShow(position(), size());
+ eWidget::show();
+}
+
+void eWindow::hide()
+{
+ if (m_animation_mode & 0x10)
+ m_desktop->sendHide(position(), size());
+ eWidget::hide();
+}
+
+void eWindow::setAnimationMode(int mode)
+{
+ /*
+ * 0x00 = animation off
+ * 0x01 = show on
+ * 0x10 = hide on
+ * 0x11 = animation on
+ */
+ m_animation_mode = mode;
+}