wxWindow* wx = (wxWindow*) wxFindControlFromMacControl( iControl ) ;
if ( wx != NULL )
{
- /*
const wxBrush &brush = wx->MacGetBackgroundBrush() ;
if ( brush.Ok() )
{
-
wxDC::MacSetupBackgroundForCurrentPort( brush ) ;
- */
- // this clipping is only needed for non HIView
RgnHandle clip = NewRgn() ;
int x = 0 , y = 0;
DisposeRgn( clip ) ;
status = noErr ;
- /*
}
else if ( wx->MacIsUserPane() )
{
// setup of our parent ourselves
status = SetUpControlBackground( (ControlRef) wx->GetParent()->GetHandle() , iDepth , iIsColor ) ;
}
- */
}
}
break ;
#if !TARGET_API_MAC_OSX
// eventually we can fix some clipping issues be reactivating this hook
//if ( m_macIsUserPane )
- // SetControlColorProc( *m_peer , wxMacSetupControlBackgroundUPP ) ;
+ // SetControlColorProc( m_peer->GetControlRef() , wxMacSetupControlBackgroundUPP ) ;
#endif
m_peer->SetTitle( wxStripMenuCodes(m_label) ) ;
{
// only under OSX the visibility of the TLW is taken into account
#if TARGET_API_MAC_OSX
- return m_peer->IsVisible();
-#else
+ if ( m_peer && m_peer->Ok() )
+ return m_peer->IsVisible();
+#endif
wxWindow* win = this ;
while( win->IsShown() )
{
} ;
return false ;
-#endif
}
bool wxWindowMac::MacIsReallyEnabled()
void wxWindowMac::OnEraseBackground(wxEraseEvent& event)
{
+#if TARGET_API_MAC_OSX
if ( m_macBackgroundBrush.Ok() == false || m_macBackgroundBrush.GetStyle() == wxTRANSPARENT )
{
event.Skip() ;
}
else
+#endif
event.GetDC()->Clear() ;
}
int major,minor;
wxGetOsVersion( &major, &minor );
- RGBColor white = { 0xFFFF, 0xFFFF , 0xFFFF } ;
- RGBColor face = { 0xDDDD, 0xDDDD , 0xDDDD } ;
-
RGBColor darkShadow = { 0x0000, 0x0000 , 0x0000 } ;
RGBColor lightShadow = { 0x4444, 0x4444 , 0x4444 } ;
// OS X has lighter border edges than classic:
InsetRect( &rect , border , border );
DrawThemeEditTextFrame(&rect,IsEnabled() ? kThemeStateActive : kThemeStateInactive) ;
#else
+ RGBColor white = { 0xFFFF, 0xFFFF , 0xFFFF } ;
+ RGBColor face = { 0xDDDD, 0xDDDD , 0xDDDD } ;
+
bool sunken = HasFlag( wxSUNKEN_BORDER ) ;
RGBForeColor( &face );
MoveTo( left + 0 , top + h - 2 );