[gme-users] Developing a decorator

Kevin Smyth ksmyth at isis.vanderbilt.edu
Tue Apr 9 09:43:32 CDT 2013


Yes, this is a common use of decorators. I'd start with the sample C#
decorator at C:\Program Files (x86)\GME\SDK\Decorator
Samples\SampleDecorator.cs and make these changes:

 

Generate a new Guid for line 13

Create a new ProgId for line 14

In InitializeEx, save the value of the attribute into a member. Use this
function call: MgaObject.GetStrAttrByNameDisp("attrname");

Add code in Draw to render the attribute value

You may need to modify GetPreferredSize

 

If you prefer C++, I'd look at the Uml or MetaGME decorators for
inspiration.

 

Kevin

 

 

From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Cho na
yun
Sent: Tuesday, April 09, 2013 5:08 AM
To: gme-users
Subject: [gme-users] Developing a decorator

 

Hi,

 

I want to make a simple decorator that shows model's attribute name,
like UML class diagram.

If a designer drags the model into the design space, then the model
shows its attribute name in default.

Is it possible to develop such decorator?

 

Any hints or advice would be appreciated.

 

 

Thanks,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20130409/467b6fdb/attachment.html 


More information about the gme-users mailing list