← Back to team overview

kicad-developers team mailing list archive

Re: Events inside kicad

 

On 10/26/2010 2:58 PM, Marco Serantoni wrote:
> 
> On 26/ott/2010, at 20.54, Dick Hollenbeck wrote:
> 
>> On 10/26/2010 01:50 PM, Marco Serantoni wrote:
>>> In those days i was thinking about to add an internal event generation for some kicad classes.
>>> Adding internal events at wxAUIManager could be a good start to implement "external frames" and utilities (plugins) , making possible plug-in new functionalities and probably reorganizing some parts of code

Marco,

Before you commit this, I would like to see an example of how you are
going to handle these events in some type of plug in framework.  I'm
just not seeing where you are going with this.  If you are planning on
handling these events in any of the Kicad application main windows, that
doesn't make much sense because it was a command event generated by the
main window that got you to that point in the first place.  What does
make sense to me it to create some custom command events for handling
things like zoom and grid selection.  One of the often overlooked
features of command events is that they can be used to pass objects and
data pointers along with the event by using the Set/GetClientObject and
Set/GetClientData.  I'm not rejecting this patch, but I'm concerned that
this patch will not be fully developed and no plugins that handle these
events will ever be written which means there is an unnecessary level
complexity in this code.

>>>
>>> I've already something ready, if nobody has something against it i wish commit the first tranche of the implementation on pcbnew.
>>>
>>
>> If it is as disruptive as you say, can we see a patch and have a short
>> chat about it before you commit?
> 
> Indeed, 
> Here is the patch, let's chat :)

Your patch has a few issues.  The code formatting is incorrect.  Please
see the recently released coding guidelines in the Kicad source tree or
use uncrustify to correct the formatting.  Also, try to avoid the wx
prefix when naming source code that is not going to be pushed upstream
to wxWidgets.  I think we should leave that to the wxWidget developers.
 I know there are a few other places in where this is used in the Kicad
source tree but this is one of those minor things that should be cleaned
up.  Thank you for your effort.

Wayne

> 
> --
> Marco
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References