m_caret = (wxCaret *)NULL;
#endif // wxUSE_CARET
+#if wxUSE_PALETTE
+ m_hasCustomPalette = FALSE;
+#endif // wxUSE_PALETTE
+
// Whether we're using the current theme for this window (wxGTK only for now)
m_themeEnabled = FALSE;
}
wxRect rect = wxGetClientDisplayRect();
wxSize size (rect.width,rect.height);
+#ifndef __WXMGL__ // FIXME - temporary dirty hack!!
if (posParent.x >= 0) // if parent is on the main display
+#endif
{
if (xNew < 0)
xNew = 0;
else if (xNew+width > size.x)
xNew = size.x-width-1;
}
+#ifndef __WXMGL__ // FIXME - temporary dirty hack!!
if (posParent.y >= 0) // if parent is on the main display
+#endif
{
if (yNew+height > size.y)
yNew = size.y-height-1;
return TRUE;
}
+#if wxUSE_PALETTE
+
+void wxWindowBase::SetPalette(const wxPalette& pal)
+{
+ m_hasCustomPalette = TRUE;
+ m_palette = pal;
+
+ // VZ: can anyone explain me what do we do here?
+ wxWindowDC d((wxWindow *) this);
+ d.SetPalette(pal);
+}
+
+wxWindow *wxWindowBase::GetAncestorWithCustomPalette() const
+{
+ wxWindow *win = (wxWindow *)this;
+ while ( win && !win->HasCustomPalette() )
+ {
+ win = win->GetParent();
+ }
+
+ return win;
+}
+
+#endif // wxUSE_PALETTE
+
#if wxUSE_CARET
void wxWindowBase::SetCaret(wxCaret *caret)
{
#endif // wxUSE_HELP
// ----------------------------------------------------------------------------
-// tooltips
+// tooltipsroot.Replace("\\", "/");
// ----------------------------------------------------------------------------
#if wxUSE_TOOLTIPS
GetClientSize(&w, &h);
GetSizer()->SetDimension( 0, 0, w, h );
-#if defined __WXPM__
- OS2Layout(w, h);
-#endif
}
else
{