kicad-developers team mailing list archive
Mailing list archive
Re: Question about GeneralControl
On Wed, Aug 21, 2013 at 10:52:38AM -0400, Wayne Stambaugh wrote:
> AFAIK WX_OVERLAY is for use by OSX only due to some display issues. If
> there are wxOverlays without the conditional build #ifdef WX_OVERLAY,
> this could be a problem. Any of you OSX developers care to comment on this?
There are, a couple of them. The footprint display in cvpcb, the library
viewer in eeschema, the footprint wizard frame, the footprint viewer,
have no USE_WX_OVERLAY, other than that the section is identical. Maybe
it's needed only for user interaction i.e. rubberbanding? Since these
are read only views it isn't needed (but shouldn't give problems,
I factored two thing from GeneralControl, in two protected methods:
- The first block: handles snapping the pos to the grid (if needed) and
the big switch with the cursor keys (I added the ctrl-arrow to move 10
steps at a time, I find it useful); this also remove the need for
acquiring the grid in most of these functions.
- The second block: the if (oldpos != newpos) to redraw the crosshair
and do the mouse capture callback (this is where the overlay is used).
The part in between varies wildly (the pcb edit is the most complex
since it also does snapping and DRC), in the minor views I left
a smaller switch for the F1-F4/Space handling; this of course could be