OpenQNX :: The QNX Community Portal

Aug 21, 2008 - 06:22 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 41 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Kevin Stallard
Post subject: What is the difference between a widget's area and extent?  PostPosted: Jul 04, 2007 - 09:32 PM
Guest





They seem to be the same or closely related. But I don't understand the
differences.

The documentation says:

<Documentation Quote>
"The position and dimensions of the widget can be accessed or modified
simultaneously using the Pt_ARG_AREA resource provided by the widget.

The extent of a widget is a rectangle defined by the widget's position and
dimensions. It isn't normally calculated until the widget is realized; you
can force the widget to calculate its extent by calling PtExtentWidget(); to
force a widget and its children to calculate their extents, call
PtExtentWidgetFamily(). Once the extent is calculated, you can find out what
it is by getting the Pt_ARG_EXTENT resource or by calling PtWidgetExtent()."

</Documentation Quote>

Is there any point in which the area will differ from the extent? Why does
the extent have to be caluclated if the area is the same as the extent?

Thanks

Kevin
 
   
Reply with quote Back to top
maschoen
Post subject: RE: What is the difference between a widget  PostPosted: Jul 05, 2007 - 03:09 PM
QNX Master


Joined: Jun 25, 2003
Posts: 1058

I've never noticed this interesting distinction before, but let me hazard a guess.
If a (container) widget, contained another widget that was anchored in a certain
way, the internal widget doesn't know its extent until the containing widget's extent
is extent is calculated. Likewise, if the extent of the container changes, the extent of
the internal widget also changes. You therefore could not change the extent of the
internal widget yourself, it being dependent on the container.

But maybe you could change the areas of both widgets without affecting the other?
 
 View user's profile Send private message Send e-mail Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.