← Back to team overview

kicad-developers team mailing list archive

Re: Kicad Tool Framework

 

On 08/09/2013 10:15 PM, Dick Hollenbeck wrote:
> On 08/02/2013 12:10 PM, Tomasz Wlostowski wrote:
>> Hello,
>>
>> Thanks to Orson, Camille, Vesa and others we now have the cool and 
>> lightning-fast GAL-driven graphics view in pcbnew. Now it's time to make 
>> it do some real work, that means editing operations.
>>
>> Since the GAL does not allow XOR rendering, some significant refactoring 
>> of the editing tools' code will have to happen at some point. I took it 
>> as an opportunity to propose a tiny library/framework/abstraction (pick 
>> your favorite name) for the editing tools. Its main goals are:
>> - separate tool = separate class, contrary to the current state where 
>> all tools reside in PCB_EDIT_FRAME event handlers. This would allow for
>> writing new tools without touching the frame code (which is quite 
>> complex) and abstract tools into plugins.
>> - no "asynchronous" drawing. If a tool wants to draw something, it adds 
>> it to a VIEW, and the VIEW makes sure it's displayed in correct order 
>> and without damaging other parts of screen.
>> - eliminate static/global tool states.
>> - independence from the GUI toolkit and its quirks on different systems. 
>> Tools get the events in world space that are already adjusted to what's 
>> going on with the view (panning, scrolling, zoom, etc.)
>> - tools accessible from scripts
>>
>> I wrote a slightly longer technical description and uploaded it to the 
>> CERN project Wiki: http://www.ohwr.org/projects/cern-kicad/wiki/Kicad-tool.
>>
>> There is a demo available (kicad-gal-orson branch), that shows a simple 
>> selection tool (Go to Edit->Selection tool with the GAL view enabled). 
>> It's not yet useful for any practical purposes and very unstable - It's 
>> purpose is it just to show the overall idea and prepare ground for 
>> technical discussion.
>>
>> Thanks in advance for your feedback,
>> Tom
> 
> Tom,
> 
> You deserve better than this buddy.  Anyone give you feedback yet?
> 
> I will try to this weekend.  Please don't take the silence as anyone thinking your work is
> not exceedingly important.


Wayne, JP, anyone else, please give this document a look over, or live with the choices
Tom makes.   (Neither path is likely to be bad.)

Thanks,

Dick


> 
> 
> Thanks,
> 
> 
> Dick
> 



References