x = 0; // FIXME_MGL, something better, see GTK+
if ( y == -1 )
y = 0; // FIXME_MGL, something better, see GTK+
+ AdjustForParentClientOrigin(x, y, 0);
w = WidthDefault(size.x);
h = HeightDefault(size.y);
width = currentW;
}
}
-
+
if ( height == -1 )
{
if ( sizeFlags & wxSIZE_AUTO_HEIGHT )
height = currentH;
}
}
+
+ int maxWidth = GetMaxWidth(),
+ minWidth = GetMinWidth(),
+ maxHeight = GetMaxHeight(),
+ minHeight = GetMinHeight();
+
+ if ( minWidth != -1 && width < minWidth ) width = minWidth;
+ if ( maxWidth != -1 && width > maxWidth ) width = maxWidth;
+ if ( minHeight != -1 && height < minHeight ) height = minHeight;
+ if ( maxHeight != -1 && height > maxHeight ) height = maxHeight;
if ( m_wnd->x != x || m_wnd->y != y ||
(int)m_wnd->width != width || (int)m_wnd->height != height )
return;
}
-#if 0 // FIXME_MGL -- debugging stuff!
- dc->setColorRGB(255,0,255);
- dc->fillRect(-1000,-1000,2000,2000);
- wxUsleep(50);
+#ifdef __WXDEBUG__
+ // FIXME_MGL -- debugging stuff, to be removed!
+ static int debugPaintEvents = -1;
+ if ( debugPaintEvents == -1 )
+ debugPaintEvents = wxGetEnv(wxT("WXMGL_DEBUG_PAINT_EVENTS"), NULL);
+ if ( debugPaintEvents )
+ {
+ dc->setColorRGB(255,0,255);
+ dc->fillRect(-1000,-1000,2000,2000);
+ wxUsleep(50);
+ }
#endif
MGLRegion clip;