← Back to team overview

kicad-developers team mailing list archive

Re: Add menu item functions.

 

On 8/30/2011 4:30 PM, Dick Hollenbeck wrote:
> On 08/30/2011 03:23 PM, Wayne Stambaugh wrote:
>> While I was adding the ability to enable and disable images in menu items, I
>> noticed that there are four (were eight) inline functions (ADD_MENUITEM_*) for
>> adding menu items.  Each of these functions have a different parameter list so
>> have a unique name for each function is not necessary.  I would like to change
>> the macro like naming convention from ADD_MENUITEM_* to AddMenuItem() (or
>> EdaAddMenuItem() if we are worried about naming collisions).  This should make
>> menu building code a lot cleaner without any loss in readability.  I'll even
>> throw in some fancy Doxygen comments for free.  If no one objects, I'll knock
>> this out over the next few days.
>>
>> Wayne
> 
> Thanks, would have done it myself someday, given enough time.
> 
> I have often questioned their home, meaning the macros.h file.
> 
> I was trying to use as little of wxWidgets in the SWEET stuff as possible.  But
> for some reason was forced into including macros.h.  Now it pulls in the
> universe.  I think only true, GUI library independent macros might go in there. 
> I'm not sure SWEET even builds anymore.
> 
> 
> But if you can find a more wx related file for these, that might be good too. 
> Not sure macros.h needs to be so wxWidgets centric.

How about moving the UI specific code to wxstruct.h and leave the wxString
specific code (which is probably all you need for the SWEET stuff) in macros.h?
 It may be beneficial for the SWEET code to move the wxString conversion code
to a new header file to prevent pulling in the boost typeof stuff as well
unless you are using the EXCHG() macro.

Wayne

> 
> No answers here, just gut feelings, at the moment.
> 
> Dick
> 
> 
> _______________________________________________
> 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