kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #01341
Re: OSX suggestions.
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"emmedics4" <m.serantoni@...>
-
Date:
Sun, 30 Mar 2008 18:40:46 -0000
-
In-reply-to:
<CADCEC9B-14C2-4507-9203-4C5C0E832769@...>
-
User-agent:
eGroups-EW/0.82
> The most serious issue, which makes KiCAD not work on Mac, is the
> previously discussed issues related to invalid use of graphics
> contexts with wxWidgets-2.8. Earlier, it was possible to revert to
> wxWidgets-2.6, but this old version is not maintained any longer, and
> fails to build on Leopard.
I've done some investigations and the change that makes the graphics work
on 2.6 and not on 2.8 is the variable wxMAC_USE_CORE_GRAPHICS in setup.h that changes its status
from 0 in 2.6 to 1 in 2.8.
This setting enables as default CoreGraphics (Quartz) on opposite of the old QuickDraw Routines.
Limitation of the CoreGraphics is the possibility for only one wxDC interact with an entire window.
The sad thing of all that is that in wx 3.0 old QuickDraw Routines will be purged out.
> To fix this properly (i.e. using the native wxWidgets-2.8), I think
> KiCAD's drawing code should be reorganized to only redraw when
> triggered from a paint event. My peeks into this so far indicates that
> this is mainly an issue with statusbar rendering, as well as redraws
> while reading a design file. The problems are most visible in the
> pcbnew app.
I've a proposal for the msgpanel.cpp that follows to mitigate that effect.
> Another missing piece is making the CMake build system work for the
> Mac port.
I'vent much experience on CMake, old makefiles should work for a lot in thewhile :)
> Unfortunately, I don't have enough time to spare to dig into these
> issues, but I'm more than willing to help out testing, discussing,
> code reviewing etc.
Seems enough ;)
Index: common/msgpanel.cpp
===================================================================
--- common/msgpanel.cpp (revision 949)
+++ common/msgpanel.cpp (working copy)
@@ -43,9 +43,9 @@
/*************************************************/
{
wxPaintDC dc( this );
-
- //EraseMsgBox( &dc );
-
+#ifdef __WXMAC__
+ EraseMsgBox( &dc );
+#endif
dc.SetBackground( *wxBLACK_BRUSH );
dc.SetBackgroundMode( wxSOLID );
@@ -136,8 +136,11 @@
{
m_Items.push_back( item );
}
-
+#ifndef __WXMAC__
showItem( dc, item );
+#else
+ this->Refresh();
+#endif
}
@@ -172,9 +175,14 @@
/* Effacement de la fenetre d'affichage des messages de bas d'ecran
*/
{
+#ifndef __WXMAC__
wxClientDC dc( this );
EraseMsgBox( &dc );
+#else
+ m_Items.clear();
+ this->Refresh();
+#endif
}
@@ -200,7 +208,8 @@
DC->DrawRectangle( 0, 0, size.x, size.y );
DC->SetBrush( wxNullBrush );
DC->SetPen( wxNullPen );
-
+#ifndef __WXMAC__
m_Items.clear();
+#endif
}
Follow ups
References