← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: Component chooser now with thumbnail image of the component. And Unit select.

 

On 02/18/2014 08:28 PM, Wayne Stambaugh wrote:
On 2/18/2014 12:22 PM, Henner Zeller wrote:

I agree with your assessment about EDA_DRAW_PANEL being decoupled from
the frame window.  My guess is that would be quite a significant
undertaking given the current design.  If this is something you want to
tackle, I would do it one function at a time until all occurrences of
GetParent() and GetScreen() are gone and any parent code other than
default or overloaded wxWindows member functions are pushed up the stack
into EDA_DRAW_FRAME or converted to a wxMessage and sent to the parent
window.  Otherwise, you could break things is significant ways if you
are not careful.  I'm not sure what your best course of action is in
this case.  I never tried to use EDA_DRAW_PANEL in any window other than
an EDA_DRAW_FRAME so I don't know how much help I can give you.

Hi Henner & Wayne,

It looks to me like a task for the GAL. EDA_DRAW_PANEL_GAL is completely independent from the legacy Kicad classes.

The branch here:

https://github.com/twlostow/kicad-dev/tree/68f352b1c87c161cedcf79d8a691dfba5bffdcf1

... introduces preliminary GAL infrastructure for drawing schematic items. So far, there are 2 new classes (aside from a bunch of GAL/VIEW/draw panel fixes): - SCH_COMPONENT_PREVIEW_PANEL: EDA_DRAW_PANEL_GAL derivative for rendering LIB_COMPONENT previews - SCH_PAINTER: a PAINTER derivative. Currently renders only library items and SCH_FIELD/SCH_COMPONENT objects. There's still some missing functionality (mostly in pin rendering), but overall it looks good.

As a bonus, you get antialiasing, so even with the small preview panel everything is clear and readable.

Hope you'll find it useful.

Cheers,
Tom



Follow ups

References