[gme-users] How to get one element's location relative to the
editing panel ofGME?
zolmol at isis.vanderbilt.edu
Mon Jun 12 11:11:24 CDT 2006
The element registry contains the information you need:
Right click on an element, Select Registry from the Popup menu and you will find some registry nodes. The PartRegs contains position in each aspect that element is shown.
So you will find the position information following the PartRegs/<<AspectName>>/Position path.
For your BON2 interpreter take this codesnippet:
void getXY( BON::Atom& m_ptr, unsigned int * x, unsigned int * y) const
if( m_ptr == BON::Atom()) return;
BON::Point p = m_ptr->getRegistry()->getLocation("Visualization");
*x = p.first;
*y = p.second;
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf
> Of zgshu2004 at 163.com
> Sent: Monday, June 12, 2006 4:53 AM
> To: gme-users
> Subject: [gme-users] How to get one element's location
> relative to the editing panel ofGME?
> I am developing an interpreter,which translates the
> contents of user model into the
> true interface of windows applications. I want to know how to
> get one element's x- and y-
> coordinate relative to the editing panel of GME, these
> information can help me arrange the
> locations of true windows controls.
> Can I get these information by developing a decorator for a
> special element?
> thank you!
> Ph.D Candidate
> College of Automation Engineering, South China University
> of Technology,
> Guangzhou, China.
> Phone: +86-20-87114637
> Email: zgshu2004 at 163.com
More information about the gme-users