<div dir="ltr">Hi Cinthya,<div><br></div><div>I'd follow the "delegation pattern" for Draw, GetPreferredSize et al</div><div><br></div><div>The default decorator in GME is the "box decorator" which you can create in C# like:</div><div>var delegate = (IMgaDecorator)Activator.CreateInstance(Type.GetTypeFromProgID("MGA.BoxDecorator"));<br></div><div><br></div><div>Be sure to call Initialize</div><div><br></div><div>Kevin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 12, 2018 at 1:58 PM, Cinthya Lopez <span dir="ltr"><<a href="mailto:Cinthya_K_Lopez@raytheon.com" target="_blank">Cinthya_K_Lopez@raytheon.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_-233802082192125334WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am trying to implement a Decorator. I used the SampleDecorator.cs file that comes with GME install. I was able to run the decorator and catch the MouseLeftButtonDoubleClick event, which is the event I am interested in. This sample decorator
 is doing some drawing functionality that is currently overwriting the icon/appearance I had set for my Atom in my metamodel. The only thing I am interested in doing with the Decorator at this point is to catch the mouse event, but the MgaElementDecorator interface
 seems to require the implementation of certain functions such as Draw, GetPreferredSize, SetLocation, GetLocation. My question is, is there a way to have the decorator take a default implementation for these functions? Basically I don’t want the decorator
 to chance anything about the appearance of my Atom, I just want to be able to catch the mouse event and perform some functionality from there.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Cinthya<u></u><u></u></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
gme-users mailing list<br>
<a href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.<wbr>vanderbilt.edu</a><br>
<a href="http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/gme-users" rel="noreferrer" target="_blank">http://list.isis.vanderbilt.<wbr>edu/cgi-bin/mailman/listinfo/<wbr>gme-users</a><br>
<br></blockquote></div><br></div>