← Back to team overview

kicad-developers team mailing list archive

Re: Question about GeneralControl


On 8/19/2013 2:43 AM, Lorenzo Marcantonio wrote:
> I'm trying to refactor the common movement key handling. Also there is
> a cursor xor glitch when the screen moves. The relevant code at the
> moment is duplicated around the frames in the abstract GeneralControl
> method.
> I suppose that the F1-F4/Home/Space is handled there in the 'minor'
> frames because for the important one it's done in the hotkey dispatcher.
> The hotkey dispatch on the end also is different for eeschema because of
> the 'multisheet' nature of eeschema (and anyway it's little more than
> a one liner).


If you can refactor GeneralControl to clean it up, I'm all for it.  I've
made few minor changes here and there over the years but I've never been
terribly happy with the results.  It always seemed to be like there
should be a better way to handle the cursor movement keys.  You may want
to wait and see what Tom's tool object brings to the table.  It may make
more sense to push the behavior in GeneralControl into a tool derived
from that work.

> The thing I don't get is the use of conditional USE_WX_OVERLAY code in
> the crosshair repainting. Many (most?) of the frames contains it, others
> one simply don't. I have no idea of WX_OVERLAY is, anyway...
> How is the status for these blocks? Can they made all using that ifdef
> (or maybe it's an obsolete ifdef not used for years?) or should they
> stay exactly as they are now (someone with, someone without)?
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?


Follow ups